From: Punit Agrawal <punit.agrawal@arm.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2] quota_remount_test01: Add explicit check for dependencies
Date: Tue, 17 Jul 2018 12:01:44 +0100 [thread overview]
Message-ID: <20180717110144.28118-1-punit.agrawal@arm.com> (raw)
quota_remount_test01 doesn't check for dependencies before
execution. Add explicit checks for quotacheck and quotaon and bail out
if they are not present.
Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
---
v2:
* Replaced the use of test.sh with shell commands to check for test
dependencies
.../kernel/fs/quota_remount/quota_remount_test01.sh | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/testcases/kernel/fs/quota_remount/quota_remount_test01.sh b/testcases/kernel/fs/quota_remount/quota_remount_test01.sh
index 24f41aec1..04b7af922 100755
--- a/testcases/kernel/fs/quota_remount/quota_remount_test01.sh
+++ b/testcases/kernel/fs/quota_remount/quota_remount_test01.sh
@@ -58,6 +58,16 @@ if [ ! -d /proc/sys/fs/quota ]; then
exit 0
fi
+if ! command -v quotacheck > /dev/null 2>&1; then
+ tst_resm TCONF "'quotacheck' not found"
+ exit 0
+fi
+
+if ! command -v quotaon > /dev/null 2>&1; then
+ tst_resm TCONF "'quotaon' not found"
+ exit 0
+fi
+
die()
{
echo >&2 $2
--
2.17.1
next reply other threads:[~2018-07-17 11:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-17 11:01 Punit Agrawal [this message]
2018-07-17 11:08 ` [LTP] [PATCH v2] quota_remount_test01: Add explicit check for dependencies Jan Stancek
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=20180717110144.28118-1-punit.agrawal@arm.com \
--to=punit.agrawal@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox