From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2103) id 9E44F386C58E; Tue, 28 Jun 2022 11:35:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9E44F386C58E Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Nick Alcock To: bfd-cvs@sourceware.org, gdb-cvs@sourceware.org Subject: [binutils-gdb/binutils-2_38-branch] libctf: tests: prune warnings from compiler output X-Act-Checkin: binutils-gdb X-Git-Author: Nick Alcock X-Git-Refname: refs/heads/binutils-2_38-branch X-Git-Oldrev: 7f9a495a1673fd5c431597bed64f0428f5e389a0 X-Git-Newrev: b8a2baa80b14501113e7a3baf606c4f13a86b419 Message-Id: <20220628113508.9E44F386C58E@sourceware.org> Date: Tue, 28 Jun 2022 11:35:08 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jun 2022 11:35:08 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Db8a2baa80b14= 501113e7a3baf606c4f13a86b419 commit b8a2baa80b14501113e7a3baf606c4f13a86b419 Author: Nick Alcock Date: Sat Jun 11 13:07:18 2022 +0100 libctf: tests: prune warnings from compiler output =20 We were failing to call prune_warnings appropriately, leading to false-positive test failures on some platforms (observed on sparclinux). =20 libctf/ChangeLog: =20 * testsuite/lib/ctf-lib.exp: Prune warnings from compiler and linker output. * testsuite/libctf-regression/libctf-repeat-cu.exp: Likewise, and ar output too. Diff: --- libctf/testsuite/lib/ctf-lib.exp | 4 ++-- libctf/testsuite/libctf-regression/libctf-repeat-cu.exp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libctf/testsuite/lib/ctf-lib.exp b/libctf/testsuite/lib/ctf-li= b.exp index e7552ed6ec7..6c55bbe52aa 100644 --- a/libctf/testsuite/lib/ctf-lib.exp +++ b/libctf/testsuite/lib/ctf-lib.exp @@ -181,7 +181,7 @@ proc run_lookup_test { name } { } =20 # Compile and link the lookup program. - set comp_output [compile_link_one_host_cc $opts(lookup) "tmpdir/lookup= " "libctf.la"] + set comp_output [prune_warnings [compile_link_one_host_cc $opts(lookup= ) "tmpdir/lookup" "libctf.la"]] =20 if { $comp_output !=3D ""} { send_log "compilation of lookup program $opts(lookup) failed with <$comp_= output>" @@ -217,7 +217,7 @@ proc run_lookup_test { name } { } } =20 - set comp_output [run_host_cmd "$CC_FOR_TARGET" "$CFLAGS_FOR_TARGET $looku= p_flags [concat $src] -o $lookup_output"] + set comp_output [prune_warnings [run_host_cmd "$CC_FOR_TARGET" "$CFLAGS_F= OR_TARGET $lookup_flags [concat $src] -o $lookup_output"]] =20 if { $comp_output !=3D ""} { send_log "compilation of CTF program [concat $src] failed with <$comp= _output>" diff --git a/libctf/testsuite/libctf-regression/libctf-repeat-cu.exp b/libc= tf/testsuite/libctf-regression/libctf-repeat-cu.exp index becee958ca3..4a5d2d1d03b 100644 --- a/libctf/testsuite/libctf-regression/libctf-repeat-cu.exp +++ b/libctf/testsuite/libctf-regression/libctf-repeat-cu.exp @@ -52,12 +52,12 @@ proc one_lib_compile { src flags obj archive } { set src [file join $subsrcdir $src] } =20 - set comp_output [run_host_cmd "$CC_FOR_TARGET" "$CFLAGS_FOR_TARGET $fl= ags -gctf -fPIC -c -o $obj $src"] + set comp_output [prune_warnings [run_host_cmd "$CC_FOR_TARGET" "$CFLAG= S_FOR_TARGET $flags -gctf -fPIC -c -o $obj $src"]] if { $comp_output !=3D "" } { return $comp_output } =20 - set ar_output [run_host_cmd "$AR" "rc $archive $obj"] + set ar_output [prune_warnings [run_host_cmd "$AR" "rc $archive $obj"]] return $comp_output } =20 @@ -94,7 +94,7 @@ if [is_remote host] { set src [file join $subsrcdir libctf-repeat-cu-main.c] } =20 -set comp_output [run_host_cmd "$CC_FOR_TARGET" "$CFLAGS_FOR_TARGET -gctf -= fPIC -shared -o tmpdir/libctf-repeat-cu-main.so $src tmpdir/a.a tmpdir/b.a = tmpdir/c.a"] +set comp_output [prune_warnings [run_host_cmd "$CC_FOR_TARGET" "$CFLAGS_FO= R_TARGET -gctf -fPIC -shared -o tmpdir/libctf-repeat-cu-main.so $src tmpdir= /a.a tmpdir/b.a tmpdir/c.a"]] if { $comp_output !=3D "" } { send_log "compilation of tmpdir/libctf-repeat-cu-main.so failed" perror "compilation of tmpdir/libctf-repeat-cu-main.so failed" @@ -102,7 +102,7 @@ if { $comp_output !=3D "" } { return $comp_output } =20 -set comp_output [run_host_cmd "$OBJDUMP" "--ctf tmpdir/libctf-repeat-cu-ma= in.so > tmpdir/dump.out"] +set comp_output [prune_warnings [run_host_cmd "$OBJDUMP" "--ctf tmpdir/lib= ctf-repeat-cu-main.so > tmpdir/dump.out"]] =20 if { [regexp_diff "tmpdir/dump.out" [file join $subsrcdir libctf-repeat-c= u.d] ] } { fail $testname