-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathfs_bind24.sh
More file actions
executable file
·35 lines (26 loc) · 866 Bytes
/
Copy pathfs_bind24.sh
File metadata and controls
executable file
·35 lines (26 loc) · 866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (c) International Business Machines Corp., 2005
# Copyright (c) 2021 Joerg Vehlow <joerg.vehlow@aox-tech.de>
# Author: Avantika Mathur (mathurav@us.ibm.com)
FS_BIND_TESTFUNC=test
test()
{
tst_res TINFO "bind: shared child to shared parent"
fs_bind_makedir rshared dir1
mkdir dir1/1 dir1/1/2 dir1/1/2/3 dir1/1/2/fs_bind_check dir2 dir3 dir4
touch dir4/ls
EXPECT_PASS mount --bind dir1/1/2 dir2
EXPECT_PASS mount --make-rslave dir1
EXPECT_PASS mount --make-rshared dir1
EXPECT_PASS mount --bind dir1/1/2/3 dir3
EXPECT_PASS mount --make-rslave dir1
EXPECT_PASS mount --bind dir4 dir2/fs_bind_check
fs_bind_check dir1/1/2/fs_bind_check/ dir4
EXPECT_PASS umount dir2/fs_bind_check
EXPECT_PASS umount dir3
EXPECT_PASS umount dir2
EXPECT_PASS umount dir1
}
. fs_bind_lib.sh
tst_run