[LTP] lapi: fallback definitions for swapon syscall

linuxtestproject.agent@gmail.com linuxtestproject.agent@gmail.com
Fri Aug 28 11:46:32 CEST 2026


Hi Andrea,

On Aug 28, 2026, Andrea Cervesato wrote:
> lapi: fallback definitions for swapon syscall

--- [PATCH 1/3] ---

> lapi: fallback definitions for swapon syscall
>
> Introduce fallback definition inside lapi for:

Could the subject and body name include/tse_swap.h rather than lapi? The
fallback definitions are not added under include/lapi/, so the current
component and location do not match the patch.

--- [PATCH 3/3] ---

> +	TST_EXP_FAIL(tst_syscall(__NR_swapon, tc->path, tc->flags), tc->exp_errno,
>  		     "swapon(2) fail with %s", tc->err_desc);
>
>  static void cleanup(void)
>  {
>  	if (do_swapoff && tst_syscall(__NR_swapoff, USED_FILE))
>  		tst_res(TWARN | TERRNO, "swapoff(alreadyused) failed");
>  }

Could an unexpected successful swapon() of SWAP_FILE be tracked and undone?
This is the failure mode these new cases are intended to detect, but
TST_EXP_FAIL() only reports TFAIL. The swap area remains active, the next
case gets EBUSY, and cleanup only disables USED_FILE, so the test filesystem
cannot be unmounted.

Verdict - Needs revision

---
Note:

The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.

Regards,
LTP AI Reviewer


More information about the ltp mailing list