[LTP] [PATCH v3] commands/keyctl01: Check keyctl support instead of kernel version
Guangwen Feng
fenggw-fnst@cn.fujitsu.com
Thu Jul 20 07:38:12 CEST 2017
Signed-off-by: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
---
testcases/commands/keyctl/keyctl01.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/testcases/commands/keyctl/keyctl01.sh b/testcases/commands/keyctl/keyctl01.sh
index 76226ae..0b8e86c 100644
--- a/testcases/commands/keyctl/keyctl01.sh
+++ b/testcases/commands/keyctl/keyctl01.sh
@@ -36,8 +36,10 @@ TST_NEEDS_CMDS="keyctl"
setup()
{
- if tst_kvcmp -le 2.6.33; then
- tst_brk TCONF "Kernel newer than 2.6.33 is needed"
+ keyctl 2>&1 | sort | tr '\n' ' ' | grep -P \
+ "\bnegate\b.*\brequest2\b.*\bshow\b.*\bunlink\b" >/dev/null
+ if [ $? -ne 0 ]; then
+ tst_brk TCONF "keyctl operations not supported"
fi
PATH_KEYSTAT="/proc/key-users"
--
2.9.4
More information about the ltp
mailing list