From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A5732159C9B for ; Sun, 11 Aug 2024 10:11:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 67A952BC0A7; Sun, 11 Aug 2024 10:11:14 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 504392BC0A7 for ; Sun, 11 Aug 2024 10:11:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 40CEF34311F for ; Sun, 11 Aug 2024 10:11:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E47E21EDF for ; Sun, 11 Aug 2024 10:11:09 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1723371057.f6f791f3c6ff6a4b94499c3fa61ffb20d2c5d733.sam@gentoo> Subject: [gentoo-commits] proj/gentoo-functions:master commit in: / X-VCS-Repository: proj/gentoo-functions X-VCS-Files: test-functions X-VCS-Directories: / X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: f6f791f3c6ff6a4b94499c3fa61ffb20d2c5d733 X-VCS-Branch: master Date: Sun, 11 Aug 2024 10:11:09 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 9541dc45-e362-4b27-841c-641ef8826ba6 X-Archives-Hash: 829012ced9ac8b84a583c49e7b330bac commit: f6f791f3c6ff6a4b94499c3fa61ffb20d2c5d733 Author: Kerin Millar plushkava net> AuthorDate: Wed Aug 7 20:36:16 2024 +0000 Commit: Sam James gentoo org> CommitDate: Sun Aug 11 10:10:57 2024 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=f6f791f3 test-functions: avoid unspecified behaviour in test_quote_args() In test_quote_args(), there is the following code. fmt=$(printf '\%o' "$i") However, the behaviour of the character followed by the character is unspecified. Since it is intended to be taken as a literal backslash, fix it by writing it as thus. fmt=$(printf '\\%o' "$i") Doing so addresses a spurious test failure where using the loksh shell. Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> test-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-functions b/test-functions index 96781f2..487caa9 100755 --- a/test-functions +++ b/test-functions @@ -914,7 +914,7 @@ test_quote_args() { retval=0 i=0 while [ "$(( i += 1 ))" -le 255 ]; do - fmt=$(printf '\%o' "$i") + fmt=$(printf '\\%o' "$i") # shellcheck disable=2059 str=$(printf "$fmt.") POSIXLY_CORRECT= quote_args "${str%.}" || break