From patchwork Tue Dec 19 21:53:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Kitt X-Patchwork-Id: 181274 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp2252402dyi; Tue, 19 Dec 2023 13:53:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IFchDPSxf5rV11EisNA13E59mHAEw5Wt886ZbcCV6T973G9FUP0Wxa/QqOW7no8XcpUU5YX X-Received: by 2002:a05:622a:198a:b0:3f9:aa80:b48a with SMTP id u10-20020a05622a198a00b003f9aa80b48amr2117973qtc.8.1703022816915; Tue, 19 Dec 2023 13:53:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1703022816; cv=pass; d=google.com; s=arc-20160816; b=Hy6CFcaMmZWYESqpLxtD3fjQ6tLafDn9RDDShxigDsLslIVCymBe75qlqfNAo2ldH0 t6ZOrJXI0SlaqWN6wXjf8tEf9F3JuIpsKCV2brl25diZhf/5RpU12D/3AB/oOYTJQPaX zSoLEfbRFDV23dRCif5s98rx9IBGHu8SswWyiWdVWRGUEHWXeVOMmBKTbbPWlVt6cbW1 6h5E0K6qXOsZQdg2fyNIP2ZgIMWbIk7MUsRJtWC0bxDsDBMh7DxOMoDKMQLPOy+SPkjP wCBVkWub6Srciplag2nrXp/XXu0jMWnDQ6O84i8WxKQ0w0tBRh2ZLKaW56BBghAh9WuM F5+A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:arc-filter :dmarc-filter:delivered-to; bh=+0axI4JjZlk4hjRn4dsZPsZ+Xc1l3EQ3CNauJsEOz5s=; fh=zZO4qmiHk93Pmi4u9DfquuNTtpmlNezw3XOhFWRg6ZE=; b=o69O6d8ZbEzOjNtzfH6u22ddPc/3LqEUMw7HAFn7rZD0tW1nrAfC4ehGdXsPSIfHnO 5HyXQqyZek7r2jwZO6sp4i28Uh3W/XEjEy8Da1fp44qHgqK/g5D5WqRczS7GxWdCUgp9 hdJvH1vH6t8jaRk4QLDJGZNeBzOU5uZx2Qszk7XQkx3hnbhcW1PCJ37aOVm0zmCyg5D2 xEvJMaFtxQQ6O6Eto6XeFwgyvkoBWzA7PiP6BFOv0VISBDAZSBRkGmJL3Sd8i8tbCDwv CD9VuML6qKkz19XNPkb81zkLajCkvcLwfszS8PZHZqzJmP97cLz9aBBfFYEKQJKEXWET gnBg== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id bq9-20020a05622a1c0900b0042578643a91si28767620qtb.123.2023.12.19.13.53.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 13:53:36 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9A12C3857BAE for ; Tue, 19 Dec 2023 21:53:36 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from 2.mo576.mail-out.ovh.net (2.mo576.mail-out.ovh.net [178.33.251.80]) by sourceware.org (Postfix) with ESMTPS id 815AE3858417 for ; Tue, 19 Dec 2023 21:53:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 815AE3858417 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sk2.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sk2.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 815AE3858417 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=178.33.251.80 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703022811; cv=none; b=dCi0t1Jm/hLiK7IQTLuHkC60jjlyeRgjSumrgU7RSYBawMTIigedJf2B3x438ljFAS95mHrHZOgRipzW7u9SfYRM9gnCjxGeUQJb8UX6cT5LQVSPVYqBSVEuddoVtKPPbB/MRSffiDucylBiHVGQ0Tstoasup7EctHmkBeSBWEs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703022811; c=relaxed/simple; bh=y8t5cLox8ZDJ2zA+lExaEWnRNlUMUfFuC+M4pGUYaTg=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=nV+rFROi2KWAUSgGfAQWphWO9xahd3OEeJe1nrj+6kcrvNukX73apLoBdgHRbHUvmC9DoO/2QPmk4p2ifNyod1nEPNf7NJhEGRnVEPDODdbZo3JYwIIluIBuYlLY3gUbHn1bhEhWxrMi1lF/U2hF3GbRUKybgO4vOAPotS94cjg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from director5.ghost.mail-out.ovh.net (unknown [10.109.139.172]) by mo576.mail-out.ovh.net (Postfix) with ESMTP id 405FD2E1B5 for ; Tue, 19 Dec 2023 21:53:28 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-bskxw (unknown [10.110.168.164]) by director5.ghost.mail-out.ovh.net (Postfix) with ESMTPS id BB4E51FDF0; Tue, 19 Dec 2023 21:53:28 +0000 (UTC) Received: from sk2.org ([37.59.142.106]) by ghost-submission-6684bf9d7b-bskxw with ESMTPSA id QAXVK9gQgmVqNAgANHwqOg (envelope-from ); Tue, 19 Dec 2023 21:53:28 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-106R006665a4128-d61b-4a92-997f-f917a6e75d35, D39D90006901CF9F68A977CC2E554027A14A62C2) smtp.auth=steve@sk2.org X-OVh-ClientIp: 82.65.25.201 From: Stephen Kitt To: binutils@sourceware.org Cc: Stephen Kitt Subject: [PATCH v2] tests: force non-deterministic mode in non-deterministic tests Date: Tue, 19 Dec 2023 22:53:07 +0100 Message-Id: <20231219215307.2578951-1-steve@sk2.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Ovh-Tracer-Id: 1213720099763553926 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrvddutddgudehgecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecunecujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomhepufhtvghphhgvnhcumfhithhtuceoshhtvghvvgesshhkvddrohhrgheqnecuggftrfgrthhtvghrnhepleegteeujeffjeefjeevhfdtudefjefgteelgedtudekleeiledvvdetudevjedtnecukfhppeduvdejrddtrddtrddupdekvddrieehrddvhedrvddtuddpfeejrdehledrudegvddruddtieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehsthgvvhgvsehskhdvrdhorhhgqedpnhgspghrtghpthhtohepuddprhgtphhtthhopegsihhnuhhtihhlshesshhouhhrtggvfigrrhgvrdhorhhgpdfovfetjfhoshhtpehmohehjeeipdhmohguvgepshhmthhpohhuth X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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+ouuuleilei=gmail.com@sourceware.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785652031037913432 X-GMAIL-MSGID: 1785748853631466572 Since ar can be built defaulting to deterministic mode, tests which expect non-deterministic behaviour need to explicitly set the U flag. They also need to run without SOURCE_DATE_EPOCH since that also enables deterministic mode. Signed-off-by: Stephen Kitt --- binutils/testsuite/binutils-all/ar.exp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) base-commit: c4fb39bb31a53bbb2df3be3200d694f025c5b892 diff --git a/binutils/testsuite/binutils-all/ar.exp b/binutils/testsuite/binutils-all/ar.exp index aade419344e..3ac3c424447 100644 --- a/binutils/testsuite/binutils-all/ar.exp +++ b/binutils/testsuite/binutils-all/ar.exp @@ -571,6 +571,8 @@ proc replacing_non_deterministic_member { } { return } + unsetenv SOURCE_DATE_EPOCH + set archive tmpdir/artest.a set older_objfile tmpdir/bintest.${obj} set newer_objfile tmpdir/ar/bintest.${obj} @@ -581,7 +583,7 @@ proc replacing_non_deterministic_member { } { # Build the archive with the *newer* object file. - set got [binutils_run $AR "rc $archive ${newer_objfile}"] + set got [binutils_run $AR "rcU $archive ${newer_objfile}"] if ![string match "" $got] { fail "$testname: (could not build archive)" return @@ -589,7 +591,7 @@ proc replacing_non_deterministic_member { } { # Now try to replace the newer file with the older one. This should not work. - set got [binutils_run $AR "ru $archive $older_objfile"] + set got [binutils_run $AR "ruU $archive $older_objfile"] if ![string match "" $got] { fail "$testname: (failed to replace file)" return @@ -651,7 +653,7 @@ proc replacing_sde_deterministic_member { } { # Build the archive with the *newer* object file. setenv SOURCE_DATE_EPOCH "1000" - set got [binutils_run $AR "rc $archive ${newer_objfile}"] + set got [binutils_run $AR "rcU $archive ${newer_objfile}"] if ![string match "" $got] { fail "$testname: (could not build archive)" unsetenv SOURCE_DATE_EPOCH @@ -662,7 +664,7 @@ proc replacing_sde_deterministic_member { } { # archive this will not work, but one created to be deterministic # should always replace its members. - set got [binutils_run $AR "ru $archive $older_objfile"] + set got [binutils_run $AR "ruU $archive $older_objfile"] if ![string match "" $got] { fail "$testname: (failed to replace file)" unsetenv SOURCE_DATE_EPOCH