From: Andrew Burford Date: Mon, 9 May 2022 15:50:01 +0000 (-0400) Subject: add support for direct tests (no bind), reorder Makefile targets X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=705415c1551d6fd45213a678d2c9b9b0996e46bf;p=wrapfs-mgmt.git add support for direct tests (no bind), reorder Makefile targets --- diff --git a/tests/Makefile b/tests/Makefile index 412425f..f6c663e 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -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 diff --git a/tests/ls-test.sh b/tests/ls-test.sh index 3a50f31..1efee9a 100755 --- a/tests/ls-test.sh +++ b/tests/ls-test.sh @@ -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 ;; diff --git a/tests/w-racer.sh b/tests/w-racer.sh index 224a6ab..1b163ed 100755 --- a/tests/w-racer.sh +++ b/tests/w-racer.sh @@ -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)