add support for direct tests (no bind), reorder Makefile targets
authorAndrew Burford <aburford@cs.stonybrook.edu>
Mon, 9 May 2022 15:50:01 +0000 (11:50 -0400)
committerAndrew Burford <aburford@cs.stonybrook.edu>
Mon, 9 May 2022 15:50:01 +0000 (11:50 -0400)
tests/Makefile
tests/ls-test.sh
tests/w-racer.sh

index 412425fc8ffe4c45b2ea2c9edfb376accfc52748..f6c663e003c98ab31a6170c371bfb1754e0a40d4 100644 (file)
@@ -3,97 +3,57 @@ CFLAGS=-g -Wall -Werror -m32
 LEN=60
 OPT=-w
 
-all: wtest2
+all: wtest
 
-utests: cleanup
-       sh j-reg.sh
-       sh j-racer.sh -u ext3 60
-
-w6:
-       sh w6.sh
-
-u33_racer_rename:
-       ./j-racer.sh -u ext3 100
-       ./j-racer.sh -u ext3 200
-       ./j-racer.sh -u ext3 300
-       ./j-racer.sh -u ext3 400
-
-u33_racer_rename_base:
-       ./j-racer.sh tmpfs 100
-       ./j-racer.sh tmpfs 200
-       ./j-racer.sh tmpfs 300
-       ./j-racer.sh tmpfs 400
-       ./j-racer.sh ext3 100
-       ./j-racer.sh ext3 200
-       ./j-racer.sh ext3 300
-       ./j-racer.sh ext3 400
-
-wtest_bisect:
-       ./w-racer.sh -w ext3 30
-
-otests:
-       ./o3 ext2 300
-       ./o3 ext3 300
-       ./o3 reiserfs 300
-       ./o3 tmpfs 300
-       ./o3 xfs 300
-
-install:
-       make -C $(HOME)/U/LINUS modules_install install
-       sync
-       sleep 1
-       sync
-       reboot
+# ls-test directly on lower filesystems
+ls_test:
+       date >> ls-test.log
+       sh ls-test.sh $(OPT) ext2 $(LEN)
+       sh ls-test.sh $(OPT) ext3 $(LEN)
+       sh ls-test.sh $(OPT) ext4 $(LEN)
+       sh ls-test.sh $(OPT) xfs $(LEN)
+       sh ls-test.sh $(OPT) tmpfs $(LEN)
+       sh ls-test.sh $(OPT) reiserfs $(LEN)
+
+wtest:
+       sh w-racer.sh $(OPT) ext2 $(LEN)
+       sh w-racer.sh $(OPT) ext3 $(LEN)
+       sh w-racer.sh $(OPT) ext4 $(LEN)
+       sh w-racer.sh $(OPT) xfs $(LEN)
+       sh w-racer.sh $(OPT) tmpfs $(LEN)
+       sh w-racer.sh $(OPT) reiserfs $(LEN)
 
-wtests: progs
-       sh w-racer.sh $(OPT) ext3 30
-       sleep 5
-       sh w-racer.sh $(OPT) nfs 30
-       sleep 5
-       sh w-racer.sh $(OPT) tmpfs 30
-       sleep 5
-       sh j-ltp.sh -w ext3
-       sleep 5
-       sh w-racer.sh $(OPT) nfs 30
-       sh w-racer.sh $(OPT) nfs 30
-       sh w-racer.sh $(OPT) nfs 60
-       sh w-racer.sh $(OPT) nfs 60
+#############
+# OLD STUFF #
+#############
+# many of the targets below reference programs that don't exist in this folder anymore
+# not sure where they went or what they were supposed to do
 
-ls_tests:
-       date >> ls-test.log
-       sh ls-test.sh ext2 60
-       sh ls-test.sh ext3 60
-       sh ls-test.sh ext4 60
-       sh ls-test.sh xfs 60
-       sh ls-test.sh tmpfs 60
-       sh ls-test.sh reiserfs 60
-
-wtest2:
-       sh w-racer.sh $(OPT) ext2 60
+tests: cleanup
+       sh w-racer.sh $(OPT) tmpfs 60
        sh w-racer.sh $(OPT) ext3 60
