From: Victor Julien Date: Thu, 26 Nov 2015 13:37:10 +0000 (+0100) Subject: wirefuzz: improve logfile cleanup X-Git-Tag: suricata-3.0.1RC1~147 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7299388d052c87ce5f61f7e662be9947c349d20e;p=thirdparty%2Fsuricata.git wirefuzz: improve logfile cleanup --- diff --git a/qa/wirefuzz.pl b/qa/wirefuzz.pl index 5b407da4b0..059e5e6719 100755 --- a/qa/wirefuzz.pl +++ b/qa/wirefuzz.pl @@ -599,15 +599,14 @@ sub clean_logs { #system("$rmcmd"); } - if ( unlink(<$logdir . unified*>) > 0 ) { - print "clean_logs: removed unified logs for next run \n"; - } - else { - print "clean_logs: failed to delete unified logs\n:"; + foreach my $file (glob "$logdir/unified2.* $logdir/*.log $logdir/*.json") { + #print $file . "\n"; + if (unlink($file) <= 0) { + print "clean_logs: failed to delete log file $file\n"; + } } - print "******************Log Cleanup Complete**********************\n"; - return; + return; } sub keep_logs {