[LTP] [PATCH v2 3/3] commands/keyctl01: Check keyctl support instead of kernel version
Guangwen Feng
fenggw-fnst@cn.fujitsu.com
Tue Jul 18 08:31:44 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..8e96622 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 | tr '\n' ' ' | grep "request2" | grep "negate" | \
+ grep "show" | grep "unlink" >/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