[LTP] [PATCH v4 1/1] swapon03: Try to swapon() as many files until it fails
Cyril Hrubis
chrubis@suse.cz
Fri Dec 19 15:04:52 CET 2025
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.
Ah, now I remmeber, I proposed not to create the swapfile in the
is_swap_supported() and instead a pass a path to a swapfile to the
function last time I got confused by the code.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list