controllers/cpuacct: Simplify deleting directories
PATCH 1/1 controllers/cpuacct: Simplify deleting directories
by using rm -rf instead of 2x rmdir and checks for dir presence.
Also move TINFO to print it only when relevant.
Signed-off-by Petr Vorel <[email protected]>
--- testcases/kernel/controllers/cpuacct/cpuacct.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
testcases/kernel/controllers/cpuacct/cpuacct.sh +2 -5
@@ -119,13 +119,10 @@ setup() cleanup() { - tst_res TINFO "removing created directories" if [ "$testpath" ]; then - if [ -d "$testpath/subgroup_1" ]; then - rmdir $testpath/subgroup_* - fi - rmdir $testpath + tst_res TINFO "removing created directories" + rm -rf $testpath fi if [ "$mounted" -ne 1 ]; then
Signature · 1 line
2.33.0
PATCH 1/1 controllers/cpuacct: Simplify deleting directories
Hi,
merged.
Kind regards,
Petr