[LTP] tse_swap: Add fallback definitions for swapon

Andrea Cervesato andrea.cervesato@suse.com
Fri Sep 4 09:16:51 CEST 2026


> Hi Andrea,
> 
> On Thu, Sep 3, 2026, Andrea Cervesato wrote:
> > [PATCH 1/3] tse_swap: Add fallback definitions for swapon
> 
> --- [PATCH 2/3] ---
> 
> > static struct tst_test test = {
> > 	.needs_root = 1,
> > 	.mount_device = 1,
> 
> SWAP_FLAG_DISCARD_ONCE and SWAP_FLAG_DISCARD_PAGES were added in Linux
> 3.11. Add `.min_kver = "3.11"`; older kernels reject these bits and the
> test reports TFAIL instead of TCONF.
> 
> --- [PATCH 3/3] ---
> 
> > 	{
> > 		.err_desc = "Invalid swapflags (undefined flag bits)",
> > 		.exp_errno = EINVAL,
> > 		.path = SWAP_FILE,
> > 		.flags = 0x80000,
> > 	},
> 
> Invalid swap flags started returning EINVAL in Linux 3.4. Add
> `.min_kver = "3.4"` so the test skips older kernels, which may accept the
> flags and produce spurious failures.
> 
> 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

both can be ignored, we don't support those kernels. I will add a
rule to the Agent so we remove this once for all.

--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com


More information about the ltp mailing list