+       sh w-racer.sh $(OPT) ext2 60
        sh w-racer.sh $(OPT) ext4 60
-       sh w-racer.sh $(OPT) xfs 60
-       sh w-racer.sh $(OPT) tmpfs 60
        sh w-racer.sh $(OPT) reiserfs 60
+       sh w-racer.sh $(OPT) xfs 60
+       sh w-racer.sh $(OPT) nfs 60
 
-wtest_quick:
-       sh w-racer.sh $(OPT) ext2 5
-       sh w-racer.sh $(OPT) ext3 5
-       sh w-racer.sh $(OPT) ext4 5
-       sh w-racer.sh $(OPT) xfs 5
-       sh w-racer.sh $(OPT) reiserfs 5
-       sh w-racer.sh $(OPT) tmpfs 5
-
-oldall: progs tests # ntests longntests
-
-progs: cmpd cmpi keepopen mapper3 open-ro-close open-rw-close \
-       open-unlink open-write opendir re-read mapper-re-read chmodl \
-       seek-dir aoptest creat-unlink mk-core append
+lowertests: cleanup
+       sh w-racer.sh tmpfs 60
+       sh w-racer.sh ext3 60
+       sh w-racer.sh ext2 60
+       sh w-racer.sh ext4 60
+       sh w-racer.sh reiserfs 60
+       sh w-racer.sh xfs 60
+       sh w-racer.sh nfs 60
 
-cleanup:
-       -exportfs -ua
-       -umount /tmp /n/scratch /n/lower
-       -rmmod wrapfs
+alltests: cleanup
+       sh w-racer.sh $(OPT) tmpfs $(LEN)
+       sh w-racer.sh $(OPT) ext3 $(LEN)
+       sh w-racer.sh $(OPT) ext2 $(LEN)
+       sh w-racer.sh $(OPT) xfs $(LEN)
+       sh w-racer.sh $(OPT) reiserfs $(LEN)
+       sh w-racer.sh $(OPT) nfs $(LEN)
 
 ntests:
        sh w-racer.sh $(OPT) nfs 30
@@ -123,32 +83,70 @@ longntests: cleanup
        sh w-racer.sh $(OPT) nfs 300
        sh w-racer.sh $(OPT) nfs 300
 
-tests: cleanup
-       sh w-racer.sh $(OPT) tmpfs 60
-       sh w-racer.sh $(OPT) ext3 60
-       sh w-racer.sh $(OPT) ext2 60
-       sh w-racer.sh $(OPT) ext4 60
-       sh w-racer.sh $(OPT) reiserfs 60
-       sh w-racer.sh $(OPT) xfs 60
-       sh w-racer.sh $(OPT) nfs 60
+oldall: progs tests # ntests longntests
 
-lowertests: cleanup
-       sh w-racer.sh tmpfs 60
-       sh w-racer.sh ext3 60
-       sh w-racer.sh ext2 60
-       sh w-racer.sh ext4 60
-       sh w-racer.sh reiserfs 60
-       sh w-racer.sh xfs 60
-       sh w-racer.sh nfs 60
+progs: cmpd cmpi keepopen mapper3 open-ro-close open-rw-close \
+       open-unlink open-write opendir re-read mapper-re-read chmodl \
+       seek-dir aoptest creat-unlink mk-core append
 
