2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2016 Red Hat Inc. All Rights Reserved.
7 # This test cover linux commit 7ae8fd0, kernel two mnt_group_id == 0
8 # (no peer)vfsmount as peers. It case kernel dereference a NULL
12 seqres=$RESULT_DIR/$seq
13 echo "QA output created by $seq"
17 status=1 # failure is the default!
18 trap "_cleanup; exit \$status" 0 1 2 3 15
25 # make sure there's no bug cause dentry isn't be freed
29 # get standard environment, filters and checks
33 # remove previous $seqres.full before test
36 # real QA test starts here
40 _require_local_device $SCRATCH_DEV
46 $FSSTRESS_PROG -z -n 500 -p 5 \
65 # prepare some mountpoint dir
66 MNTHEAD=$TEST_DIR/$seq
68 mkdir $MNTHEAD 2>>$seqres.full
76 findmnt -n -o TARGET,SOURCE $SCRATCH_DEV | \
77 sed -e "s;$mpA;mpA;g" \
80 _filter_spaces | _filter_testdir_and_scratch | sort
88 _scratch_mkfs >$seqres.full 2>&1
89 _get_mount -t $FSTYP $SCRATCH_DEV $MNTHEAD
90 $MOUNT_PROG --make-"${type}" $MNTHEAD
101 # shared New FS shared
102 # -----------------------[A/mnt1]----------------------
104 # | bind | bind | New FS
105 # [C/mnt1]--[slave C]<------[shared A]------>[slave B]--[B/mnt1]--[B/mnt1/mnt2]
111 _get_mount -t $FSTYP $SCRATCH_DEV $mpA
113 $MOUNT_PROG --make-shared $mpA
114 _get_mount --bind $mpA $mpB
115 _get_mount --bind $mpA $mpC
116 $MOUNT_PROG --make-slave $mpB
117 $MOUNT_PROG --make-slave $mpC
118 _get_mount -t $FSTYP $SCRATCH_DEV $mpA/mnt1
121 _get_mount -t $FSTYP $SCRATCH_DEV $mpB/mnt1/mnt2
123 fs_stress $mpB/mnt1/mnt2
126 echo "crash test passed"