* [LTP] [PATCH v2] quota_remount_test01: Add explicit check for dependencies
@ 2018-07-17 11:01 Punit Agrawal
2018-07-17 11:08 ` Jan Stancek
0 siblings, 1 reply; 2+ messages in thread
From: Punit Agrawal @ 2018-07-17 11:01 UTC (permalink / raw)
To: ltp
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [LTP] [PATCH v2] quota_remount_test01: Add explicit check for dependencies
2018-07-17 11:01 [LTP] [PATCH v2] quota_remount_test01: Add explicit check for dependencies Punit Agrawal
@ 2018-07-17 11:08 ` Jan Stancek
0 siblings, 0 replies; 2+ messages in thread
From: Jan Stancek @ 2018-07-17 11:08 UTC (permalink / raw)
To: ltp
----- Original Message -----
> 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
Pushed.
Thanks,
Jan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-17 11:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-17 11:01 [LTP] [PATCH v2] quota_remount_test01: Add explicit check for dependencies Punit Agrawal
2018-07-17 11:08 ` Jan Stancek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox