Re: [LTP] [PATCH v2 1/5] swapon03: Don't create swap file twice

Cyril Hrubis
2025-11-11T12:52:10Z

Hi!
> MAKE_SMALL_SWAPFILE(TEST_FILE) call is not needed, because the file is
> created by is_swap_supported(TEST_FILE) call.

I find it a bit ugly to depend on a leftover from is_swap_supported() to
create the final swapfile. Maybe it would be cleaner to pass a path to
an already created swapfile to the is_swap_supported() function instead
so that the tests would create the file explicitly.

--
Cyril Hrubis
chrubis@suse.cz