From patchwork Mon Feb 5 20:22:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Jeanson X-Patchwork-Id: 1895408 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=efficios.com header.i=@efficios.com header.a=rsa-sha256 header.s=smtpout1 header.b=LwMSd6vF; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TTHr849Kbz23gb for ; Tue, 6 Feb 2024 07:23:04 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 204E93857C67 for ; Mon, 5 Feb 2024 20:23:02 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from smtpout.efficios.com (smtpout.efficios.com [IPv6:2607:5300:203:b2ee::31e5]) by sourceware.org (Postfix) with ESMTPS id EADA73857C41 for ; Mon, 5 Feb 2024 20:22:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EADA73857C41 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=efficios.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org EADA73857C41 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:5300:203:b2ee::31e5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707164569; cv=none; b=KZ5uJbakfVLGHuq+Jp4ue/tuScRLCklYVz0cCnqdmPQWP6UTZEx8DaEUIrOrG16vDMfxKmYZrnhVMfrgQRdWfwrex1Sm0sN8EYk38U/AT/rwdWRVH1m5mnYTFsXXAEkDFLQS9cw7b20UAHFdLK6Vwa3BYysyAJHZZhdjRwcvGIs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707164569; c=relaxed/simple; bh=JuLCXlAW6YoKrEqoPaArtxLyvjefcWo2VXT0Z8u/SrY=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=tVtS6RupY21lzCw/NgI1d8X6+I52VZV9smoVtfPczaEsaUJOhbUQPhBIkw6GLBN7yLTQl3crmhpcy1vBvwZW9UgopgxXQJVpPSZFEWc8TljZ+V53L4EU8rXKEdXNMJhHmJiG0R6CYuGsBLgcA5A5r/cOPLsqi//j8a3URavxVig= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1707164566; bh=JuLCXlAW6YoKrEqoPaArtxLyvjefcWo2VXT0Z8u/SrY=; h=From:To:Cc:Subject:Date:From; b=LwMSd6vFzGi+F79xLY0K1aQdemh8xkmxI1k2JqoltXeECdwV8JzNeVpif0+Bpb8NM TDulfWyBphTkoFNvGN+6uTsz7oryQnTK/mHgtt1FyP/Cvu2NUM6O4iqus8MITYqiVT OPm6hNCFnfxvx2GGzZdgaLp2qjqpblkb/6CAtfJJM0wOaKN8HeIJ99P05/ia15R8PR 5cXKALHHNaANWX3P7TDgkrevRaZMzm7XSCWRUnchMIsRUQSnQeomLPR8xjuLMJVr7e 1BcR12EE5Mx3KmJBJ7Awa6+pL860wmpqGgo0onXCuKS1gyMGuI7rvxWA9nPwI9sd4S y2IF4cBLI1DMg== Received: from laptop-mjeanson.internal.efficios.com (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4TTHqp1MzVzXgG; Mon, 5 Feb 2024 15:22:46 -0500 (EST) From: Michael Jeanson To: libc-alpha@sourceware.org Cc: Michael Jeanson Subject: [PATCH] x86/cet: fix shadow stack test scripts Date: Mon, 5 Feb 2024 15:22:39 -0500 Message-Id: <20240205202239.825075-1-mjeanson@efficios.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Some shadow stack test scripts use the '==' operator with the 'test' command to validate exit codes resulting in the following error: sysdeps/x86_64/tst-shstk-legacy-1e.sh: 31: test: 139: unexpected operator The '==' operator is invalid for the 'test' command, use '-eq' like the previous call to 'test'. Change-Id: Ib4d444cc1c9bbb9626d5ab3a40a427faf3567e12 Signed-off-by: Michael Jeanson --- sysdeps/x86_64/tst-shstk-legacy-1e-static.sh | 2 +- sysdeps/x86_64/tst-shstk-legacy-1e.sh | 2 +- sysdeps/x86_64/tst-shstk-legacy-1g.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/x86_64/tst-shstk-legacy-1e-static.sh b/sysdeps/x86_64/tst-shstk-legacy-1e-static.sh index 46f1233757..0a9a164a3e 100755 --- a/sysdeps/x86_64/tst-shstk-legacy-1e-static.sh +++ b/sysdeps/x86_64/tst-shstk-legacy-1e-static.sh @@ -26,7 +26,7 @@ ${common_objpfx}elf/tst-shstk-legacy-1e-static status=$? if test $status -eq 77; then exit 77 -elif test $status == 139; then +elif test $status -eq 139; then exit 0 else exit 1 diff --git a/sysdeps/x86_64/tst-shstk-legacy-1e.sh b/sysdeps/x86_64/tst-shstk-legacy-1e.sh index 31212453d9..3dec5623e4 100755 --- a/sysdeps/x86_64/tst-shstk-legacy-1e.sh +++ b/sysdeps/x86_64/tst-shstk-legacy-1e.sh @@ -28,7 +28,7 @@ ${test_program_prefix} \ status=$? if test $status -eq 77; then exit 77 -elif test $status == 139; then +elif test $status -eq 139; then exit 0 else exit 1 diff --git a/sysdeps/x86_64/tst-shstk-legacy-1g.sh b/sysdeps/x86_64/tst-shstk-legacy-1g.sh index e84087068e..249831e816 100755 --- a/sysdeps/x86_64/tst-shstk-legacy-1g.sh +++ b/sysdeps/x86_64/tst-shstk-legacy-1g.sh @@ -28,7 +28,7 @@ ${test_program_prefix} \ status=$? if test $status -eq 77; then exit 77 -elif test $status == 139; then +elif test $status -eq 139; then exit 0 else exit 1