1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
|
From: Christian Kastner <ckk@debian.org>
Date: Mon, 26 May 2014 09:54:57 +0200
Subject: Debian-specific kernel feature tests
Upstream assumes features based on the kernel version, but some of these
features aren't available in the Debian kernel, or were only enabled at a later
point. Also, the release number comparison used by upstream breaks with sid's
non-numeric release number of "unstable".
This adjust the feature tests to reflect Debian's kernels:
* Drop $OSRELEASE tests
* Drop ancient RedHat-specific test
* Debian's kernel generally lacks CONFIG_BIG_KEYS
* Debian's kernel has CONFIG_KEY_DH_OPERATIONS since 4.19~exp1
Forwarded: not-needed
Last-Update: 2019-02-20
---
tests/keyctl/padd/useradd/runtest.sh | 5 +----
tests/keyctl/session/valid/runtest.sh | 15 ---------------
tests/keyctl/show/valid/runtest.sh | 3 +--
tests/prepare.inc.sh | 13 ++++---------
4 files changed, 6 insertions(+), 30 deletions(-)
diff --git a/tests/keyctl/padd/useradd/runtest.sh b/tests/keyctl/padd/useradd/runtest.sh
index aea21d9..135e491 100644
--- a/tests/keyctl/padd/useradd/runtest.sh
+++ b/tests/keyctl/padd/useradd/runtest.sh
@@ -40,10 +40,7 @@ expect_payload payload "lizard"
marker "UNLINK KEY"
unlink_key $keyid @s
-if [ $skip_root_required = 0 ] && {
- [ $OSDIST = RHEL ] && ! version_less_than $OSRELEASE 6.6 ||
- keyutils_at_or_later_than 1.5.6 ;
- }
+if [ $skip_root_required = 0 ] && keyutils_at_or_later_than 1.5.6
then
# add keys with huge payloads
old_root_quota=`cat /proc/sys/kernel/keys/root_maxbytes`
diff --git a/tests/keyctl/session/valid/runtest.sh b/tests/keyctl/session/valid/runtest.sh
index 4c83131..5258b17 100644
--- a/tests/keyctl/session/valid/runtest.sh
+++ b/tests/keyctl/session/valid/runtest.sh
@@ -9,21 +9,6 @@
result=PASS
echo "++++ BEGINNING TEST" >$OUTPUTFILE
-# describe the keyring created for an anonymous session
-if [ $OSDIST = RHEL ] && version_less_than $OSRELEASE 6
-then
- marker "ANON SESSION"
- new_session - keyctl rdescribe @s "@"
- expect_key_rdesc rdesc "keyring@.*@.*@.*@_ses[^@]*\$"
-
- # check the session keyring ID is shown
- seskeyring="`tail -2 $OUTPUTFILE | head -1`"
- if ! expr "$seskeyring" : "Joined session keyring: [0-9]*" >&/dev/null
- then
- failed
- fi
-fi
-
# describe the keyring created for a named session
marker "NAMED SESSION"
new_session qwerty keyctl rdescribe @s "@"
diff --git a/tests/keyctl/show/valid/runtest.sh b/tests/keyctl/show/valid/runtest.sh
index b4d5b2c..308dd64 100644
--- a/tests/keyctl/show/valid/runtest.sh
+++ b/tests/keyctl/show/valid/runtest.sh
@@ -29,8 +29,7 @@ then
failed
fi
-if [ $OSDIST = RHEL ] && ! version_less_than $OSRELEASE 6.6 ||
- keyutils_at_or_later_than 1.5.6
+if keyutils_at_or_later_than 1.5.6
then
# should be eight lines in the output (banner + session + 6 keyrings)
marker "COUNT LINES"
diff --git a/tests/prepare.inc.sh b/tests/prepare.inc.sh
index 0b66237..5ca629d 100644
--- a/tests/prepare.inc.sh
+++ b/tests/prepare.inc.sh
@@ -113,14 +113,8 @@ else
#
# Work out whether the big_key type is supported by the kernel.
#
- if [ $OSDIST = RHEL ] && ! version_less_than $OSRELEASE 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
+ # <snip>
+ # Debian's kernel is not built with CONFIG_BIG_KEYS
#
# Work out whether Diffie-Hellman is supported by the kernel
@@ -128,7 +122,8 @@ else
if [ $OSDIST = RHEL ]
then
:
- elif keyutils_at_or_later_than 1.5.10 && kernel_at_or_later_than 4.7-rc1
+ # Debian's kernel introduced this in 4.19~exp1
+ elif keyutils_at_or_later_than 1.5.10 && kernel_at_or_later_than 4.19
then
have_dh_compute=1
fi
|