From 45c3cc59df8b00cc626b193af077f119da3dd121 Mon Sep 17 00:00:00 2001 From: Andrew Burford Date: Mon, 9 May 2022 14:49:16 -0400 Subject: [PATCH] run lsof in w-racer.sh --- tests/w-racer.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/w-racer.sh b/tests/w-racer.sh index 1b163ed..5e6771f 100755 --- a/tests/w-racer.sh +++ b/tests/w-racer.sh @@ -18,8 +18,9 @@ function runcmd sleep 0.25 $@ ret=$? - if test $ret -ne 0 ; then + if test $ret -ne 0 && test "$1" != 'lsof'; then echo "$0: $lowertype and $type failed" + echo "$0: exit code $ret" exit $ret fi } @@ -36,6 +37,7 @@ function cleanup # cleanup case "$type" in wrapfs ) + runcmd lsof $TMP_DIR runcmd umount $TMP_DIR runcmd rmmod wrapfs ;; @@ -46,13 +48,16 @@ esac #read n case "$lowertype" in ext2 | ext3 | ext4 | reiserfs | xfs ) + runcmd lsof $SCRATCH_DIR runcmd umount $SCRATCH_DIR ;; tmpfs ) + runcmd lsof $SCRATCH_DIR runcmd umount $SCRATCH_DIR runcmd swapoff $SCRATCH_DEV ;; nfs ) + runcmd lsof $SCRATCH_DIR runcmd umount $SCRATCH_DIR runcmd exportfs -u localhost:$LOWER_DIR runcmd umount $LOWER_DIR -- 2.34.1