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: 82531 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 9585F3857348 for ; Tue, 19 Dec 2023 21:53:46 +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+patchwork=sourceware.org@sourceware.org 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