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 "move: shared tree within a tree it is bound to - and then move to another share subtree" 13 14 fs_bind_makedir rshared parent1 15 mkdir parent1/a parent2 16 EXPECT_PASS mount --bind parent1 parent2 17 18 fs_bind_check parent1 parent2 19 20 EXPECT_PASS mount --move parent1 parent2/a 21 22 fs_bind_check parent2 parent2/a parent2/a/a 23 24 fs_bind_makedir rshared tmp1 25 mkdir tmp2 tmp1/1 26 27 EXPECT_PASS mount --bind tmp1 tmp2 28 EXPECT_PASS mount --move parent2 tmp1/1 29 30 EXPECT_PASS umount tmp1/1/a/a 31 EXPECT_PASS umount tmp1/1 32 EXPECT_PASS umount tmp1 33 EXPECT_PASS umount tmp2 34} 35 36. fs_bind_lib.sh 37tst_run 38