run lsof in w-racer.sh
authorAndrew Burford <aburford@cs.stonybrook.edu>
Mon, 9 May 2022 18:49:16 +0000 (14:49 -0400)
committerAndrew Burford <aburford@cs.stonybrook.edu>
Mon, 9 May 2022 18:49:16 +0000 (14:49 -0400)
tests/w-racer.sh

index 1b163ed04c7fd4aba0b0f86cc3bbb7516ba8dd37..5e6771fe1463a4f825f32b8977d8107d486eab03 100755 (executable)
@@ -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