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. fs_bind_lib.sh 10 11test() 12{ 13 tst_res TINFO "rbind: create slave then mount master - slave still propagates" 14 15 fs_bind_makedir rshared parent2 16 fs_bind_makedir rshared share2 17 18 EXPECT_PASS mount --rbind share2 parent2 19 EXPECT_PASS mount --make-rslave parent2 20 EXPECT_PASS mount --rbind "$FS_BIND_DISK1" share2 21 22 fs_bind_check parent2 share2 23 24 EXPECT_PASS mount --rbind "$FS_BIND_DISK2" parent2/a 25 26 fs_bind_check -n parent2/a share2/a 27 28 29 EXPECT_PASS umount parent2/a 30 EXPECT_PASS umount parent2 31 EXPECT_PASS umount parent2 32 EXPECT_PASS umount parent2 33 EXPECT_PASS umount share2 34 EXPECT_PASS umount share2 35} 36 37tst_run 38