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

From
sashiko-bot@kernel.org
Date
2026-11-04 21:19:04
Reply to
Günther Noack, 2026-11-04
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 <redacted>
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
Thread (55 messages) 55 messages, 2 authors, last reply 4d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help