[LTP] [PATCH v4 1/1] swapon03: Try to swapon() as many files until it fails

Li Wang liwang@redhat.com
Fri Dec 19 13:41:11 CET 2025


On Fri, Dec 19, 2025 at 6:47 PM Cyril Hrubis <chrubis@suse.cz> wrote:

> Hi!
> >       tst_res(TINFO, "Successfully created %d swap files", swapfiles);
> > -     MAKE_SMALL_SWAPFILE(TEST_FILE);
>
> This should stay here, right? I suppose that the test works even when we
> pass non-existing file in the verify_swapon() but we shouldn't bet on
> that.
>

Not exactly,  I guess here deleted it because is_swap_supported(TEST_FILE)
had already created the file but didn't clean it up in setup, so it still
exists.

Or, we need to do is improve is_swap_supported(), remove the any test file,
and then add it back separately.

-- 
Regards,
Li Wang


More information about the ltp mailing list