All of lore.kernel.org
 help / color / mirror / Atom feed
From: =?unknown-8bit?q?Myl=C3=A8ne?= Josserand <mylene.josserand@bootlin.com>
To: ltp@lists.linux.it
Subject: [LTP] [RFC PATCH 9/9] testcases: cpuset: Check if "getconf" is available
Date: Mon, 23 Apr 2018 11:46:39 +0200	[thread overview]
Message-ID: <20180423094639.14612-10-mylene.josserand@bootlin.com> (raw)
In-Reply-To: <20180423094639.14612-1-mylene.josserand@bootlin.com>

The "getconf" binary is used by cpuset_regression_test.sh
and may not be installed in the system. The test will fail
but it is a misconfiguration so let's use "tst_check_cmds"
to check if this binary is available and return a TCONF error
if not.

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

diff --git a/testcases/kernel/controllers/cpuset/cpuset_regression_test.sh b/testcases/kernel/controllers/cpuset/cpuset_regression_test.sh
index 4a104a3ad..96a57955c 100755
--- a/testcases/kernel/controllers/cpuset/cpuset_regression_test.sh
+++ b/testcases/kernel/controllers/cpuset/cpuset_regression_test.sh
@@ -34,6 +34,8 @@ setup()
 		tst_brkm TCONF "Test must be run with kernel 3.18.0 or newer"
 	fi
 
+	tst_check_cmds "getconf"
+
 	local cpu_num=$(getconf _NPROCESSORS_ONLN)
 	if [ $cpu_num -lt 2 ]; then
 		tst_brkm TCONF "We need 2 cpus at least to have test"
-- 
2.11.0


  parent reply	other threads:[~2018-04-23  9:46 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-23  9:46 [LTP] [RFC PATCH 0/9] testcases: small improvements with TCONF =?unknown-8bit?q?Myl=C3=A8ne?= Josserand
2018-04-23  9:46 ` [LTP] [RFC PATCH 1/9] testcases: su: Fix userdel use =?unknown-8bit?q?Myl=C3=A8ne?= Josserand
2018-04-23 10:13   ` Cyril Hrubis
2018-04-23 12:51     ` Thomas Petazzoni
2018-04-23  9:46 ` [LTP] [RFC PATCH 2/9] testcases: ar: Add TST_NEEDS_CMDS on "ar" =?unknown-8bit?q?Myl=C3=A8ne?= Josserand
2018-04-23 10:25   ` Cyril Hrubis
2018-04-27 13:37     ` =?unknown-8bit?q?Myl=C3=A8ne?= Josserand
2018-05-16  9:27   ` Petr Vorel
2018-04-23  9:46 ` [LTP] [RFC PATCH 3/9] testcases: file: Add TST_NEEDS_CMDS on readelf =?unknown-8bit?q?Myl=C3=A8ne?= Josserand
2018-05-16  9:34   ` Petr Vorel
2018-04-23  9:46 ` [LTP] [RFC PATCH 4/9] testcases: tar: Add TST_NEEDS_CMDS on gzip and bzip =?unknown-8bit?q?Myl=C3=A8ne?= Josserand
2018-05-16  9:38   ` Petr Vorel
2018-04-23  9:46 ` [LTP] [RFC PATCH 5/9] testcases: logrotate: Check if "file" command exists =?unknown-8bit?q?Myl=C3=A8ne?= Josserand
2018-05-16  9:45   ` Petr Vorel
2018-05-16 10:20   ` Petr Vorel
2018-04-23  9:46 ` [LTP] [RFC PATCH 6/9] testcases: wc: Add "unrecognized option" as TCONF =?unknown-8bit?q?Myl=C3=A8ne?= Josserand
2018-05-16 10:00   ` Petr Vorel
2018-05-29 16:32     ` =?unknown-8bit?q?Myl=C3=A8ne?= Josserand
2018-06-04 15:22       ` Petr Vorel
2018-06-05  6:21         ` =?unknown-8bit?q?Myl=C3=A8ne?= Josserand
2018-06-04 15:33   ` Petr Vorel
2018-04-23  9:46 ` [LTP] [RFC PATCH 7/9] testcases: df: Add "--printf" option as needed commands =?unknown-8bit?q?Myl=C3=A8ne?= Josserand
2018-04-23 10:22   ` Cyril Hrubis
2018-04-23 13:27     ` Petr Vorel
2018-04-27  9:38       ` =?unknown-8bit?q?Myl=C3=A8ne?= Josserand
2018-04-23  9:46 ` [LTP] [RFC PATCH 8/9] testcases: test.sh: Check if "getconf" is available =?unknown-8bit?q?Myl=C3=A8ne?= Josserand
2018-04-23 10:17   ` Cyril Hrubis
2018-04-27  9:39     ` =?unknown-8bit?q?Myl=C3=A8ne?= Josserand
2018-04-23  9:46 ` =?unknown-8bit?q?Myl=C3=A8ne?= Josserand [this message]
2018-04-23 10:19   ` [LTP] [RFC PATCH 9/9] testcases: cpuset: " Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180423094639.14612-10-mylene.josserand@bootlin.com \
    --to=mylene.josserand@bootlin.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.