[LTP] [PATCH 1/4] controllers/cgroup_fj_common.sh: Check for dependencies during setup

Punit Agrawal punit.agrawal@arm.com
Wed Jul 11 14:29:22 CEST 2018


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



More information about the ltp mailing list