From patchwork Wed Jan 8 15:43:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= X-Patchwork-Id: 13931208 Received: from smtp-bc0a.mail.infomaniak.ch (smtp-bc0a.mail.infomaniak.ch [45.157.188.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2EEFF1FF1AC; Wed, 8 Jan 2025 15:44:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.157.188.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736351060; cv=none; b=RG5bMqND94Y/7hixtiu6I26N1oy1sCufsKSBAyI/7qB2aDwNNqZimX/3BNMkOG2y/ZaPl1GkdT+UZs1DyEhlco5ejsVGE+2bQ17IgduLUmYBAGMNfGkEOocKC7k6A/861IAn7Zbo5NH8JkScHgVsKjOHsIsBjg66oQnxx3neXrc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736351060; c=relaxed/simple; bh=y/wtqJxZmkGaNNbxtbWPEhGfGtFUdjlHTa/P+YkzL4g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RHOeOl5i2HeEI5NaxD/EDbF7JtqBFfbG6TimeViAtgTkl2vCkAsK3lKaTnpkE+v+CKOc9mPX7lKiY9RszFbvrdLPJxyCgJdOWrTW/urrZ4xvsiLM4/cycmfOs742t18XWMPwGLwPuWycaXnFOgFL+F4jdZJ0yjjHAOP66iI773k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=digikod.net; spf=pass smtp.mailfrom=digikod.net; dkim=pass (1024-bit key) header.d=digikod.net header.i=@digikod.net header.b=XaQBz8Xn; arc=none smtp.client-ip=45.157.188.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=digikod.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=digikod.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=digikod.net header.i=@digikod.net header.b="XaQBz8Xn" Received: from smtp-3-0000.mail.infomaniak.ch (unknown [IPv6:2001:1600:4:17::246b]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4YSsfS4s6pz7Bw; Wed, 8 Jan 2025 16:44:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digikod.net; s=20191114; t=1736351056; bh=mk13RvEuPQJ/sgasE14gboAmV4076jIAJAJ4kAt2QAU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XaQBz8XnskIBQ6GYys95KRNToEY4Oe2nQDcNQSTetTkHWkhMRiaRGnaF+9ohJmEIq abudOrENn3fYyR8VJqNbW1L0hUljXGovj1wCXAyIhCogA78wiskmewKFyRhf5QQVZm lg7g5IYtzJSW8jrRD677CFB1ObGfDSRDi/bbVH1g= Received: from unknown by smtp-3-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4YSsfR5Fl8zsJG; Wed, 8 Jan 2025 16:44:15 +0100 (CET) From: =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= To: Eric Paris , Paul Moore , =?utf-8?q?G=C3=BCnther_Noack?= , "Serge E . Hallyn" Cc: =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= , Ben Scarlato , Casey Schaufler , Charles Zaffery , Daniel Burgener , Francis Laniel , James Morris , Jann Horn , Jeff Xu , Jorge Lucangeli Obes , Kees Cook , Konstantin Meskhidze , Matt Bobrowski , Mikhail Ivanov , Phil Sutter , Praveen K Paladugu , Robert Salvet , Shervin Oloumi , Song Liu , Tahera Fahimi , Tyler Hicks , audit@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org Subject: [PATCH v4 20/30] selftests/landlock: Fix error message Date: Wed, 8 Jan 2025 16:43:28 +0100 Message-ID: <20250108154338.1129069-21-mic@digikod.net> In-Reply-To: <20250108154338.1129069-1-mic@digikod.net> References: <20250108154338.1129069-1-mic@digikod.net> Precedence: bulk X-Mailing-List: audit@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Infomaniak-Routing: alpha The global variable errno may not be set in test_execute(). Do not use it in related error message. Cc: Günther Noack Fixes: e1199815b47b ("selftests/landlock: Add user space tests") Signed-off-by: Mickaël Salaün Link: https://lore.kernel.org/r/20250108154338.1129069-21-mic@digikod.net --- Changes since v3: - New patch. --- tools/testing/selftests/landlock/fs_test.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/testing/selftests/landlock/fs_test.c b/tools/testing/selftests/landlock/fs_test.c index 42ce1e79ba82..a359c0d3107f 100644 --- a/tools/testing/selftests/landlock/fs_test.c +++ b/tools/testing/selftests/landlock/fs_test.c @@ -2011,8 +2011,7 @@ static void test_execute(struct __test_metadata *const _metadata, const int err, ASSERT_EQ(1, WIFEXITED(status)); ASSERT_EQ(err ? 2 : 0, WEXITSTATUS(status)) { - TH_LOG("Unexpected return code for \"%s\": %s", path, - strerror(errno)); + TH_LOG("Unexpected return code for \"%s\"", path); }; }