From 89379af43f110243788ee1bd63506223d5858c0b Mon Sep 17 00:00:00 2001 From: Peter Holm Date: Mon, 13 Sep 2021 08:56:06 +0000 Subject: [PATCH] stress2: Update test to the sysctl 'vfs.lookup_shared' being removed --- tools/test/stress2/misc/unionfs2.sh | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/tools/test/stress2/misc/unionfs2.sh b/tools/test/stress2/misc/unionfs2.sh index 7af786ae9ce4..29e1847714c8 100755 --- a/tools/test/stress2/misc/unionfs2.sh +++ b/tools/test/stress2/misc/unionfs2.sh @@ -28,19 +28,15 @@ [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 -saved=`sysctl vfs.lookup_shared | awk '{print $NF}'` -for i in 1 0; do - sysctl vfs.lookup_shared=$i - [ -d /var/tmp/unionfs ] || mkdir -p /var/tmp/unionfs - mount_unionfs /var/tmp/unionfs /tmp/stressX +[ -d /var/tmp/unionfs ] || mkdir -p /var/tmp/unionfs +mount_unionfs /var/tmp/unionfs /tmp/stressX - export RUNDIR=/var/tmp/unionfs/stressX - export runRUNTIME=10m # Run tests for 10 minutes - (cd ..; ./run.sh disk.cfg) - false - while mount | grep -q /unionfs; do - umount /tmp/stressX > /dev/null 2>&1 - done - rm -rf /var/tmp/unionfs +export RUNDIR=/var/tmp/unionfs/stressX +export runRUNTIME=10m # Run tests for 10 minutes +(cd ..; ./run.sh disk.cfg) +false +while mount | grep -q /unionfs; do + umount /tmp/stressX > /dev/null 2>&1 done -sysctl vfs.lookup_shared=$saved +rm -rf /var/tmp/unionfs +exit 0