diff options
author | LOLi <[email protected]> | 2017-11-07 23:55:31 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-11-07 14:55:31 -0800 |
commit | 271955da3eec30da42f0e67b63cd9ef5f003c55b (patch) | |
tree | 0f132d826601f79da1171d38e1a1a04690bc22c6 /scripts/zfs-tests.sh | |
parent | cb3b0419baeecd15cc6891cdccfe0d5d815edd36 (diff) |
Fix zfs-tests.sh single test functionality
Without any tag specified into the runtime-generated runfile the
test-runner will not execute the test provided from the command line:
fix this by adding tag information to the custom runfile.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Reviewed-by: Giuseppe Di Natale <[email protected]>
Signed-off-by: loli10K <[email protected]>
Closes #6826
Diffstat (limited to 'scripts/zfs-tests.sh')
-rwxr-xr-x | scripts/zfs-tests.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/zfs-tests.sh b/scripts/zfs-tests.sh index f4337ea11..38b01b871 100755 --- a/scripts/zfs-tests.sh +++ b/scripts/zfs-tests.sh @@ -41,7 +41,7 @@ FILEDIR=${FILEDIR:-/var/tmp} DISKS=${DISKS:-""} SINGLETEST=() SINGLETESTUSER="root" -TAGS="functional" +TAGS="" ITERATIONS=1 ZFS_DBGMSG="$STF_SUITE/callbacks/zfs_dbgmsg.ksh" ZFS_DMESG="$STF_SUITE/callbacks/zfs_dmesg.ksh" @@ -272,7 +272,7 @@ OPTIONS: -s SIZE Use vdevs of SIZE (default: 4G) -r RUNFILE Run tests in RUNFILE (default: linux.run) -t PATH Run single test at PATH relative to test suite - -T TAGS Comma separated list of tags + -T TAGS Comma separated list of tags (default: 'functional') -u USER Run single test as USER (default: root) EXAMPLES: @@ -355,6 +355,9 @@ FILES=${FILES:-"$FILEDIR/file-vdev0 $FILEDIR/file-vdev1 $FILEDIR/file-vdev2"} LOOPBACKS=${LOOPBACKS:-""} if [ ${#SINGLETEST[@]} -ne 0 ]; then + if [ -n "$TAGS" ]; then + fail "-t and -T are mutually exclusive." + fi RUNFILE_DIR="/var/tmp" RUNFILE="zfs-tests.$$.run" SINGLEQUIET="False" @@ -395,11 +398,17 @@ EOF tests = ['$SINGLETESTFILE'] pre = $SETUPSCRIPT post = $CLEANUPSCRIPT +tags = ['functional'] EOF done fi # +# Use default tag if none was specified +# +TAGS=${TAGS:='functional'} + +# # Attempt to locate the runfile describing the test workload. # if [ -n "$RUNFILE" ]; then |