-alltests: cleanup
-       sh w-racer.sh $(OPT) tmpfs $(LEN)
-       sh w-racer.sh $(OPT) ext3 $(LEN)
-       sh w-racer.sh $(OPT) ext2 $(LEN)
-       sh w-racer.sh $(OPT) xfs $(LEN)
-       sh w-racer.sh $(OPT) reiserfs $(LEN)
-       sh w-racer.sh $(OPT) nfs $(LEN)
+cleanup:
+       -exportfs -ua
+       -umount /tmp /n/scratch /n/lower
+       -rmmod wrapfs
+
+wtests: progs
+       sh w-racer.sh $(OPT) ext3 30
+       sleep 5
+       sh w-racer.sh $(OPT) nfs 30
+       sleep 5
+       sh w-racer.sh $(OPT) tmpfs 30
+       sleep 5
+       sh j-ltp.sh -w ext3
+       sleep 5
+       sh w-racer.sh $(OPT) nfs 30
+       sh w-racer.sh $(OPT) nfs 30
+       sh w-racer.sh $(OPT) nfs 60
+       sh w-racer.sh $(OPT) nfs 60
 
 old:
        perl parsit.pl x
 
+install:
+       make -C $(HOME)/U/LINUS modules_install install
+       sync
+       sleep 1
+       sync
+       reboot
+
+utests: cleanup
+       sh j-reg.sh
+       sh j-racer.sh -u ext3 60
+
+w6:
+       sh w6.sh
+
+u33_racer_rename:
+       ./j-racer.sh -u ext3 100
+       ./j-racer.sh -u ext3 200
+       ./j-racer.sh -u ext3 300
+       ./j-racer.sh -u ext3 400
+
+u33_racer_rename_base:
+       ./j-racer.sh tmpfs 100
+       ./j-racer.sh tmpfs 200
+       ./j-racer.sh tmpfs 300
+       ./j-racer.sh tmpfs 400
+       ./j-racer.sh ext3 100
+       ./j-racer.sh ext3 200
+       ./j-racer.sh ext3 300
+       ./j-racer.sh ext3 400
+
+wtest_bisect:
+       ./w-racer.sh -w ext3 30
+
+otests:
+       ./o3 ext2 300
+       ./o3 ext3 300
+       ./o3 reiserfs 300
+       ./o3 tmpfs 300
+       ./o3 xfs 300
index 3a50f319488afb5a0b213cfdb06f87fed4228289..1efee9a0f90618d7c5bca4770de2c94b3a99adbe 100755 (executable)
@@ -16,6 +16,7 @@ function runcmd
 type=""        # default
 case "$1" in
     -w | -wrapfs ) type="-w" ; shift ;;
+    -d | -direct ) type="-d" ; shift ;;
 esac
 case "$1" in
     ext3 | ext2 | ext4 | reiserfs | xfs | tmpfs | nfs ) fstype=$1 ;;
index 224a6abe68d3592542052e7a8352b4a0dd07667b..1b163ed04c7fd4aba0b0f86cc3bbb7516ba8dd37 100755 (executable)
@@ -64,12 +64,15 @@ esac
 type="bind"    # default
 case "$1" in
     -w | -wrapfs ) type="wrapfs" ; shift ;;
+    -d | -direct ) type="direct" ; shift ;;
 esac
 case "$1" in
     ext3 | ext2 | ext4 | reiserfs | xfs | tmpfs | nfs ) lowertype=$1 ;;
     * )
-       echo "Usage: $0 '[-w(rapfs)] LOWERTYPE [duration (60 sec default)]'"
+       echo "Usage: $0 '[-w(rapfs) | -d(irect)] LOWERTYPE [duration (60 sec default)]'"
        echo "where LOWERTYPE is one of: ext[234] reiserfs xfs tmpfs nfs"
+       echo "-d will run racer directly on lower fs mount"
+       echo "if neither -w nor -d is specified, racer will run through a bind mount"
        exit 1
        ;;
 esac
@@ -123,6 +126,9 @@ case "$type" in
     bind )
        runcmd mount -o bind $SCRATCH_DIR $TMP_DIR
        ;;
+    direct )
+       TMP_DIR=$SCRATCH_DIR
+       ;;
 esac
 
 # run actual racer tests (60 seconds default)