[LTP] [RFC PATCH 8/9] testcases: test.sh: Check if "getconf" is available

Mylène Josserand mylene.josserand@bootlin.com
Mon Apr 23 11:46:38 CEST 2018


In case TST_NEEDS_CHECKPOINTS is set to 1, the "getconf"
binary is used. This binary may not be installed in the system
and it will return a FAIL. Instead, add a check on this binary
to return "TCONF" in that case.

Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com>
---
 testcases/lib/test.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/testcases/lib/test.sh b/testcases/lib/test.sh
index bce9893a9..b27dbf4ab 100644
--- a/testcases/lib/test.sh
+++ b/testcases/lib/test.sh
@@ -421,6 +421,8 @@ fi
 if [ "$TST_NEEDS_CHECKPOINTS" = "1" ]; then
 	LTP_IPC_PATH="/dev/shm/ltp_${TCID}_$$"
 
+	tst_check_cmds "getconf"
+
 	LTP_IPC_SIZE=$(getconf PAGESIZE)
 	if [ $? -ne 0 ]; then
 		tst_brkm TBROK "getconf PAGESIZE failed"
-- 
2.11.0



More information about the ltp mailing list