diff options
author | LOLi <[email protected]> | 2018-02-07 21:43:24 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-02-07 12:43:24 -0800 |
commit | 9ca25e709b904ab9669724d53eb50ee074c09705 (patch) | |
tree | ebd6e8bca66e0865ddb30544ba183621424424ab | |
parent | 6b810d04bda3f274c7835e313a0dfc6938487772 (diff) |
Verify ZFS Test Suite scripts executability
This change adds a make target 'testscheck' which verifies all ksh test
scripts, part of the ZFS Test Suite, have their executable bit set:
this should avoid adding new test scripts that cannot be executed by
the test-runner.py which would result in the following warning message:
Warning: Test removed from TestGroup because it failed verification.
This also verifies both *.cfg and *.kshlib files used in the ZFS Test
Suite are not executable.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Giuseppe Di Natale <[email protected]>
Signed-off-by: loli10K <[email protected]>
Closes #7131
-rw-r--r-- | Makefile.am | 10 | ||||
-rw-r--r--[-rwxr-xr-x] | tests/zfs-tests/tests/functional/casenorm/casenorm.kshlib | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | tests/zfs-tests/tests/functional/cli_root/zpool_events/zpool_events.kshlib | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | tests/zfs-tests/tests/functional/cli_root/zpool_reopen/zpool_reopen.cfg | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | tests/zfs-tests/tests/functional/events/events_common.kshlib | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | tests/zfs-tests/tests/functional/rsend/send_encrypted_files.ksh | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_common.kshlib | 0 |
7 files changed, 9 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index a4dccdda6..07d583fdf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -41,7 +41,7 @@ dist-hook: sed -i 's/Release:[[:print:]]*/Release: $(RELEASE)/' \ $(distdir)/META -checkstyle: cstyle shellcheck flake8 commitcheck mancheck +checkstyle: cstyle shellcheck flake8 commitcheck mancheck testscheck commitcheck: @if git rev-parse --git-dir > /dev/null 2>&1; then \ @@ -68,6 +68,14 @@ mancheck: xargs mandoc -Tlint -Werror; \ fi +testscheck: + @find ${top_srcdir}/tests/zfs-tests/tests -type f \ + \( -name '*.ksh' -not -executable \) -o \ + \( -name '*.kshlib' -executable \) -o \ + \( -name '*.cfg' -executable \) | \ + xargs -r stat -c '%A %n' | \ + awk '{c++; print} END {if(c>0) exit 1}' + lint: cppcheck paxcheck cppcheck: diff --git a/tests/zfs-tests/tests/functional/casenorm/casenorm.kshlib b/tests/zfs-tests/tests/functional/casenorm/casenorm.kshlib index 273522406..273522406 100755..100644 --- a/tests/zfs-tests/tests/functional/casenorm/casenorm.kshlib +++ b/tests/zfs-tests/tests/functional/casenorm/casenorm.kshlib diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_events/zpool_events.kshlib b/tests/zfs-tests/tests/functional/cli_root/zpool_events/zpool_events.kshlib index a64f14a85..a64f14a85 100755..100644 --- a/tests/zfs-tests/tests/functional/cli_root/zpool_events/zpool_events.kshlib +++ b/tests/zfs-tests/tests/functional/cli_root/zpool_events/zpool_events.kshlib diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_reopen/zpool_reopen.cfg b/tests/zfs-tests/tests/functional/cli_root/zpool_reopen/zpool_reopen.cfg index 9227cbb18..9227cbb18 100755..100644 --- a/tests/zfs-tests/tests/functional/cli_root/zpool_reopen/zpool_reopen.cfg +++ b/tests/zfs-tests/tests/functional/cli_root/zpool_reopen/zpool_reopen.cfg diff --git a/tests/zfs-tests/tests/functional/events/events_common.kshlib b/tests/zfs-tests/tests/functional/events/events_common.kshlib index 26afc1091..26afc1091 100755..100644 --- a/tests/zfs-tests/tests/functional/events/events_common.kshlib +++ b/tests/zfs-tests/tests/functional/events/events_common.kshlib diff --git a/tests/zfs-tests/tests/functional/rsend/send_encrypted_files.ksh b/tests/zfs-tests/tests/functional/rsend/send_encrypted_files.ksh index 20f3788d5..20f3788d5 100644..100755 --- a/tests/zfs-tests/tests/functional/rsend/send_encrypted_files.ksh +++ b/tests/zfs-tests/tests/functional/rsend/send_encrypted_files.ksh diff --git a/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_common.kshlib b/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_common.kshlib index 5c8c9847a..5c8c9847a 100755..100644 --- a/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_common.kshlib +++ b/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_common.kshlib |