xref: /third_party/ltp/testcases/kernel/fs/fs_bind/rbind/fs_bind_rbind35.sh
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/ltp/testcases/kernel/fs/fs_bind/rbind/
1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0-or-later
3# Copyright (c) International Business Machines  Corp., 2005
4# Copyright (c) 2021 Joerg Vehlow <joerg.vehlow@aox-tech.de>
5# Author: Avantika Mathur (mathurav@us.ibm.com)
6
7FS_BIND_TESTFUNC=test
8
9
10test()
11{
12	tst_res TINFO "rbind: rbind within same tree - root to child, child is private "
13
14	fs_bind_makedir rshared parent
15	fs_bind_makedir private parent/child1
16	fs_bind_makedir rshared parent/child2
17
18	EXPECT_PASS mount --rbind "$FS_BIND_DISK3" parent/child1
19
20	EXPECT_PASS mount --rbind parent parent/child2/
21	fs_bind_check parent parent/child2/
22	fs_bind_check parent/child1 parent/child2/child1
23
24	EXPECT_PASS umount parent/child2/child1
25	#added -n
26	fs_bind_check -n parent/child1 parent/child2/child1
27
28	EXPECT_PASS umount parent/child1
29	fs_bind_check parent/child1 parent/child2/child1
30
31	EXPECT_PASS mount --rbind "$FS_BIND_DISK4" parent/child2/child1
32	fs_bind_check -n parent/child1 parent/child2/child1
33
34	EXPECT_PASS umount parent/child2/child1
35	fs_bind_check parent/child1 parent/child2/child1
36
37
38	EXPECT_PASS umount parent/child2/child2
39	EXPECT_PASS umount parent/child2/child1
40	EXPECT_PASS umount parent/child2
41	EXPECT_PASS umount parent/child2
42	EXPECT_PASS umount parent
43}
44
45. fs_bind_lib.sh
46tst_run
47

Indexes created Thu Nov 07 10:32:03 CST 2024