X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=blobdiff_plain;f=bin%2Fdiffgdb;h=ae6d4264bd0d84ab0248200cd6a61b321c660278;hp=02bc94e49a51704207ee3a7edd59271b1fd6fc50;hb=c71679fa49faf43c9a89597a090ddf8f54b67669;hpb=fcc03867351a185028784b15f07849bba08ba198 diff --git a/bin/diffgdb b/bin/diffgdb index 02bc94e..ae6d426 100755 --- a/bin/diffgdb +++ b/bin/diffgdb @@ -3,6 +3,11 @@ use strict; use warnings; my @ignore=( +qr{^.PASS: }o, +qr{^.KPASS: }o, +qr{^-FAIL: }o, +qr{^-KFAIL: }o, +qr{^-XFAIL: }o, qr{^.Test Run By }o, qr{^.gnatbind }o, qr{^.gnatlink }o, @@ -11,12 +16,11 @@ qr{^.gnatmake: }o, qr{^.gcc }o, qr{^./usr/bin/ld: .* architecture of input file .* is incompatible with .* output\n$}o, qr{^.collect2: }o, -qr{^.UNSUPPORTED: }o, -qr{^.UNTESTED: }o, -qr{^.UNRESOLVED: }o, -qr{^.ERROR: }o, -qr{^.WARNING: }o, -qr{^.Running }o, +#qr{^.UNSUPPORTED: }o, +#qr{^.UNTESTED: }o, +#qr{^.UNRESOLVED: }o, +#qr{^.ERROR: }o, +#qr{^.WARNING: }o, qr{^.[^:]*[.]ad[sb]:[0-9]}o, qr{^.(?:PASS|FAIL): gdb.server/ext-run.exp: get process list\n$}o, qr{^.(?:PASS|FAIL): gdb.base/checkpoint.exp: info checkpoints with at least 600 checkpoints\n$}o, @@ -33,6 +37,12 @@ qr{^.PASS: gdb.mi/mi-nsmoribund.exp: resume all, program exited normally\n$}o, qr{^.gdb compile failed, }o, qr{^.gdb compile failed, /usr/bin/ld: /tmp/[a-zA-Z0-9]*.o: relocation R_X86_64_32S against `a local symbol. can not be used when making a shared object; recompile with -fPIC\n$}o, qr{^./tmp/[a-zA-Z0-9]*.o: could not read symbols: Bad value\n$}o, +qr{^./tmp/[a-zA-Z0-9]*.s:\d+: Error: unrecognized symbol type "gnu_indirect_function"\n$}o, +qr{^./tmp/[a-zA-Z0-9]*.o: In function `\S+':\n$}o, +qr{^./tmp/[a-zA-Z0-9]*.o:.*: undefined reference to `.*'\n$}o, +qr{^./tmp/[a-zA-Z0-9]*.s:\d+: Error: syntax error; found `.' but expected `,'\n$}o, +qr{^./tmp/[a-zA-Z0-9]*.s:\d+: Error: junk at end of line: `.(?:plt|local)'\n$}o, +qr{^./usr/bin/ld: /tmp/[a-zA-Z0-9]*.o\(\.text\+0x[0-9a-f]+\): unresolvable R_PPC64_REL24 relocation against symbol `\S+'\n$}o, qr{^.# of }o, qr{^./home/}o, qr{^.PASS: gdb.arch/i386-biarch-core.exp: core-file /home/.*/i386-biarch-core.core\n$}o, @@ -59,14 +69,29 @@ qr{^.(?:PASS|FAIL): gdb.mi/mi-simplerun.exp: continue to end(?: \(unknown output qr{^.(?:PASS|FAIL): gdb.server/file-transfer.exp: verified deleted binary file\n$}o, qr{^.(?:PASS|FAIL): gdb.server/file-transfer.exp: deleted binary file\n$}o, qr{^.(?:PASS|FAIL): gdb.threads/attachstop-mt.exp: attach1, post-gdb sanity check of the sleeping state - Red Hat BZ 197584\n$}o, -qr{^."uplevel #0 source .*gdb/testsuite/gdb.threads/watchthreads-thr.*\.\.\."\n$}o, +qr{^."uplevel #0 source .*gdb/testsuite/gdb.threads/watchthreads-thr(?:eaded\.exp|.*\.\.\.)"\n$}o, +qr{^.(?:PASS|FAIL): gdb.cp/ref-types.exp: print value of rL\n$}o, +qr{^.FAIL: gdb.threads/watchthreads-reorder.exp: reorder[01]: (?:continue [ab]|rwatch unused1_rwatch)(?: \((?:timeout|the program exited|the program is no longer running)\))?\n$}o, +qr{^.FAIL: gdb.base/sigbpt.exp: Verify that SIGSEGV occurs at the last STEPI insn \(none 0x[0-9a-f]+\)\n$}o, +qr{^.(?:KFAIL|FAIL): gdb.base/sigbpt.exp: stepi bp at segv; stepi out of handler(?: \(corrupt pc\) \(PRMS: gdb/1702\))?\n$}o, +qr{^.(?:KFAIL|FAIL): gdb.base/sigbpt.exp: stepi bp before and at segv; stepi out of handler(?: \(corrupt pc\) \(PRMS: gdb/1702\))?\n$}o, ); my $ignore=shift @ignore; $ignore=qr/$ignore|$_/ for @ignore; -if ($ARGV[0] eq "-r") { - $ignore=undef; - shift; +my $opt_new; +while (1) { + if ($ARGV[0] eq "-r") { + $ignore=undef; + shift; + next; + } + if ($ARGV[0] eq "-N") { + $opt_new=1; + shift; + next; + } + last; } my $last; @@ -78,6 +103,7 @@ while () { next if /^diff /; my($thisname)=m{^.(?:Running (?:.*/)?|[A-Z]+: )(gdb[.]\w+/\S+[.]exp)(?: \Q...\E|: .*)$}; $thisname||=(m{^.\t\t=== gdb (Summary) ===\n$})[0]; + $thisname||=(m{^(Only in) })[0]; my $this; if (!$thisname || ($last && $thisname eq $last->{"name"})) { #if (!$thisname) { print "X: !thisname\n"; } else { print "X: \"".$last->{"name"}."\" -> \"$thisname\"\n"; } @@ -91,6 +117,9 @@ while () { print; next; } + if (/^Only in /) { + $lastfile=$_; + } if (/^--- /) { $lastfile=$_; next; @@ -101,14 +130,7 @@ while () { } $this->{"buffer"}.=$_; next if /^ /; - next if /^[+]Running / && $thisname; - next if /^[+]PASS: /; - next if /^[+]KPASS: /; - next if /^-PASS: /; - next if /^-KPASS: /; - next if /^-FAIL: /; - next if /^-KFAIL: /; - next if /^-XFAIL: /; + next if /^[+]Running / && $thisname && !$opt_new; next if $ignore && /$ignore/o; next if /^[+]FAIL: / && $this->{"+Running"}; next if /^[+]KFAIL: / && $this->{"+Running"}; @@ -120,7 +142,7 @@ while () { $this->{"print"}=1; print $lastfile||""; $lastfile=undef(); - print "\n#".$this->{"name"}."\n"; + print "\n#".($this->{"name"}||"???")."\n"; print $this->{"buffer"}; $this->{"buffer"}=undef(); next; }