GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Unverified Commit 4558974f authored by boklm's avatar boklm
Browse files

Use and clean strace.tmp files

In some cases it seems that the firefox strace wrapper is killed before
reaching the end where the strace.tmp file is removed, so strace.tmp are
left.
parent 5418af50
......@@ -523,6 +523,7 @@ sub clean_strace {
my ($tbbinfos, $test) = @_;
my $logfile = "$tbbinfos->{'results-dir'}/$test->{name}.strace";
unlink $logfile;
unlink "$logfile.tmp";
}
sub parse_strace {
......@@ -530,10 +531,12 @@ sub parse_strace {
my %ignore_files = map { $_ => 1 } qw(/dev/null /dev/tty);
my %files;
my $logfile = "$tbbinfos->{'results-dir'}/$test->{name}.strace";
my $logfile_tmp = "$tbbinfos->{'results-dir'}/$test->{name}.strace.tmp";
$test->{results}{connections} = {};
my %modified_files;
my %removed_files;
my @lines = read_file($logfile) if -f $logfile;
push @lines, read_file($logfile) if -f $logfile_tmp;
foreach my $line (@lines) {
if ($line =~ m/^\d+ open\("((?:[^"\\]++|\\.)*+)", ([^\)]+)/ ||
$line =~ m/^\d+ openat\([^,]+, "((?:[^"\\]++|\\.)*+)", ([^\)]+)/) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment