xref: /aosp_15_r20/external/ltp/testcases/kernel/fs/fs_bind/cloneNS/fs_bind_cloneNS03.sh (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
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 <[email protected]>
5# Author: Avantika Mathur ([email protected])
6
7FS_BIND_TESTFUNC=test
8
9
10test()
11{
12	tst_res TINFO "cloneNS: namespace with unclonable mount"
13
14	fs_bind_makedir runbindable dir1
15	EXPECT_PASS mount --bind "$FS_BIND_DISK1" dir1
16	fs_bind_check "$FS_BIND_DISK1" dir1
17
18	fs_bind_create_ns
19
20	fs_bind_check -s "$FS_BIND_DISK1" dir1
21
22	EXPECT_PASS umount dir1
23	EXPECT_PASS umount dir1
24}
25
26. fs_bind_lib.sh
27tst_run
28