[1/1] network.sh: Cleanup netpan logs

Message ID 20180610101309.8201-1-pvorel@suse.cz
State Accepted
Delegated to: Petr Vorel
Headers show
Series
  • [1/1] network.sh: Cleanup netpan logs
Related show

Commit Message

Petr Vorel June 10, 2018, 10:13 a.m.
network.sh script doesn't delete it's logs, which can lead to fill /tmp.
Remove these files, which unify behavior with runltp and runltplite.sh
(just don't use trap to force remove on INT).

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testscripts/network.sh | 2 ++
 1 file changed, 2 insertions(+)

Comments

Petr Vorel June 10, 2018, 10:23 a.m. | #1
Hi,

> network.sh script doesn't delete it's logs, which can lead to fill /tmp.
> Remove these files, which unify behavior with runltp and runltplite.sh
> (just don't use trap to force remove on INT).

...
>  testscripts/network.sh | 2 ++
...
> @@ -121,3 +121,5 @@ if [ $? -eq "0" ]; then
>  else
>  	echo ltp-pan reported FAIL
>  fi
> +
> +rm -rf $TMPDIR

I suppose there is no reason to keep ltp-net logs, that it was left by accident.
This patch keeps /tmp/netpan.log, but that's just one file.


Kind regards,
Petr
Alexey Kodanev June 14, 2018, 10:38 a.m. | #2
On 10.06.2018 13:13, Petr Vorel wrote:
> network.sh script doesn't delete it's logs, which can lead to fill /tmp.
> Remove these files, which unify behavior with runltp and runltplite.sh
> (just don't use trap to force remove on INT).
> 
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
Acked-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Petr Vorel June 14, 2018, 11:34 a.m. | #3
Hi Alexey,

> On 10.06.2018 13:13, Petr Vorel wrote:
> > network.sh script doesn't delete it's logs, which can lead to fill /tmp.
> > Remove these files, which unify behavior with runltp and runltplite.sh
> > (just don't use trap to force remove on INT).

> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> Acked-by: Alexey Kodanev <alexey.kodanev@oracle.com>

Thanks, pushed!


Kind regards,
Petr

Patch

diff --git a/testscripts/network.sh b/testscripts/network.sh
index c946e4d86..78257d8db 100755
--- a/testscripts/network.sh
+++ b/testscripts/network.sh
@@ -121,3 +121,5 @@  if [ $? -eq "0" ]; then
 else
 	echo ltp-pan reported FAIL
 fi
+
+rm -rf $TMPDIR