Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp34041rwl; Wed, 9 Aug 2023 10:29:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHZKAf8QEDc/qE/xV1W5GaKZw6aqkEpGTKbYAfKIwsJkftaDE8Cw6dK1DktBXDH8GTpvXLy X-Received: by 2002:a17:903:192:b0:1bb:3498:9caa with SMTP id z18-20020a170903019200b001bb34989caamr4241329plg.58.1691602140392; Wed, 09 Aug 2023 10:29:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691602140; cv=none; d=google.com; s=arc-20160816; b=pjKJ0hyXVV8ywOgC2RI6cNkRWIQM8A+8LHYNAP7sedn2lBKSvGTdlDxim+wMJmXfmP 3RHxZm0Ue2zbZpB3mNSaJzzTsoK9wXGppT3aA9BcWaQLS5TyenubKDCOy9ekQ84GhvVX 9YzXfWHlJ7Adu2WXvOX0QtXZJeCHXIfcTC+wzm5wglRJN7CxQhrzSd+vJ7MYWEtnUJDi Kh4qdcnBSPCBiqsh1aVkqgM7d4VtoFaON6zA+4HGyxI0YMGNE3gp/4I721CijxyeTyY7 PT0HlKQ2mkVCON4SZ3cQCzqwhBq5xNaGXYpSDxlAOKCUQZWkpY6gkdwNT7epPCQPlucF ClCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=0YPvaETPoByt7Uc/obFHqkQjGwAL0HgKesw9EzBopIc=; fh=nE/UqZX6qzpWLzz9CgtzS7bs+n+xzJ8NCqsu+2HYlgM=; b=GEJiO5Twg+Tq7ZFHwaCuEaXlqBsroS/QWvmkoX5hMPlIR5g+E/Etkk2i609hsFVXbx sTv6+++CqK5bZG8Stv8cumz+C/pWArOUGIBp/qU+dkApjFt2hYZBfrKl6LLLy1NH/ehI vh3ub/XyBrBhWHSnsvWtz7asjiB+yN2k8u2IblL9dXWsAr+e1BufP8Nd3mjYm+fSWnql ui3a0pk+yjBRfcgFJyqIiABcI8OAr+eWMfqPa+CxBmCNSXlunnT2Ztmuuy8S1HIt2lx3 q72WFxhK0oESwi6jnnylwuYs3j0EihM5s2oNig87tlUpYgxh/t4JfDcjaWBTNqLx5s0R zTuw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f16-20020a170902ce9000b001b8a4954be1si7443820plg.595.2023.08.09.10.28.48; Wed, 09 Aug 2023 10:29:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232484AbjHIREp (ORCPT + 99 others); Wed, 9 Aug 2023 13:04:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232245AbjHIREm (ORCPT ); Wed, 9 Aug 2023 13:04:42 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 16C671FD4; Wed, 9 Aug 2023 10:04:42 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 26F81D75; Wed, 9 Aug 2023 10:05:24 -0700 (PDT) Received: from donnerap.arm.com (donnerap.manchester.arm.com [10.32.100.58]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EB76C3F59C; Wed, 9 Aug 2023 10:04:40 -0700 (PDT) From: Andre Przywara To: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= , Shuah Khan Cc: linux-security-module@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/2] selftests: landlock: fix runs on older systems Date: Wed, 9 Aug 2023 18:04:33 +0100 Message-Id: <20230809170435.1312162-1-andre.przywara@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When naively running all kselftests on some systems, it was observed that the landlock selftest is quite picky and reports failures, even though the system is fine. Those two patches relax some tests to make them pass on older kernels: - The landlock ABI version is only "3" in recent kernels, so patch 1/2 relaxes the test to accept other numbers. - Older kernels or some defconfig based kernels might not implement the landlock syscall at all. Patch 2/2 catches this. I couldn't find an easy way to not check for the syscall availability in *every* test in base_test.c, short of not using TEST_HARNESS_MAIN at all. If someone has a better idea, I am all ears, especially as this approach will get quite annoying in fs_base.c. Cheers, Andre Andre Przywara (2): selftests: landlock: allow other ABI versions selftests: landlock: skip all tests without landlock syscall tools/testing/selftests/landlock/base_test.c | 29 +++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) -- 2.25.1