From: root Date: Mon, 4 Nov 2019 14:02:36 +0000 (+0100) Subject: Merge branch 'master' of ssh://vps2.jankratochvil.net/var/lib/git/nethome X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=commitdiff_plain;h=92e2214f7cec87c6e92d988e52e3444c522cbbaa;hp=8104eca7d9cf4376bfa2eddc3c2a71b84b9d9d02 Merge branch 'master' of ssh://vps2.jankratochvil.net/var/lib/git/nethome --- diff --git a/.config/youtube-dl/config b/.config/youtube-dl/config new file mode 100644 index 0000000..5868515 --- /dev/null +++ b/.config/youtube-dl/config @@ -0,0 +1 @@ +--restrict-filenames -f bestvideo[ext=webm]+bestaudio[ext=webm]/bestvideo+bestaudio/best diff --git a/.muttrc.addons b/.muttrc.addons index 09c5352..be5d45e 100644 --- a/.muttrc.addons +++ b/.muttrc.addons @@ -63,16 +63,17 @@ macro pager g ":set pager_index_lines=10\n" # Mail command ############## bind index \ca mail -macro index M ":my_hdr X-Priority: 1\n:my_hdr Importance: high\n:set dsn_return=hdrs\n:set dsn_notify=failure,delay,success\n^a" "DSN and Priority-1 classed compose of a new mail message" -macro index m ":unmy_hdr X-Priority Importance\n:unset dsn_return dsn_notify\n^a" "Standard compose of a new mail message" +macro index M ":set dsn_return=hdrs\n:set dsn_notify=failure,delay,success\n^a" "DSN compose of a new mail message" +macro index m ":unset dsn_return dsn_notify\n^a" "Standard compose of a new mail message" # quote 'macro' argument to prevent: macro: too many arguments # `spamassassin {--report|--revoke}' calls `sa-learn {--spam|--ham}' automatically. -folder-hook "" "macro index S \":unset wait_key\n|spamassassin --report\n:set wait_key\ns=spamo-mutt\n\"" -folder-hook "=spam" "macro index S \":unset wait_key\n|spamassassin --report\n:set wait_key\nWN\ct~T\n\"" -folder-hook "" "macro pager S \":unset wait_key\n|spamassassin --report\n:set wait_key\ns=spamo-mutt\n\"" -folder-hook "=spam" "macro pager S \":unset wait_key\n|spamassassin --report\n:set wait_key\n\"" -folder-hook "" "macro index H \":unset wait_key\n|spamassassin --revoke\n:set wait_key\nWN\ct~T\n\"" -folder-hook "" "macro pager H \":unset wait_key\n|spamassassin --revoke\n:set wait_key\n\"" +set pipe_split +folder-hook "" "macro index S \":unset wait_key\n|spamassassin --report&\n:set wait_key\ns=spamo-mutt\n\"" +folder-hook "=spam" "macro index S \":unset wait_key\n|spamassassin --report&\n:set wait_key\nWN\ct~T\n\"" +folder-hook "" "macro pager S \":unset wait_key\n|spamassassin --report&\n:set wait_key\ns=spamo-mutt\n\"" +folder-hook "=spam" "macro pager S \":unset wait_key\n|spamassassin --report&\n:set wait_key\n\"" +folder-hook "" "macro index H \":unset wait_key\n|spamassassin --revoke \n:set wait_key\nWN\ct~T\n\"" +folder-hook "" "macro pager H \":unset wait_key\n|spamassassin --revoke \n:set wait_key\n\"" macro editor \ew "^a [^e]^a" # GPG @@ -95,6 +96,16 @@ ignore x-accept-language: x-sender: x-antirelay: ignore x-msmail-priority: x-mimeole: x-pop3-rcpt: delivered-to: ignore face: organization: x-scanned-by: x-bugzilla- ignore DKIM-Signature: DomainKey-Signature: X-RedHat-Spam-Score: +ignore Authentication-Results: X-Virus-Found: X-Spam-SWARE-Status: X-HELO: +ignore X-Google-DKIM-Signature: X-Gm-Message-State: X-Received: X-IsSubscribed: +ignore ARC-Seal: ARC-Message-Signature: ARC-Authentication-Results: Received-SPF: DMARC-Filter: DKIM-Filter: Auto-Submitted: X-Greylist: +ignore X-Spam-Status X-Spam-Checker-Version X-AuditID X-MTR Msgkey X-EPLocale X-EPWebmail-Msg-Type X-EPWebmail-Reply-Demand +ignore X-EPApproval-Locale X-EPHeader X-EPTrCode X-EPTrName X-MLAttribute X-RootMTR X-ParentMTR X-ArchiveUser X-CPGSPASS +ignore X-Brightmail-Tracker X-ClientProxiedBy X-MS-PublicTrafficType X-MS-Office365-Filtering-Correlation-Id X-Microsoft-Antispam +ignore X-Microsoft-Exchange-Diagnostics X-MS-TrafficTypeDiagnostic X-Microsoft-Antispam-PRVS +ignore X-Exchange-Antispam-Report-Test X-Exchange-Antispam-Report-CFA-Test SpamDiagnosticOutput SpamDiagnosticMetadata +ignore X-Forefront-PRVS X-Forefront-Antispam-Report X-MS-Exchange-CrossTenant-OriginalArrivalTime +ignore X-MS-Exchange-CrossTenant-FromEntityHeader X-MS-Exchange-Transport-CrossTenantHeadersStamped X-OriginatorOrg color header brightyellow black ^(From|Subject|To|Cc|Bcc|Message-ID): # Colors diff --git a/bin/changelogget b/bin/changelogget index d621915..578f1d5 100755 --- a/bin/changelogget +++ b/bin/changelogget @@ -21,6 +21,7 @@ function formatpatch if [ "$*" = "-f" ];then formatpatch else for arg in "$@";do + arg="$(echo "$arg"|sed 's/^https:/http:/')" # http://sourceware.org/ml/gdb-cvs/2099-99/msg99999.html if [ "$arg" != "${arg#http://sources.redhat.com/}" ];then arg="http://sourceware.org/${arg#http://sources.redhat.com/}" diff --git a/bin/hammock b/bin/hammock index d3851e7..75dc23e 100755 --- a/bin/hammock +++ b/bin/hammock @@ -7,15 +7,17 @@ use Getopt::Long qw(:config no_ignore_case); use Carp qw(&carp); my $start=time(); -my $gdbcvsmaster=$ENV{"HOME"}."/redhat/gdb-cvs-master"; -my $binutilscvsmaster=$ENV{"HOME"}."/redhat/binutils-cvs-master"; -my $archermaster=$ENV{"HOME"}."/redhat/gdb-master"; -my $fedoragitroot=q{git://pkgs.fedoraproject.org}; +my $sourcewaregdbgit="git://sourceware.org/git/binutils-gdb.git"; +#my $sourcewaregdbgit="https://gitorious.org/gdb/gdb.git"; +my $gdbgitmaster=$ENV{"HOME"}."/redhat/gdb-master"; +my $fedoragitroot=q{git://pkgs.fedoraproject.org/rpms}; my $rhelgitroot=q{git://pkgs.devel.redhat.com/rpms}; +my $sourcewaregit=q{git://pkgs.devel.redhat.com/rpms}; my $arch_i386=qr{(?:x86|i\d86|ia32)}io; my $arch_x86_64=qr{(?:x8664|x86_64|em64t)}io; my $resultdir=$ENV{"HOME"}."/.hammock-result"; my @arches=qw(i386 x86_64); +#$ENV{"CCACHE_DISABLE"}="1";delete $ENV{"CCACHE_NODISABLE"}; my $error=0; sub error @@ -40,7 +42,7 @@ my $configure; my $branch; # FIXME: Connect make paralellization to the children. my $distrojobs; -my $gdbcvspie; +my $gdbgitpie; my $strip; # FIXME: 20100911servpatched-f14: # readchar: Connection reset by peer @@ -53,13 +55,14 @@ my $bfd32; my $gdbindex; my $dwz; my $dwarf; -# Use --dwarf=40 for: --dwarf=4 -fno-debug-types-section -# Use --dwarf=41 for: --dwarf=4 -fdebug-types-section +# Use --dwarf=X0 for: --dwarf=X -fno-debug-types-section +# Use --dwarf=X1 for: --dwarf=X -fdebug-types-section my $optimg; my $stabs; my $debug_types_section; my $orphanripper=1; my $options; +my $asan; die if !GetOptions( "i|userid=s"=>\$userid, "force"=>\$force, @@ -77,7 +80,7 @@ die if !GetOptions( "D|distrojobs=s"=>\$distrojobs, "configure=s"=>\$configure, "branch=s"=>\$branch, - "gdbcvspie"=>\$gdbcvspie, + "gdbgitpie"=>\$gdbgitpie, "strip"=>\$strip, "gdbserver"=>\$gdbserver, "valgrind"=>\$valgrind, @@ -89,30 +92,29 @@ die if !GetOptions( "stabs=i"=>\$stabs, "orphanripper!"=>\$orphanripper, "options=s"=>\$options, + "asan"=>\$asan, ); -$component and ($component=~m{^(?:(?:fedora|rhel)(?:gdb|binutils|glibc)|gdbcvs|binutilscvs|archer-.*|/home/.*)$} or die "-c|--component required to be: fedoragdb|rhelgdb|fedorabinutils|rhelbinutils|fedoraglibc|rhelglibc|gdbcvs|binutilscvs|archer-*|/home/*"); +$component and ($component=~m{^(?:(?:fedora|rhel)(?:gdb|binutils|glibc)|gdbgit|/home/.*)$} or die "-c|--component required to be: fedoragdb|rhelgdb|fedorabinutils|rhelbinutils|fedoraglibc|rhelglibc|gdbgit|/home/*"); $component and $component=~m{^/home/} and (-f "$component/gdb/gdbtypes.c" or die "$component/gdb/gdbtypes.c not found"); $component and $srcrpm and die "-c|--component excludes -s|--srcrpm"; $component or $srcrpm or die "-c|--component or -s|--srcrpm required"; $component||=""; # Make `eq' not complaining. -my $cvsbranch; -if ($component=~/^(gdb|binutils)cvs$/) { - $cvsbranch=(!$branch?"":"-r $branch"); # "-A" is broken with new sourceware.org - $gdbcvsmaster=$ENV{"HOME"}."/redhat/gdb-cvs-master74" if ($branch||"") eq "gdb_7_4-branch"; -} else { - die "--branch currently unsupported for non-CVS sources" if $branch; +if ($component ne "gdbgit") { +# $gitbranch=(!$branch?"":"-r $branch"); # "-A" is broken with new sourceware.org + die "--branch currently unsupported for non-GIT sources" if $branch; } -!$gdbcvspie or $component eq "gdbcvs" or die "--gdbcvspie requires -c gdbcvs"; +$branch||="master"; +!$gdbgitpie or $component eq "gdbgit" or die "--gdbgitpie requires -c gdbgit"; @target and ($srcrpm or $component=~/^(?:fedora|rhel)/) and die "--target is available only for baretestsuite modes"; $strip and ($srcrpm or $component=~/^(?:fedora|rhel)/) and die "--strip is available only for baretestsuite modes"; $options and ($srcrpm or $component=~/^(?:fedora|rhel)/) and die "--options is available only for baretestsuite modes"; -$gdbserver and $component!~/^(?:gdbcvs|archer-.*)$/ and die "--gdbserver is available only for gdbcvs or archer-*"; -$valgrind and $component!~/^(?:gdbcvs|archer-.*)$/ and die "--valgrind is available only for gdbcvs or archer-*"; +$gdbserver and $component!~m{^(?:gdbgit|/home/.*)$} and die "--gdbserver is available only for gdbgit||/home/*"; +$valgrind and $component!~m{^(?:gdbgit|/home/.*)$} and die "--valgrind is available only for gdbgit||/home/*"; +$asan and $component!~m{^(?:gdbgit|/home/.*)$} and die "--asan is available only for gdbgit||/home/*"; $gdbserver and $valgrind and die "--gdbserver and --valgrind are mutually exclusive"; ($gdbserver || $valgrind) and ($gdbindex || $dwz) and die "--gdbserver|--valgrind and --gdbindex|--dwz are mutually exclusive"; -do { $debug_types_section=0; $dwarf=4; } if ($dwarf||0)==40; -do { $debug_types_section=1; $dwarf=4; } if ($dwarf||0)==41; -!defined $dwarf or ($dwarf>=2 && $dwarf<=4) or die "--dwarf requires DWARF version number"; +do { $debug_types_section=$dwarf%10; $dwarf=int($dwarf/10); } if ($dwarf||0)>=40; +!defined $dwarf or ($dwarf>=2 && $dwarf<=5) or die "--dwarf requires DWARF version number"; !defined $stabs or ($stabs>=0 && $stabs<=2) or die "--stabs is 0=off or 1=-gstabs or 2=-gstabs+"; ($gdbserver || $valgrind || $gdbindex || $dwz) and ($dwarf || $stabs) and die "--gdbserver|--valgrind|--gdbindex and --dwarf|--stabs are mutually exclusive"; $orphanripper=($orphanripper?"orphanripper":""); @@ -122,9 +124,11 @@ do { error "Duplicate target: $_\n" if $target{$_}++; } for @target; for my $file (@file) { -f $file and -r $file or error "-f|--file $file not readable: $!"; } -###push @file,"/home/jkratoch/redhat/fedora/gdb/master/gdb-index-assert.patch" if $component=~/^(?:gdbcvs|archer-)/; -###push @file,"/home/jkratoch/redhat/fedora/gdb/master/gdb-dejagnu-go.patch" if $component=~/^(?:gdbcvs|archer-)/; +###push @file,"/home/jkratoch/redhat/fedora/gdb/master/gdb-index-assert.patch" if $component eq "gdbgit"; +###push @file,"/home/jkratoch/redhat/fedora/gdb/master/gdb-dejagnu-go.patch" if $component eq "gdbgit"; +###push @file,"/home/jkratoch/t/signed32.patch" if $component eq "gdbgit"; $distrojobs=(@target?1:2) if !defined $distrojobs; +###$distrojobs=1; # FIXME $distrojobs=~/^\d+$/ or die "-D|distrojobs must be a number: $distrojobs"; $distrojobs>=1 or die "-D|distrojobs must be positive: $distrojobs"; error "Excessive arguments: @ARGV" if @ARGV; @@ -132,9 +136,10 @@ error "Excessive arguments: @ARGV" if @ARGV; my $path=join(":",@path) if @path; @componentdistro and @componentdistro!=@distro and die "--cd|--componentdistro must have the same elements count as -d|--distro"; -#FIXME:push @file,"/home/jkratoch/t/gdbserverasyncnonstop.patch" if $component=~/^(?:gdbcvs|archer-)/; -push @file,"/home/jkratoch/t/watchpointfork2.patch" if $component=~/^(?:gdbcvs|archer-)/; -#push @file,"/home/jkratoch/t/gdb-breakpointchanged.patch" if $component=~/^(?:gdbcvs|archer-)/; +#FIXME:push @file,"/home/jkratoch/t/gdbserverasyncnonstop.patch" if $component eq "gdbgit"; +push @file,"/home/jkratoch/t/watchpointfork2.patch" if $component eq "gdbgit"; +#push @file,"/home/jkratoch/t/or1k-m32.patch" if $component eq "gdbgit"; +#push @file,"/home/jkratoch/t/gdb-breakpointchanged.patch" if $component eq "gdbgit"; sub distro_normalize($;$) { @@ -260,7 +265,8 @@ sub ln($$) # /etc/cgconfig.conf spawn "cgclassify -g '*':hammock $$ || :"; -spawn "renice +19 -p $$"; +#spawn "renice +19 -p $$"; +spawn "renice +5 -p $$||:"; spawn "ionice -c3 -p $$"; newdir $dir; $log="$dir/log"; @@ -279,7 +285,7 @@ my %dump=( "srcrpm"=>$srcrpm, "file"=>join("\n",@file), "configure"=>$configure, - "gdbcvspie"=>$gdbcvspie, + "gdbgitpie"=>$gdbgitpie, "gdbserver"=>$gdbserver, "valgrind"=>$valgrind, "bfd32"=>$bfd32, @@ -344,14 +350,11 @@ while (@distrouse || keys(%child)) { my $distro=$distrouse->{"distro"}; my $componentdistro=$distrouse->{"componentdistro"}; my $target=$distrouse->{"target"}; - my $rpmbuild="rpmbuild"; + my $rpmbuild="rpmbuild --with buildisa"; - my $cvsbasedir; my $gitbranch; my $gitpkg; - my $cvsroot; my $gitroot; - my $cvsrepo; my $gitrepo; if ($component=~/^fedora(.*)$/) { $gitrepo=$1; @@ -366,6 +369,7 @@ while (@distrouse || keys(%child)) { $gitbranch="auto"; $gitroot=$rhelgitroot; $gitpkg="https_proxy= rhpkg"; + #$gitpkg="https_proxy= fedpkg --dist master"; # EPEL still uses Berkeley DB version 8 while F-11+ (F-10?) uses version 9. # Using db_dump and db_load would no longer make it mock compatible. $rpmbuild.=q{ --dbpath $PWD --nodeps}; @@ -405,7 +409,9 @@ while (@distrouse || keys(%child)) { $c="export LD_LIBRARY_PATH=\"$prefixpath/lib64:$prefixpath/lib\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH}\"; $c"; } $c="export PATH=\"\$HOME/bin:\$PATH\"; $c"; - $c="export MAKEFLAGS=\"-j\$[`getconf _NPROCESSORS_ONLN`*3/2]\"; $c"; + # $c="export MAKEFLAGS=\"-j\$[`getconf _NPROCESSORS_ONLN`*3/2]\"; $c"; + # gdbgit: 16=6m5s 32=5m49s(seen OOM) 64=5m42s + $c="export MAKEFLAGS=\"-j24\"; $c"; $c="export http_proxy=http://127.0.0.1:3128/; $c"; $c="set -ex; cd $builddir; $c"; die "found ': $c" if $c=~/'/; @@ -446,62 +452,29 @@ while (@distrouse || keys(%child)) { $srcrpm=$srcrpm[0]; } - if ($cvsbasedir) { - die if !$cvsroot; - die if !$cvsrepo; - die if !$cvsbasedir; - spawn "cd $distrodir; cvs -q -z3 -d $cvsroot co rpms/$cvsrepo/$cvsbasedir"; - my $componentdir="$distrodir/rpms/$cvsrepo/$cvsbasedir"; - -d $componentdir or die "Failed checkout to: $componentdir"; - # Required for RHEL; Fedora does so automatically. - spawn "cd $componentdir/..; cvs -q -z3 -d $cvsroot co common"; - # Workaround (RHEL-5?) curl which uses `Pragma: nocache' on $http_proxy. - subst sub { s{echo "curl }{$&-H 'Pragma: cache' }; },"$componentdir/../common/Makefile.common"; - copyfiles $componentdir; - spawn "cd $componentdir; make verrel >$out/verrel"; - my $glob="$componentdir/*.src.rpm"; - @{[glob $glob]}==0 or die "Found some before test-srpm: $glob"; - # No `spawn' as we could get: - # error: unpacking of archive failed on file X;4a56efef: cpio: MD5 sum mismatch - mockrun "cd $componentdir; make test-srpm"; - my @srcrpm=(glob $glob); - @srcrpm==1 or die "Did not find 1 srcrpm: @srcrpm"; - $srcrpm=$srcrpm[0]; - } - if ($srcrpm) { my $srcrpmbasename=$srcrpm; $srcrpmbasename=~s{^.*/}{}; spawn "cp -p $srcrpm $builddir/$srcrpmbasename"; my $rpmbuildlocal=$rpmbuild.q{ --define "_topdir $PWD" --define "_builddir $PWD" --define "_rpmdir $PWD" --define "_sourcedir $PWD" --define "_specdir $PWD" --define "_srcrpmdir $PWD" --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm"}; - $rpmbuildlocal="$orphanripper $rpmbuildlocal" if $cvsrepo && $cvsrepo eq "glibc"; + # $rpmbuildlocal="$orphanripper $rpmbuildlocal" if $gitrepo && $gitrepo eq "glibc"; mockrun $rpmbuildlocal." --rebuild --with testsuite $srcrpmbasename"; } my $baretestsuite; - if ($component=~/^(gdb|binutils)cvs$/) { - my $which=$1; - my $cvsmaster=$which eq "gdb" ? $gdbcvsmaster : $binutilscvsmaster; - if (-d $cvsmaster) { - spawn "cp -a $cvsmaster $builddir/src; cd $builddir/src; cvs update $cvsbranch"; - } else { - spawn "cd $builddir; cvs -q -z3 -d :pserver:anoncvs:\@sourceware.org:/cvs/src co $cvsbranch $which"; - } - spawn "cd $builddir/src; test -z \"\$(cvs update $cvsbranch)\""; - $baretestsuite="$builddir/src"; - } - - if ($component=~/^archer-/) { - spawn "git clone ".(!-d $archermaster ? "" : "--reference $archermaster")." git://sourceware.org/git/archer.git $builddir/$component"; - spawn "cd $builddir/$component; git fetch"; - spawn "cd $builddir/$component; git checkout -b $component origin/$component; [ \"`git status`\" = \"# On branch $component\nnothing to commit (working directory clean)\" ]"; + if ($component eq "gdbgit") { + spawn "git clone ".(!-d $gdbgitmaster ? "" : "--reference $gdbgitmaster")." -b $branch $sourcewaregdbgit $builddir/$component"; + #spawn "cd $builddir/$component; git fetch"; + spawn "cd $builddir/$component; git pull"; +### spawn "cd $builddir/$component; git checkout -b $component origin/$component; [ \"`git status`\" = \"# On branch $component\nnothing to commit (working directory clean)\" ]"; $baretestsuite="$builddir/$component"; } if ($component=~m{^/home/}) { - spawn "cp -a $component $builddir/src; cd $builddir/src; find -name \"*.[oa]\" -o -name \"*.l[oa]\" -o -name gdb.sum -o -name gdb.log|xargs rm -f; make clean || :"; + # spawn "cp -a $component $builddir/src; cd $builddir/src; find -name \"*.[oa]\" -o -name \"*.l[oa]\" -o -name gdb.sum -o -name gdb.log|xargs rm -f; make clean || :"; + spawn "git clone $component $builddir/src; cd $builddir/src"; $baretestsuite="$builddir/src"; } @@ -517,24 +490,29 @@ while (@distrouse || keys(%child)) { -f $target or $file=~m{/testsuite/} or die "File $file does not exist at $target"; spawn "rm -f $target; cp -p $file $target"; } + spawn "rm -f $baretestsuite/gdb/testsuite/dg-extract-results.py"; ### Fedora gdb-no-dg-extract-results-py.patch } my $errs12="errs12"; + $errs12.=" --noasan" if !$asan; $errs12.=" -s" if $strip; $errs12.=" --target=$target" if $target; + #$errs12.=" --disable-binutils --disable-gas --disable-gold --disable-gprof --disable-ld"; + #$errs12.=" --binutils" if $gdbindex; # for objcopy but that is needed only for cross-targets $errs12.=" $options" if $options; $errs12.=" $configure" if $configure; - if ($component eq "binutilscvs") { - mockrun "cd $baretestsuite; $errs12; ulimit -c unlimited; $orphanripper make -k check || :; ".q{for file in {gas/testsuite/gas,ld/ld,binutils/binutils}.{sum,log};do ln $file}." $out/binutils-$distro-".q{$(basename $file) || :; done;}; - } else { +# if ($component eq "binutilsgit") { +# mockrun "cd $baretestsuite; $errs12; ulimit -c unlimited; $orphanripper make -k check || :; ".q{for file in {gas/testsuite/gas,ld/ld,binutils/binutils}.{sum,log};do ln $file}." $out/binutils-$distro-".q{$(basename $file) || :; done;}; +# } + { if ($valgrind) { # FIXME do { unlink $_ or warn "$_: $!"; } for "$baretestsuite/gdb/testsuite/gdb.base/break-interp.exp"; } my @check=($distro=~/-x86_64/ ? qw(-m64 -m32) : -m32); @check=map("check//unix/$_",@check); - @check=map({($_,"$_/-fPIE/-pie");} @check) if $gdbcvspie; + @check=map({($_,"$_/-fPIE/-pie");} @check) if $gdbgitpie; my %flags=("CC_FOR_TARGET" =>"gcc", "CXX_FOR_TARGET" =>"g++", "GO_FOR_TARGET" =>"gccgo", @@ -552,6 +530,18 @@ while (@distrouse || keys(%child)) { # .(!$valgrind?"":' RUNTESTFLAGS=--target_board=valgrind') # .(!$valgrind?"":' HAMMOCK_VALGRIND=1') # .(!$valgrind?"":' --without-python') # FIXME: Fix valgrind --suppressions + if ($gdbindex||$dwz) { + for my $key (keys(%flags)) { + writefile "$baretestsuite/hammock-$key",'' + .' GDB="'.$baretestsuite.'/gdb/gdb -data-directory '.$baretestsuite.'/gdb/data-directory"' + .' GDB_ADD_INDEX='.$baretestsuite.'/gdb/contrib/gdb-add-index.sh' + .' '.$baretestsuite.'/gdb/contrib/cc-with-tweaks.sh ' + .(!$gdbindex?'':' -i') + .(!$dwz?'':' -m') + .' '.$flags{$key}.' "$@"' + ."\n"; + } + } mockrun "cd $baretestsuite;" ." $errs12" .(!$bfd32?"":' --disable-64-bit-bfd') @@ -561,11 +551,7 @@ while (@distrouse || keys(%child)) { ." RUNTESTFLAGS=DUMMY=dummy" .(!$gdbserver?"":' RUNTESTFLAGS=--target_board=native-gdbserver') # Missing GNATMAKE_FOR_TARGET! - .(!($gdbindex||$dwz)?"":' RUNTESTFLAGS="'.join(' ',map($_.'=/bin/sh\ $PWD/contrib/cc-with-tweaks.sh' - .(!$gdbindex?"":'\ -i') - .(!$dwz?"":'\ -m') - .'\ '.$flags{$_},keys(%flags))).'"') - #.(!$gdbindex?"":' RUNTESTFLAGS="'.join(' ',map($_.'=/bin/sh\ $PWD/cc-with-index.sh\ '.$flags{$_},keys(%flags))).'"') + .(!($gdbindex||$dwz)?"":' RUNTESTFLAGS="'.join(' ',map("$_=/bin/sh\\ $baretestsuite/hammock-$_",keys(%flags))).'"') .(!$dwarf?"":runtestcc "-gdwarf-$dwarf".(!defined $debug_types_section?"":'\ '.($debug_types_section?"-fdebug-types-section":"-fno-debug-types-section"))." -g0") .(!$optimg?"":runtestcc "-Og -g0") .(!$stabs?"":runtestcc(($stabs==1?"-gstabs":"-gstabs+")." -g0")) @@ -591,7 +577,7 @@ while (@distrouse || keys(%child)) { } if (@testinlog) { subst sub { s{^.*?\n($testinlog[0]\n.*\n$testinlog[1]\n).*$}{$1}s; },$log,$out; - } elsif ($cvsbasedir || $srcrpm) { + } elsif ($srcrpm) { # Applies both to gdb and binutils. spawn "mv $out $out.x; gdbunpack $log; mv $out.x/* $out/; rmdir $out.x"; } diff --git a/bin/rpmsafe b/bin/rpmsafe new file mode 100755 index 0000000..54f771e --- /dev/null +++ b/bin/rpmsafe @@ -0,0 +1,2 @@ +#! /bin/bash +rpm -Vva 2>/dev/null|perl -ne 'BEGIN{use Cwd qw(realpath);}print if s/^[.]{7}[.T][.] [^g] //;' diff --git a/bin/rpmsafereduce b/bin/rpmsafereduce new file mode 100755 index 0000000..73c91ea --- /dev/null +++ b/bin/rpmsafereduce @@ -0,0 +1,68 @@ +#! /usr/bin/perl +# rpmsafe|sort -u|rpmsafereduce >EXCLUDEFILE +use strict; +use warnings; +sub slashes($) { + my($s)=@_; + (my $sl=$s)=~tr{/}{}cd; + $sl=length $sl; + $sl>=1 or die $_; + return $sl; +} +my(%d,%f,%t); +my $l; +while (<>) { + chomp; + next if $_ eq "/"; + die $_ if m{//}; + m{^/} or die $_; + die $_ if m{/$}; + die "sort -u: $l >= $_" if $l && $l ge $_; + $l=$_; + my $sl=slashes $_; + $d{$_}=$sl if -d; + $f{$_}=$sl if -f; + s{/[^/]*$}{} or die $_; + $t{$_}=1 if $d{$_}; +} +my $time; +while (%t) { + my @t=keys(%t); + %t=(); + #warn((@t+0)."\n"); + @t=sort { ($f{$b}||$d{$b}) <=> ($f{$a}||$d{$a}) || $a cmp $b; } @t; + while (@t) { + if (defined $time&&time()!=$time) { + $time=time(); + print STDERR (@t+0)." \r"; + } + my $t=shift @t; + next if !$d{$t}&&!$f{$t}; + opendir DIR,$t or die "$t: $!"; + my $ok=1; + local $_; + my @d; + for my $d (readdir DIR) { + push @d,$d; + next if $d eq "."; + next if $d eq ".."; + next if $f{"$t/$d"}; + next if $d{"$t/$d"}; + $ok=0; + last; + } + closedir DIR or die "$t: $!"; + next if !$ok; + for my $d (@d) { + delete $f{"$t/$d"}; + delete $t{"$t/$d"}; + } + $f{$t}=slashes $t; + $t=~s{/[^/]*$}{} or die $t; + $d{$t}=slashes $t; + $t{$t}=1; + } +} +for my $f (sort keys(%f)) { + print "$f\n"; +} diff --git a/bin/runtest b/bin/runtest index 8bebb52..d6944a5 100755 --- a/bin/runtest +++ b/bin/runtest @@ -1,6 +1,6 @@ #! /bin/sh #sync -ulimit -v 1000000 +#asan: ulimit -v 1000000 ulimit -c unlimited ignore="" ignore="$ignore checkpoint.exp multi-forks.exp foll-fork.exp" @@ -8,4 +8,9 @@ ignore="$ignore mi-file-transfer.exp" #ignore="$ignore break-interp.exp" ignore="$ignore interrupt.exp" # x86_64-32 only, Bug 509069 #ignore="$ignore ext-run.exp" +ignore="$ignore enable.exp exception.exp function_call_history.exp rn-dl-bind.exp segv.exp unknown_functions.exp data.exp enable.exp exception.exp function_call_history.exp rn-dl-bind.exp unknown_functions.exp vdso.exp multi-thread-step.exp" # gdb.btrace/ +ignore="$ignore attach-many-short-lived-threads.exp non-stop-fair-events.exp gdb-sigterm.exp" +export ASAN_OPTIONS=symbolize=1 +export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer +export CCACHE_DISABLE=1;unset CCACHE_NODISABLE exec nice /usr/bin/runtest --ignore "$ignore" "$@"