From: sashiko-bot@kernel.org
To: "Cai Xinchen" <caixinchen1@huawei.com>
Cc: linux-security-module@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH v3 8/8] selftests/lsm: add lockdown securityfs test
Date: Thu, 26 Nov 2026 12:55:34 +0000 [thread overview]
Message-ID: <sashiko-outbox-235545@kernel.org> (raw)
In-Reply-To: <20261126131315.1256553-9-caixinchen1@huawei.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] selftests/lsm: missing $(OUTPUT) prefix in run_lockdown_test
target
--
commit ae0a97bf5c81e3abb82a38d806d0a81d48473b52
Author: Cai Xinchen <caixinchen1@huawei.com>
selftests/lsm: add lockdown securityfs test
This commit adds a kselftest for the lockdown securityfs interface along
with a shared file-reading helper and a custom run_lockdown_test make
target.
> diff --git a/tools/testing/selftests/lsm/Makefile b/tools/testing/selftests/lsm/Makefile
> index 3f80c0bc093de..3be7aa42761ce 100644
> --- a/tools/testing/selftests/lsm/Makefile
> +++ b/tools/testing/selftests/lsm/Makefile
> @@ -8,10 +8,18 @@ LOCAL_HDRS += common.h
> TEST_GEN_PROGS := lsm_get_self_attr_test lsm_list_modules_test \
> lsm_set_self_attr_test
>
> +# lockdown_test changes the machine's lockdown level, so do not run it
> +# by default.
> +TEST_GEN_PROGS_EXTENDED := lockdown_test
> +
> include ../lib.mk
>
> $(OUTPUT)/lsm_get_self_attr_test: lsm_get_self_attr_test.c common.c
> $(OUTPUT)/lsm_set_self_attr_test: lsm_set_self_attr_test.c common.c
> $(OUTPUT)/lsm_list_modules_test: lsm_list_modules_test.c common.c
> +$(OUTPUT)/lockdown_test: lockdown_test.c common.c
> +
> +run_lockdown_test: all
> + $(call RUN_TESTS, lockdown_test)
[Severity: Medium]
Does run_lockdown_test fail when building with an out-of-tree OUTPUT
directory? The binary is built at $(OUTPUT)/lockdown_test (and lib.mk
rewrites TEST_GEN_PROGS_EXTENDED with the $(OUTPUT)/ prefix), so passing
a bare lockdown_test to RUN_TESTS causes runner.sh to look in the source
directory and fail with a missing file error. Passing
$(OUTPUT)/lockdown_test or $(TEST_GEN_PROGS_EXTENDED) to RUN_TESTS would
avoid this.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261126131315.1256553-1-caixinchen1@huawei.com?part=8
next prev parent reply other threads:[~2026-11-26 12:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 13:13 [PATCH v3 0/8] lockdown: fix the securityfs interface and add tests Cai Xinchen
2026-11-26 12:55 ` sashiko-bot
2026-11-26 13:13 ` [PATCH v3 1/8] lockdown: Add break in lockdown_write Cai Xinchen
2026-11-26 13:13 ` [PATCH v3 2/8] lockdown: remove useless decrement operation Cai Xinchen
2026-11-26 13:13 ` [PATCH v3 3/8] lockdown: select SECURITYFS Cai Xinchen
2026-11-26 13:13 ` [PATCH v3 4/8] lsm: remove unused lockdown audit data Cai Xinchen
2026-11-26 13:13 ` [PATCH v3 5/8] lockdown: drop an unused include and move lockdown_reasons Cai Xinchen
2026-11-26 13:13 ` [PATCH v3 6/8] lockdown: bound the status string with scnprintf Cai Xinchen
2026-11-26 12:52 ` sashiko-bot
2026-11-26 13:13 ` [PATCH v3 7/8] Documentation/ABI: document the lockdown securityfs file Cai Xinchen
2026-11-26 13:13 ` [PATCH v3 8/8] selftests/lsm: add lockdown securityfs test Cai Xinchen
2026-11-26 12:55 ` sashiko-bot [this message]
2026-11-27 2:10 ` Guicai Ma
2026-11-30 7:19 ` Cai Xinchen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-235545@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=caixinchen1@huawei.com \
--cc=linux-security-module@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.