From patchwork Wed Oct 16 12:36:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 99004 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BC544385773E for ; Wed, 16 Oct 2024 12:37:21 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by sourceware.org (Postfix) with ESMTPS id 609F63857B8F for ; Wed, 16 Oct 2024 12:36:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 609F63857B8F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 609F63857B8F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729082187; cv=none; b=x1iuWcAAuoGthCkclCmX2LNFrrxWevoNdUTi/e9gHuBnqFYMtO03mWKyUnc3dm5+k0/FNl8z+SNV5FO8Lxsiw8c1o9LhT6O1oPt9GnjCJk4mYzMyPFdotF24bS3ofM3K4UsP2t0wpFw+6Z1cQqdPwdx6HesG/Bzmv/ROMeqMwbE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729082187; c=relaxed/simple; bh=b5I4G326fkyiqw4Sw95LZV/d5kOMySW8t4m41hiDrdU=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=wO1EcEOeOq9xKe4e3cxVpRsn2urRIHvNokDfaYjVkbDpVZtxZM7cJEKusr1t/hCWS/nnM+0XRG7pYqOUy0Nrmq43FfKTv1cMHDWBxYFYz63kNGbTtOZbHoRPWfC4yQk23LM3Y3s0V1BLzbnKJF5LpkxTnS8esU8Qb0amQFCSem8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-718e9c8bd83so630923b3a.1 for ; Wed, 16 Oct 2024 05:36:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729082184; x=1729686984; darn=sourceware.org; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=LpFHQK6GV2pMI3HOs87PSmzAA1SAkCCNRu6cTcXsxwU=; b=QBLrzAafBOgqHei3b0/c8RjihsfwtSx+pJxDFHsA0qMsrh77EkuBBjZphOPcOfy8/h e2af+SbJqGuYyiaWA/JqB8JmRWDGbeGGKN3afFL06vQP7vZN6MQA4UHf9Owwjpqbr87t N8LGVHhnP+16+bcgO1fqLwLjsWYJl4bGM3pMe36+zzZA41fvXvRl1K1FsQ6pALnjjl2h shVBVIuccwS73injngZeHAl4k6eDCZ45q6Hw3XhN3eEUc0UYOySevxW1W5x0cDmisP+k A+4Keh9Zr2riEJc5LdI/RSuJ2LJHayVh/7/1fm9Wv+EltK1vltSjEzTQ6Mx3avQLaHPV RpOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729082184; x=1729686984; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LpFHQK6GV2pMI3HOs87PSmzAA1SAkCCNRu6cTcXsxwU=; b=dHfDrd3bjn0yHXHt+Mw4d/Ry/vC2iMl3Lk7DDnjeraEFYiuKc7NyFvbYNTi3rRbtE1 mBDMzEwpWdz8n+VcQvu2AnmQgMPgPDy2SLj4D7XOGNpYcCXdmTvLl2KVPfPyJCj5NNSF QTuvO7waCNfuCY+My/cYxu6/Qt650Rcppx5leScP+E/mCbLiy/uyaHMqQyBQZtqWyzfZ +J69ZE1zli+Zmabdol1nPr+oI3z7MOPY7OuVaGybndcTypTZoq+iDNOsjZUolkhOdNg4 xlg0qQpSY3oJA377U7UOCosAxXTE5Rc9Bd7RRWWtAei6+sfadZ2/z1/L7KS/digMcvXR n9Cg== X-Gm-Message-State: AOJu0Yziu3L4D0mL6AOoE2dKBAybn6n7noK2M3ePupEiG09J5/U8+cfe Fws77svxZpWJbwovJoseskS13vsxuj5DaYhzAcH5wnpLnQL5VmHBXN4d4Q== X-Google-Smtp-Source: AGHT+IEBhB7IdeDK4445XKaLpG7/O1R7EjNVBnOxR1pgfLOjhR9PFMudiBSWbJSYo9EH0EQiBf4Bkw== X-Received: by 2002:a05:6a21:4610:b0:1cf:2d22:3ec4 with SMTP id adf61e73a8af0-1d8bc9df422mr20049590637.25.1729082183950; Wed, 16 Oct 2024 05:36:23 -0700 (PDT) Received: from squeak.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71e774cb6f3sm2958563b3a.151.2024.10.16.05.36.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 05:36:23 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 84D6C1140F2C; Wed, 16 Oct 2024 23:06:21 +1030 (ACDT) Date: Wed, 16 Oct 2024 23:06:21 +1030 From: Alan Modra To: binutils@sourceware.org Subject: Add noxfail option to run_dump_test Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-3033.1 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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces~patchwork=sourceware.org@sourceware.org The noxfail option is useful in situations like pr23658-1e which fails on all microblaze ELF targets except microblaze-linux. This was possible to handle by writing a small proc and use that as an xfail predicate, or painstakingly listing all microblaze ELF targets, but this is simpler. The patch also fixes some other FAILs and XPASSes of the pr23658 tests. binutils/ * testsuite/lib/binutils-common.exp (run_dump_test): Support noxfail. ld/ * testsuite/ld-elf/pr23658-1a.d: Don't xfail m68hc12. * testsuite/ld-elf/pr23658-1e.d: Likewise. xfail xstormy16 and correct microblaze xfails. diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp index 403103da366..03e8dbb855b 100644 --- a/binutils/testsuite/lib/binutils-common.exp +++ b/binutils/testsuite/lib/binutils-common.exp @@ -897,6 +897,9 @@ proc prune_dump_output { output } { # Run this test and it is is expected to fail on a specified list # of targets. # +# noxfail: GLOB|PROC ... +# Of targets that match the xfail list, this list won't fail. +# # error: REGEX # An error with message matching REGEX must be emitted for the test # to pass. The DUMPPROG, addr2line, nm, objdump, readelf and size @@ -1001,6 +1004,7 @@ proc run_dump_test { name {extra_options {}} } { set opts(warning) {} set opts(warning_output) {} set opts(xfail) {} + set opts(noxfail) {} set in_extra 0 foreach i [concat $opt_array {{} {}} $extra_options] { @@ -1031,6 +1035,7 @@ proc run_dump_test { name {extra_options {}} } { switch -- $opt_name { xfail {} + noxfail {} target {} alltargets {} notarget {} @@ -1296,6 +1301,12 @@ proc run_dump_test { name {extra_options {}} } { break } } + foreach targ $opts(noxfail) { + if [match_target $targ] { + clear_xfail "*-*-*" + break + } + } foreach as_flags $as_final_flags { # Assemble each file. diff --git a/ld/testsuite/ld-elf/pr23658-1a.d b/ld/testsuite/ld-elf/pr23658-1a.d index 21847f9350c..c2caf496ac6 100644 --- a/ld/testsuite/ld-elf/pr23658-1a.d +++ b/ld/testsuite/ld-elf/pr23658-1a.d @@ -8,7 +8,6 @@ # Since generic linker targets don't place SHT_NOTE sections as orphan, # SHT_NOTE sections aren't grouped nor sorted. #xfail: [uses_genelf] -#xfail: m68hc12-* # The following targets place .note.gnu.build-id in unusual places. #xfail: d10v-* pru-* diff --git a/ld/testsuite/ld-elf/pr23658-1e.d b/ld/testsuite/ld-elf/pr23658-1e.d index 992c7484ff7..dbb05e6293e 100644 --- a/ld/testsuite/ld-elf/pr23658-1e.d +++ b/ld/testsuite/ld-elf/pr23658-1e.d @@ -10,11 +10,12 @@ # placed before text sections and there should no other note sections # between .note.gnu.build-id and text sections. #xfail: [uses_genelf] -#xfail: m68hc12-* # The following targets don't support --build-id. #xfail: cr16-* crx-* visium-* # The following targets place .note.gnu.build-id in unusual places. -#xfail: *-*-hpux* arc*-* avr-* microblaze-*-* nds32*-* spu-*-* +#xfail: *-*-hpux* +#xfail: arc*-* avr-* m68hc1*-* microblaze*-* nds32*-* spu-*-* xstormy16-*-* +#noxfail: microblaze*-linux* #... +[0-9]+ +\.note.gnu.build-id +