[PATCH 27/27] selftests/landlock: Use EXPECT for checks that later steps do not need

sashiko-bot at kernel.org sashiko-bot at kernel.org
Thu Oct 8 14:39:43 UTC 2026


> ASSERT aborts the test, so it should only be used when continuing after
> a failure is pointless.  Use EXPECT for checks whose outcome nothing
> later in the test depends on:
> 
> * errno values after a failed syscall,
> * test_open() and test_open_rel(), which leave no state behind,
> * WEXITSTATUS() of a child that has exited,
> * matches_log_fs() and matches_log_fs_extra(),
> * the record counts returned by audit_count_records().
> 
> Keep ASSERT for operations whose side effects later checks depend on,
> such as renames, links and file removals.
> 
> Assisted-by: LLM
> Signed-off-by: Günther Noack <gnoack3000 at gmail.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261008142604.39107-2-gnoack3000@gmail.com?part=27




More information about the Linux-security-module-archive mailing list