* [LTP] [PATCH 0/4] Add dependency checking
@ 2018-07-11 12:29 Punit Agrawal
2018-07-11 12:29 ` [LTP] [PATCH 1/4] controllers/cgroup_fj_common.sh: Check for dependencies during setup Punit Agrawal
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Punit Agrawal @ 2018-07-11 12:29 UTC (permalink / raw)
To: ltp
Hi,
While investigating failures from nightly runs, I came across some
tests that don't explicitly check for dependencies.
Add appropriate check for dependencies so the tests are reported as an
issue with the configuration rather than a test failure. These set of
patches transitions ~50-60 tests from reporting failures to a
configuration issue.
Thanks,
Punit
Punit Agrawal (4):
controllers/cgroup_fj_common.sh: Check for dependencies during setup
quota_remount_test01: Add explicit check for dependencies
memcg_lib.sh: Check for killall
controllers/pids.sh: Check for killall
testcases/kernel/controllers/cgroup_fj/cgroup_fj_common.sh | 1 +
testcases/kernel/controllers/memcg/functional/memcg_lib.sh | 3 +++
testcases/kernel/controllers/pids/pids.sh | 1 +
testcases/kernel/fs/quota_remount/quota_remount_test01.sh | 4 ++++
4 files changed, 9 insertions(+)
--
2.17.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [LTP] [PATCH 1/4] controllers/cgroup_fj_common.sh: Check for dependencies during setup
2018-07-11 12:29 [LTP] [PATCH 0/4] Add dependency checking Punit Agrawal
@ 2018-07-11 12:29 ` Punit Agrawal
2018-07-11 12:29 ` [LTP] [PATCH 2/4] quota_remount_test01: Add explicit check for dependencies Punit Agrawal
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Punit Agrawal @ 2018-07-11 12:29 UTC (permalink / raw)
To: ltp
cgroup_fj_common.sh uses 'killall' in cleanup but doesn't check for it
during setup. Add killall as an explicit dependency to bail out on
systems where it's not available.
Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
---
testcases/kernel/controllers/cgroup_fj/cgroup_fj_common.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/testcases/kernel/controllers/cgroup_fj/cgroup_fj_common.sh b/testcases/kernel/controllers/cgroup_fj/cgroup_fj_common.sh
index 907881ca8..e163e5394 100755
--- a/testcases/kernel/controllers/cgroup_fj/cgroup_fj_common.sh
+++ b/testcases/kernel/controllers/cgroup_fj/cgroup_fj_common.sh
@@ -83,6 +83,7 @@ create_subgroup()
setup()
{
tst_require_root
+ tst_check_cmds killall
if [ ! -f /proc/cgroups ]; then
tst_brkm TCONF "Kernel does not support for control groups"
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [LTP] [PATCH 2/4] quota_remount_test01: Add explicit check for dependencies
2018-07-11 12:29 [LTP] [PATCH 0/4] Add dependency checking Punit Agrawal
2018-07-11 12:29 ` [LTP] [PATCH 1/4] controllers/cgroup_fj_common.sh: Check for dependencies during setup Punit Agrawal
@ 2018-07-11 12:29 ` Punit Agrawal
2018-07-11 12:29 ` [LTP] [PATCH 3/4] memcg_lib.sh: Check for killall Punit Agrawal
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Punit Agrawal @ 2018-07-11 12:29 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>
---
testcases/kernel/fs/quota_remount/quota_remount_test01.sh | 4 ++++
1 file changed, 4 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..8fa9ffc9f 100755
--- a/testcases/kernel/fs/quota_remount/quota_remount_test01.sh
+++ b/testcases/kernel/fs/quota_remount/quota_remount_test01.sh
@@ -41,6 +41,8 @@ export TCID=quota_remount_test01
export TST_TOTAL=1
export TST_COUNT=0
+. test.sh
+
if [ -z $TMPDIR ]
then
TMPDIR=/tmp
@@ -58,6 +60,8 @@ if [ ! -d /proc/sys/fs/quota ]; then
exit 0
fi
+tst_check_cmds quotacheck quotaon
+
die()
{
echo >&2 $2
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [LTP] [PATCH 3/4] memcg_lib.sh: Check for killall
2018-07-11 12:29 [LTP] [PATCH 0/4] Add dependency checking Punit Agrawal
2018-07-11 12:29 ` [LTP] [PATCH 1/4] controllers/cgroup_fj_common.sh: Check for dependencies during setup Punit Agrawal
2018-07-11 12:29 ` [LTP] [PATCH 2/4] quota_remount_test01: Add explicit check for dependencies Punit Agrawal
@ 2018-07-11 12:29 ` Punit Agrawal
2018-07-11 12:29 ` [LTP] [PATCH 4/4] controllers/pids.sh: " Punit Agrawal
2018-07-16 15:52 ` [LTP] [PATCH 0/4] Add dependency checking Jan Stancek
4 siblings, 0 replies; 7+ messages in thread
From: Punit Agrawal @ 2018-07-11 12:29 UTC (permalink / raw)
To: ltp
Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
---
testcases/kernel/controllers/memcg/functional/memcg_lib.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
index 7892f78c3..838706e1a 100755
--- a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
+++ b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
@@ -34,6 +34,9 @@ if [ $? -ne 0 ]; then
tst_brkm TBROK "getconf PAGESIZE failed"
fi
+# Check for dependencies
+tst_check_cmds killall
+
# Post 4.16 kernel updates stat in batch (> 32 pages) every time
PAGESIZES=$(( $PAGESIZE * 33 ))
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [LTP] [PATCH 4/4] controllers/pids.sh: Check for killall
2018-07-11 12:29 [LTP] [PATCH 0/4] Add dependency checking Punit Agrawal
` (2 preceding siblings ...)
2018-07-11 12:29 ` [LTP] [PATCH 3/4] memcg_lib.sh: Check for killall Punit Agrawal
@ 2018-07-11 12:29 ` Punit Agrawal
2018-07-16 15:52 ` [LTP] [PATCH 0/4] Add dependency checking Jan Stancek
4 siblings, 0 replies; 7+ messages in thread
From: Punit Agrawal @ 2018-07-11 12:29 UTC (permalink / raw)
To: ltp
Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
---
testcases/kernel/controllers/pids/pids.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/testcases/kernel/controllers/pids/pids.sh b/testcases/kernel/controllers/pids/pids.sh
index c5430eed7..fab33c415 100755
--- a/testcases/kernel/controllers/pids/pids.sh
+++ b/testcases/kernel/controllers/pids/pids.sh
@@ -32,6 +32,7 @@ TST_TESTFUNC=do_test
TST_POS_ARGS=3
TST_USAGE=usage
TST_NEEDS_ROOT=1
+TST_NEEDS_CMDS="killall"
. tst_test.sh
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [LTP] [PATCH 0/4] Add dependency checking
2018-07-11 12:29 [LTP] [PATCH 0/4] Add dependency checking Punit Agrawal
` (3 preceding siblings ...)
2018-07-11 12:29 ` [LTP] [PATCH 4/4] controllers/pids.sh: " Punit Agrawal
@ 2018-07-16 15:52 ` Jan Stancek
2018-07-16 16:20 ` Punit Agrawal
4 siblings, 1 reply; 7+ messages in thread
From: Jan Stancek @ 2018-07-16 15:52 UTC (permalink / raw)
To: ltp
----- Original Message -----
> Hi,
>
> While investigating failures from nightly runs, I came across some
> tests that don't explicitly check for dependencies.
>
> Add appropriate check for dependencies so the tests are reported as an
> issue with the configuration rather than a test failure. These set of
> patches transitions ~50-60 tests from reporting failures to a
> configuration issue.
>
> Thanks,
> Punit
>
Hi,
Pushed with the exception of patch 2.
Switching quota_remount_test01.sh away from apicmds will
likely need more changes, e.g. it should use at least
tst_exit().
If we take the effort to port this test to shell library,
it should be "tst_test.h" one.
If you're up to rewriting test for tst_test.h, that would
be preffered. Otherwise, I rather use some shell check
and avoid including "test.h" for the sole purpose of having
tst_check_cmds.
Regards,
Jan
^ permalink raw reply [flat|nested] 7+ messages in thread
* [LTP] [PATCH 0/4] Add dependency checking
2018-07-16 15:52 ` [LTP] [PATCH 0/4] Add dependency checking Jan Stancek
@ 2018-07-16 16:20 ` Punit Agrawal
0 siblings, 0 replies; 7+ messages in thread
From: Punit Agrawal @ 2018-07-16 16:20 UTC (permalink / raw)
To: ltp
Jan Stancek <jstancek@redhat.com> writes:
> ----- Original Message -----
>> Hi,
>>
>> While investigating failures from nightly runs, I came across some
>> tests that don't explicitly check for dependencies.
>>
>> Add appropriate check for dependencies so the tests are reported as an
>> issue with the configuration rather than a test failure. These set of
>> patches transitions ~50-60 tests from reporting failures to a
>> configuration issue.
>>
>> Thanks,
>> Punit
>>
>
> Hi,
>
> Pushed with the exception of patch 2.
Thanks for merging the patches.
> Switching quota_remount_test01.sh away from apicmds will
> likely need more changes, e.g. it should use at least
> tst_exit().
>
> If we take the effort to port this test to shell library,
> it should be "tst_test.h" one.
>
> If you're up to rewriting test for tst_test.h, that would
> be preffered. Otherwise, I rather use some shell check
> and avoid including "test.h" for the sole purpose of having
> tst_check_cmds.
Ok, makes sense to use a shell check. I'll send an updated patch.
I won't be able to get to rewriting the test anytime soon but I'd really
like to eliminate the false positives on the nightly runs so we can
start paying attention to the real failures on new development.
Regards,
Punit
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-07-16 16:20 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-11 12:29 [LTP] [PATCH 0/4] Add dependency checking Punit Agrawal
2018-07-11 12:29 ` [LTP] [PATCH 1/4] controllers/cgroup_fj_common.sh: Check for dependencies during setup Punit Agrawal
2018-07-11 12:29 ` [LTP] [PATCH 2/4] quota_remount_test01: Add explicit check for dependencies Punit Agrawal
2018-07-11 12:29 ` [LTP] [PATCH 3/4] memcg_lib.sh: Check for killall Punit Agrawal
2018-07-11 12:29 ` [LTP] [PATCH 4/4] controllers/pids.sh: " Punit Agrawal
2018-07-16 15:52 ` [LTP] [PATCH 0/4] Add dependency checking Jan Stancek
2018-07-16 16:20 ` Punit Agrawal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox