All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] controllers/cpuacct: Simplify deleting directories
@ 2021-09-02 16:19 Petr Vorel
  2021-09-10 13:12   ` Petr Vorel
  0 siblings, 1 reply; 2+ messages in thread
From: Petr Vorel @ 2021-09-02 16:19 UTC (permalink / raw)
  To: ltp

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 <pvorel@suse.cz>
---
 testcases/kernel/controllers/cpuacct/cpuacct.sh | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/testcases/kernel/controllers/cpuacct/cpuacct.sh b/testcases/kernel/controllers/cpuacct/cpuacct.sh
index b2347e801..99258c266 100755
--- a/testcases/kernel/controllers/cpuacct/cpuacct.sh
+++ b/testcases/kernel/controllers/cpuacct/cpuacct.sh
@@ -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
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [LTP] [PATCH 1/1] controllers/cpuacct: Simplify deleting directories
@ 2021-09-10 13:12   ` Petr Vorel
  0 siblings, 0 replies; 2+ messages in thread
From: Petr Vorel @ 2021-09-10 13:12 UTC (permalink / raw)
  To: ltp

Hi,

merged.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-10 13:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-02 16:19 [LTP] [PATCH 1/1] controllers/cpuacct: Simplify deleting directories Petr Vorel
2021-09-10 13:12 ` Petr Vorel
2021-09-10 13:12   ` Petr Vorel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.