diff options
author | David Howells <dhowells@redhat.com> | 2014-03-04 17:01:45 +0000 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2014-03-06 15:12:51 +0000 |
commit | 1423feaedad0ad0b5ffb6944bd0de5c35c8b1c3a (patch) | |
tree | 0f51ba9b5560ff62a31c28718f95bd9b6f3c9f98 | |
parent | e6a1de3e5b2576f9c0d0a5876c5e9fc369e8576f (diff) | |
download | keyutils-1423feaedad0ad0b5ffb6944bd0de5c35c8b1c3a.tar.gz |
TEST: Can't do the bz1031154 test before 3.13-rc1
Can't do the bz1031154 test before 3.13-rc1 so skip the test if the kernel is
too old. The big_key facility was backported to the 3.10 kernel used by
RHEL-7 so permit the test there.
Signed-off-by: David Howells <dhowells@redhat.com>
-rw-r--r-- | tests/bugzillas/bz1031154/runtest.sh | 6 | ||||
-rw-r--r-- | tests/prepare.inc.sh | 13 |
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/bugzillas/bz1031154/runtest.sh b/tests/bugzillas/bz1031154/runtest.sh index fa30567..1a9a8e6 100644 --- a/tests/bugzillas/bz1031154/runtest.sh +++ b/tests/bugzillas/bz1031154/runtest.sh @@ -10,6 +10,12 @@ result=PASS +if [ $have_big_key_type = 0 ] +then + toolbox_skip_test $TEST "SKIPPING TEST DUE TO LACK OF BIG_KEY TYPE" + exit 0 +fi + require_command getenforce require_command setenforce require_command runcon diff --git a/tests/prepare.inc.sh b/tests/prepare.inc.sh index 7b6e3b4..850d4d0 100644 --- a/tests/prepare.inc.sh +++ b/tests/prepare.inc.sh @@ -68,3 +68,16 @@ then ;; esac fi + +# +# Work out whether the big_key type is supported by the kernel +# +have_big_key_type=0 +if [ $OSDIST-$OSRELEASE = RHEL-7 ] +then + # big_key is backported to 3.10 for RHEL-7 + have_big_key_type=1 +elif kernel_at_or_later_than 3.13-rc1 +then + have_big_key_type=1 +fi |