lib/tst_test.sh: add TST_MIN_KVER variable check
PATCH 1/1 lib/tst_test.sh: add TST_MIN_KVER variable check
Add the same behavior as in LTP C library with 'min_kver'.
Signed-off-by Alexey Kodanev <[email protected]>
--- testcases/lib/tst_test.sh | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
testcases/lib/tst_test.sh +6 -1
@@ -251,7 +251,7 @@ tst_run() if [ -n "$TST_TEST_PATH" ]; then for tst_i in $(grep TST_ "$TST_TEST_PATH" | sed 's/.*TST_//; s/[="} \t\/:`].*//'); do case "$tst_i" in - SETUP|CLEANUP|TESTFUNC|ID|CNT);; + SETUP|CLEANUP|TESTFUNC|ID|CNT|MIN_KVER);; OPTS|USAGE|PARSE_ARGS|POS_ARGS);; NEEDS_ROOT|NEEDS_TMPDIR|NEEDS_DEVICE|DEVICE);; NEEDS_CMDS|NEEDS_MODULE|MODPATH|DATAROOT);;
@@ -290,6 +290,11 @@ tst_run() tst_check_cmds $TST_NEEDS_CMDS + if [ -n "$TST_MIN_KVER" ]; then + tst_kvcmp -lt "$TST_MIN_KVER" && \ + tst_brk TCONF "test requires kernel $TST_MIN_KVER+" + fi + if [ "$TST_NEEDS_TMPDIR" = 1 ]; then if [ -z "$TMPDIR" ]; then export TMPDIR="/tmp"
Signature · 1 line
1.7.1
PATCH 1/1 lib/tst_test.sh: add TST_MIN_KVER variable check
Hi!
Looks good, acked.
Signature · 2 lines
Cyril Hrubis [email protected]
Alexey Kodanev
AppliedPATCH 1/1 lib/tst_test.sh: add TST_MIN_KVER variable check
Quoted 2 lines · Cyril Hrubis
Hi!
Looks good, acked.
Applied.