[LTP] [PATCH 1/1] libswap: Change TWARN message to TINFO

Cyril Hrubis chrubis@suse.cz
Wed Apr 17 12:31:52 CEST 2024


Hi!
Looking at the patches we get the warning from the is_swap_supported()
because we create only 10 blocks worth of swapfile there, right?

So the easiest fix is to make sure we create big enough swapfile there
as well, what about?

diff --git a/libs/libltpswap/libswap.c b/libs/libltpswap/libswap.c
index 313a15f24..36b5af483 100644
--- a/libs/libltpswap/libswap.c
+++ b/libs/libltpswap/libswap.c
@@ -192,7 +192,7 @@ int make_swapfile_(const char *file, const int lineno,
 bool is_swap_supported(const char *filename)
 {
        int i, sw_support = 0;
-       int ret = SAFE_MAKE_SWAPFILE_BLKS(filename, 10);
+       int ret = SAFE_MAKE_SWAPFILE_SIZE(filename, 1);
        int fi_contiguous = file_is_contiguous(filename);
        long fs_type = tst_fs_type(filename);
        const char *fstype = tst_fs_type_name(fs_type);


-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list