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
41 _require_local_device $SCRATCH_DEV
47 $FSSTRESS_PROG -z -n 500 -p 5 \
66 # prepare some mountpoint dir
67 MNTHEAD=$TEST_DIR/$seq
69 mkdir $MNTHEAD 2>>$seqres.full
77 findmnt -n -o TARGET,SOURCE $SCRATCH_DEV | \
78 sed -e "s;$mpA;mpA;g" \
81 _filter_spaces | _filter_testdir_and_scratch | sort
89 _scratch_mkfs >$seqres.full 2>&1
90 _get_mount -t $FSTYP $SCRATCH_DEV $MNTHEAD
91 $MOUNT_PROG --make-"${type}" $MNTHEAD
102 # shared New FS shared
103 # -----------------------[A/mnt1]----------------------
105 # | bind | bind | New FS
106 # [C/mnt1]--[slave C]<------[shared A]------>[slave B]--[B/mnt1]--[B/mnt1/mnt2]
112 _get_mount -t $FSTYP $SCRATCH_DEV $mpA
114 $MOUNT_PROG --make-shared $mpA
115 _get_mount --bind $mpA $mpB
116 _get_mount --bind $mpA $mpC
117 $MOUNT_PROG --make-slave $mpB
118 $MOUNT_PROG --make-slave $mpC
119 _get_mount -t $FSTYP $SCRATCH_DEV $mpA/mnt1
122 _get_mount -t $FSTYP $SCRATCH_DEV $mpB/mnt1/mnt2
124 fs_stress $mpB/mnt1/mnt2
127 echo "crash test passed"