[PATCH v2 27/27] selftests/landlock: Use EXPECT for checks that later steps do not need
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Wed Nov 4 21:19:04 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.
>
> Signed-off-by: Günther Noack <gnoack3000 at gmail.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261104-selftests-refactor-v2-0-c52f23f7ce33@gmail.com?part=27
More information about the Linux-security-module-archive
mailing list