aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2014-03-06 15:29:58 +0000
committerDavid Howells <dhowells@redhat.com>2014-03-06 15:29:58 +0000
commit805b57f8ca39e3e0aa71d487f4cd203524a74eba (patch)
tree27c36f767cd22c1c031a091615eaa4e78384fd4c
parente0279b30c433d29f04a33841b35b04152f8f8e85 (diff)
downloadkeyutils-805b57f8ca39e3e0aa71d487f4cd203524a74eba.tar.gz
TEST: Make it possible to use OSRELEASE with the version comparison functions
Make it possible to use OSRELEASE with the version comparison functions. Currently it's set to a text string (eg. "6.5") but not set to a numeric type (which it can't be since it's not a simple number). This means that the shell numeric comparison operators (eg. "-lt") cannot be used. Signed-off-by: David Howells <dhowells@redhat.com>
-rw-r--r--tests/keyctl/session/valid/runtest.sh2
-rw-r--r--tests/prepare.inc.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/keyctl/session/valid/runtest.sh b/tests/keyctl/session/valid/runtest.sh
index fd3d32c..4c83131 100644
--- a/tests/keyctl/session/valid/runtest.sh
+++ b/tests/keyctl/session/valid/runtest.sh
@@ -10,7 +10,7 @@ result=PASS
echo "++++ BEGINNING TEST" >$OUTPUTFILE
# describe the keyring created for an anonymous session
-if [ $OSDIST = RHEL -a $OSRELEASE -le 5 ]
+if [ $OSDIST = RHEL ] && version_less_than $OSRELEASE 6
then
marker "ANON SESSION"
new_session - keyctl rdescribe @s "@"
diff --git a/tests/prepare.inc.sh b/tests/prepare.inc.sh
index 28ed2f0..ee09775 100644
--- a/tests/prepare.inc.sh
+++ b/tests/prepare.inc.sh
@@ -82,7 +82,7 @@ fi
# Work out whether the big_key type is supported by the kernel
#
have_big_key_type=0
-if [ $OSDIST-$OSRELEASE = RHEL-7 ]
+if [ $OSDIST = RHEL ] && ! version_less_than $OSRELEASE 7
then
# big_key is backported to 3.10 for RHEL-7
have_big_key_type=1