From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by sourceware.org (Postfix) with ESMTPS id 8A75A394504F for ; Fri, 12 Feb 2021 08:29:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8A75A394504F Received: by mail-pl1-x62e.google.com with SMTP id e9so4735794plh.3 for ; Fri, 12 Feb 2021 00:29:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=8nQ38Gqw0CVyUjpY9tBxxKmlxjaBzDpiWASQ/4g0tnw=; b=Bg5XmOWLwzuwDsSvhwWTZgKQ1IHv97Wa3mTQSb7YRQ/XL20+wfUYzXI6c8QQ6twF6o y89LshzmDFyz+O+Ypu9bu0mKWja1i/bWurrAU60oUEr30nPEz0CNRMDgXmjMnwX8XCj4 n+3PSe2Mj4izBExZ18AlkSFFyaP/WLnMn7hnnwQuIHG1SsVcpbJWd4d8Lx+NYwReTXiv zE9yK6h33ybHhnJ2+SZGjARP4vhd+6LSa3cJfL524qesXe1MtRgCI1a6ohxuirwx2XLD uoU4M5isSUGbPHnf2aw6U3yRn9ECo7SSFHxkoNfaWXB2ksIKikSYo8cNM/i/dXZn1bDy H8yA== X-Gm-Message-State: AOAM532uiTkMbGx2cIKBFqUe4pOL+brp5UkvzJKbmTI8jtYrDlJAU7Ub f396VqXoQtGVrAc3RV9FBzJOgxRMS1f6OQ== X-Google-Smtp-Source: ABdhPJzK6Pnnwf9rLDfOY0vte0ihH9kxCyxBP968svCxuWwH+eCAwniX4BbDY98bKEomcmqJyCb7Sw== X-Received: by 2002:a17:90a:474f:: with SMTP id y15mr1801604pjg.110.1613118547094; Fri, 12 Feb 2021 00:29:07 -0800 (PST) Received: from bubble.grove.modra.org ([2406:3400:51d:8cc0:68ab:af03:acc2:ee1d]) by smtp.gmail.com with ESMTPSA id e3sm7823327pgs.60.2021.02.12.00.29.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Feb 2021 00:29:06 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id EBBA041AD5; Fri, 12 Feb 2021 18:59:02 +1030 (ACDT) Date: Fri, 12 Feb 2021 18:59:02 +1030 From: Alan Modra To: binutils@sourceware.org Subject: binutils testsuite: replace unresolved with unsupported Message-ID: <20210212082902.GA5348@bubble.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-3039.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Feb 2021 08:29:11 -0000 You'd think "unresolved" would be correct for an objcopy test when the assembler refuses to assemble one of our source files. After all, the test of objcopy hasn't been run. However, "unresolved" results in runtest returning with an error status. If instead we report "unsupported", runtest returns success. Which is a little less confusing to a user who doesn't see any errors reported unless they look in log files. * testsuite/binutils-all/objcopy.exp: Report "unsupported" when gas or ld fails to build a testcase rather than "unresolved". Report "fail" when readelf returns an error status rather than "unresolved". * testsuite/binutils-all/ar.exp: Likewise. * testsuite/binutils-all/compress.exp: Likewise. * testsuite/binutils-all/readelf.exp: Likewise. diff --git a/binutils/testsuite/binutils-all/ar.exp b/binutils/testsuite/binutils-all/ar.exp index 6d640eab900..86f84242b28 100644 --- a/binutils/testsuite/binutils-all/ar.exp +++ b/binutils/testsuite/binutils-all/ar.exp @@ -195,7 +195,7 @@ proc symbol_table { } { set testname "ar symbol table" if ![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.${obj}] { - unresolved $testname + unsupported $testname return } @@ -244,7 +244,7 @@ proc thin_archive { bfdtests } { set testname "ar thin archive" if ![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.${obj}] { - unresolved $testname + unsupported $testname return } @@ -302,7 +302,7 @@ proc thin_archive_with_nested { bfdtests } { set testname "ar thin archive with nested archive" if ![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.${obj}] { - unresolved $testname + unsupported $testname return } @@ -375,7 +375,7 @@ proc argument_parsing { } { set testname "ar argument parsing" if ![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.${obj}] { - unresolved $testname + unsupported $testname return } @@ -412,7 +412,7 @@ proc deterministic_archive { } { set testname "ar deterministic archive" if ![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.${obj}] { - unresolved $testname + unsupported $testname return } @@ -461,7 +461,7 @@ proc unique_symbol { } { set testname "ar unique symbol in archive" if ![binutils_assemble $srcdir/$subdir/unique.s tmpdir/unique.${obj}] { - unresolved $testname + unsupported $testname return } @@ -503,7 +503,7 @@ proc delete_an_element { } { set testname "ar deleting an element" if ![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.${obj}] { - unresolved $testname + unsupported $testname return } @@ -545,7 +545,7 @@ proc move_an_element { } { set testname "ar moving an element" if ![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.${obj}] { - unresolved $testname + unsupported $testname return } @@ -626,7 +626,7 @@ proc extract_an_element { } { set testname "ar extracting an element" if ![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.${obj}] { - unresolved $testname + unsupported $testname return } @@ -686,7 +686,7 @@ proc many_files { } { set ofile "tmpdir/d-$i.${obj}" if ![binutils_assemble $sfile $ofile] { - unresolved $testname + unsupported $testname return } @@ -725,7 +725,7 @@ proc test_add_dependencies { } { set testname "ar adding library dependencies" if ![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.${obj}] { - unresolved $testname + unsupported $testname return } diff --git a/binutils/testsuite/binutils-all/compress.exp b/binutils/testsuite/binutils-all/compress.exp index 7009bd53a04..e0e04f072e5 100644 --- a/binutils/testsuite/binutils-all/compress.exp +++ b/binutils/testsuite/binutils-all/compress.exp @@ -589,7 +589,7 @@ proc convert_test { testname as_flags objcop_flags } { global OBJDUMP if { ![binutils_assemble_flags $srcdir/$subdir/dw2-3.S ${testfile3}.o "$as_flags"] } then { - unresolved "$testname" + unsupported "$testname" return } diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp index 8ccca36b3e4..ef251876a02 100644 --- a/binutils/testsuite/binutils-all/objcopy.exp +++ b/binutils/testsuite/binutils-all/objcopy.exp @@ -54,7 +54,7 @@ proc objcopy_test {testname srcfile type asflags ldflags} { } if {![binutils_assemble_flags $srcdir/$subdir/${srcfile} $t_tempfile "$asflags"]} then { - unresolved "objcopy $type ($testname)" + unsupported "objcopy $type ($testname)" remote_file host delete $t_tempfile return } @@ -73,7 +73,7 @@ proc objcopy_test {testname srcfile type asflags ldflags} { set t_copyfile $copyfile set got [binutils_run $LD "$tempfile -o $t_tempfile $ldflags"] if { ![string equal "" $got] } then { - unresolved "objcopy $type ($testname)" + unsupported "objcopy $type ($testname)" return } set xflags "--preserve-dates" @@ -133,7 +133,7 @@ proc objcopy_test_verilog {testname} { set got [binutils_assemble $srcdir/$subdir/verilogtest.s $binfile] if {![binutils_assemble $srcdir/$subdir/verilogtest.s $binfile]} then { - unresolved "objcopy ($testname)" + unsupported "objcopy ($testname)" return } @@ -484,7 +484,7 @@ proc strip_test { } { verbose -log "$READELF -a tmpdir/testprog.o > tmpdir/osabi.in" set exec_output [remote_exec host "$READELF -h tmpdir/testprog.o" "" "/dev/null" "tmpdir/osabi.in"] if { [lindex $exec_output 0] != 0 } then { - unresolved "$test preserving OS/ABI" + fail "$test preserving OS/ABI" set osabi_fail "true" } else { verbose -log "grep OS/ABI tmpdir/osabi.in" @@ -531,7 +531,7 @@ proc strip_test { } { verbose -log "$READELF -a tmpdir/testprog.o > tmpdir/osabi.out" set exec_output [remote_exec host "$READELF -h tmpdir/testprog.o" "" "/dev/null" "tmpdir/osabi.out"] if { [lindex $exec_output 0] != 0 } then { - unresolved "$test preserving OS/ABI" + fail "$test preserving OS/ABI" } else { verbose -log "grep OS/ABI tmpdir/osabi.out" catch "exec grep OS/ABI tmpdir/osabi.out" osabi_out @@ -762,7 +762,7 @@ proc strip_executable { prog flags test1 test2 } { verbose -log "$READELF -a ${copyfile} > tmpdir/osabi.in" set exec_output [remote_exec host "$READELF -h ${copyfile}" "" "/dev/null" "tmpdir/osabi.in"] if { [lindex $exec_output 0] != 0 } then { - unresolved "$test1 preserving OS/ABI" + fail "$test1 preserving OS/ABI" set osabi_fail "true" } else { verbose -log "grep OS/ABI tmpdir/osabi.in" @@ -788,7 +788,7 @@ proc strip_executable { prog flags test1 test2 } { verbose -log "$READELF -a ${copyfile} > tmpdir/osabi.out" set exec_output [remote_exec host "$READELF -h ${copyfile}" "" "/dev/null" "tmpdir/osabi.out"] if { [lindex $exec_output 0] != 0 } then { - unresolved "$test1 preserving OS/ABI" + fail "$test1 preserving OS/ABI" } else { verbose -log "grep OS/ABI tmpdir/osabi.out" catch "exec grep OS/ABI tmpdir/osabi.out" osabi_out @@ -1021,7 +1021,7 @@ proc objcopy_test_readelf {testname srcfile} { global subdir if {![binutils_assemble $srcdir/$subdir/${srcfile} tmpdir/bintest.o]} then { - unresolved "objcopy ($testname)" + unsupported "objcopy ($testname)" return } @@ -1036,7 +1036,7 @@ proc objcopy_test_readelf {testname srcfile} { verbose -log "$READELF -a tmpdir/bintest.o > tmpdir/bintest.o.out" set exec_output [remote_exec host "$READELF -a tmpdir/bintest.o" "" "/dev/null" "tmpdir/bintest.o.out"] if { [lindex $exec_output 0] != 0 } then { - unresolved "objcopy ($testname)" + fail "objcopy ($testname)" return } set exec_output [prune_warnings [lindex $exec_output 1]] @@ -1048,7 +1048,7 @@ proc objcopy_test_readelf {testname srcfile} { verbose -log "$READELF -a tmpdir/copy.o > tmpdir/copy.o.out" set exec_output [remote_exec host "$READELF -a tmpdir/copy.o" "" "/dev/null" "tmpdir/copy.o.out"] if { [lindex $exec_output 0] != 0 } then { - unresolved "objcopy ($testname)" + fail "objcopy ($testname)" return } set exec_output [prune_warnings [lindex $exec_output 1]] @@ -1216,7 +1216,7 @@ if [is_elf_format] { set srcfile $srcdir/$subdir/needed-by-reloc.s if {![binutils_assemble $srcfile tmpdir/bintest.o]} then { - unresolved $test + unsupported $test } else { set got [binutils_run $OBJCOPY "$OBJCOPYFLAGS --strip-symbol=foo tmpdir/bintest.o ${copyfile}.o"] diff --git a/binutils/testsuite/binutils-all/readelf.exp b/binutils/testsuite/binutils-all/readelf.exp index 51d26b762b3..948323c06bb 100644 --- a/binutils/testsuite/binutils-all/readelf.exp +++ b/binutils/testsuite/binutils-all/readelf.exp @@ -264,7 +264,7 @@ proc readelf_dump_test {} { # Assemble the dump test file. if {![binutils_assemble $srcdir/$subdir/dumptest.s tmpdir/dumptest.o]} then { - unresolved "readelf -p: failed to assemble dump test file" + unsupported "readelf -p: failed to assemble dump test file" return } # Download it. @@ -324,10 +324,10 @@ send_user "Version [binutil_version $READELF]" # Assemble the test file. if {![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.o]} then { - unresolved "readelf -h bintest (failed to assemble)" - unresolved "readelf -S bintest (failed to assemble)" - unresolved "readelf -s bintest (failed to assemble)" - unresolved "readelf -r bintest (failed to assemble)" + unsupported "readelf -h bintest (failed to assemble)" + unsupported "readelf -S bintest (failed to assemble)" + unsupported "readelf -s bintest (failed to assemble)" + unsupported "readelf -r bintest (failed to assemble)" global readelf_size set readelf_size "" } else { @@ -351,7 +351,7 @@ if {![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.o]} then { # Test demangling symbol names. if {![binutils_assemble $srcdir/$subdir/mangled.s tmpdir/mangled.o]} then { - unresolved "readelf -s -C bintest (failed to assemble)" + unsupported "readelf -s -C bintest (failed to assemble)" } else { if ![is_remote host] { @@ -380,7 +380,7 @@ if {[which $AS] != 0} then { # PR 13482 - Check for off-by-one errors when dumping .note sections. if {![binutils_assemble $srcdir/$subdir/version.s tmpdir/version.o]} then { - unresolved "readelf -n version (failed to assemble)" + unsupported "readelf -n version (failed to assemble)" } else { if ![is_remote host] { @@ -396,7 +396,7 @@ if {![binutils_assemble $srcdir/$subdir/version.s tmpdir/version.o]} then { # PR 18374 - Check that relocations against the .debug_loc section # do not prevent readelf from displaying all the location lists. if {![binutils_assemble $srcdir/$subdir/pr18374.s tmpdir/pr18374.o]} then { - unresolved "readelf --debug-dump=loc pr18374 (failed to assemble)" + unsupported "readelf --debug-dump=loc pr18374 (failed to assemble)" } else { if ![is_remote host] { @@ -411,7 +411,7 @@ if {![binutils_assemble $srcdir/$subdir/pr18374.s tmpdir/pr18374.o]} then { # locview - Check dumping of location lists with location views. if {![binutils_assemble $srcdir/$subdir/locview-1.s tmpdir/locview-1.o]} then { - unresolved "readelf --debug-dump=loc locview-1 (failed to assemble)" + unsupported "readelf --debug-dump=loc locview-1 (failed to assemble)" } else { if ![is_remote host] { @@ -423,7 +423,7 @@ if {![binutils_assemble $srcdir/$subdir/locview-1.s tmpdir/locview-1.o]} then { readelf_test --debug-dump=loc $tempfile readelf.locview-1 {} } if {![binutils_assemble $srcdir/$subdir/locview-2.s tmpdir/locview-2.o]} then { - unresolved "readelf --debug-dump=loc locview-2 (failed to assemble)" + unsupported "readelf --debug-dump=loc locview-2 (failed to assemble)" } else { if ![is_remote host] { @@ -438,7 +438,7 @@ if {![binutils_assemble $srcdir/$subdir/locview-2.s tmpdir/locview-2.o]} then { # Check that decompressed dumps work. if {![binutils_assemble $srcdir/$subdir/z.s tmpdir/z.o]} then { - unresolved "readelf --decompress --hex-dump .debug_loc z (failed to assemble)" + unsupported "readelf --decompress --hex-dump .debug_loc z (failed to assemble)" } else { if ![is_remote host] { @@ -461,7 +461,7 @@ if ![istarget "riscv*-*-*"] then { # Assemble the DWARF-5 test file. if {![binutils_assemble_flags $srcdir/$subdir/dw5.S tmpdir/dw5.o $hpux]} then { - unresolved "readelf -wiaoRlL dw5 (failed to assemble)" + unsupported "readelf -wiaoRlL dw5 (failed to assemble)" } else { # Download it. @@ -481,7 +481,7 @@ if ![istarget "riscv*-*-*"] then { # Assemble the DWARF-5 attributes test file. if {![binutils_assemble_flags $srcdir/$subdir/dwarf-attributes.S tmpdir/dwarf-attributes.o ""]} then { - unresolved "readelf -wi dwarf-attributes (failed to assemble)" + unsupported "readelf -wi dwarf-attributes (failed to assemble)" } else { # Download it. if ![is_remote host] { @@ -499,7 +499,7 @@ if {![binutils_assemble_flags $srcdir/$subdir/dwarf-attributes.S tmpdir/dwarf-at # Check that debug link sections can be dumped. if {![binutils_assemble $srcdir/$subdir/debuglink.s tmpdir/debuglink.o]} then { - unresolved "readelf --debug-dump=links (failed to assemble debuglink.s)" + unsupported "readelf --debug-dump=links (failed to assemble debuglink.s)" } else { if ![is_remote host] { set tempfile tmpdir/debuglink.o @@ -511,7 +511,7 @@ if {![binutils_assemble $srcdir/$subdir/debuglink.s tmpdir/debuglink.o]} then { # Check that debug link sections can be followed. if {![binutils_assemble $srcdir/$subdir/linkdebug.s tmpdir/linkdebug.debug]} then { - unresolved "readelf --debug-dump=follow-links (failed to assemble linkdebug.s)" + unsupported "readelf --debug-dump=follow-links (failed to assemble linkdebug.s)" } else { if [is_remote host] { set tempfile2 [remote_download host tmpdir/linkdebug.debug] @@ -522,7 +522,7 @@ if {![binutils_assemble $srcdir/$subdir/debuglink.s tmpdir/debuglink.o]} then { } if {![binutils_assemble $srcdir/$subdir/dwo.s tmpdir/dwo.o]} then { - unresolved "readelf --debug-dump=links (failed to assemble dwo.s)" + unsupported "readelf --debug-dump=links (failed to assemble dwo.s)" } else { if ![is_remote host] { set tempfile tmpdir/dwo.o @@ -534,7 +534,7 @@ if {![binutils_assemble $srcdir/$subdir/dwo.s tmpdir/dwo.o]} then { } if {![binutils_assemble $srcdir/$subdir/zero-sec.s tmpdir/zero-sec.o]} then { - unresolved "readelf --enable-checks (failed to assemble zero-sec.s)" + unsupported "readelf --enable-checks (failed to assemble zero-sec.s)" } else { if ![is_remote host] { set tempfile tmpdir/zero-sec.o -- Alan Modra Australia Development Lab, IBM