[LTP] [Patch v6 7/8] swapon/off: enable all_filesystem in swap test

Petr Vorel pvorel@suse.cz
Wed Jan 31 18:38:40 CET 2024


Hi Li,

LGTM

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Although get on all VMs due low memory:

tst_test.c:1091: TCONF: No enough memory for tmpfs use

instead of
libswap.c:202: TCONF: Swapfile on tmpfs not implemented

I would also suggest to print who much memory is needed, e.g.:

diff --git lib/tst_test.c lib/tst_test.c
index edb42f7f4..151c6acca 100644
--- lib/tst_test.c
+++ lib/tst_test.c
@@ -1088,7 +1088,8 @@ static const char *limit_tmpfs_mount_size(const char *mnt_data,
 		tmpfs_size = tdev.size;
 
 	if ((tst_available_mem() / 1024) < (tmpfs_size * 2))
-		tst_brk(TCONF, "No enough memory for tmpfs use");
+		tst_brk(TCONF, "No enough memory for tmpfs use (%d MB < %d MB)",
+				tst_available_mem() / 1024, tmpfs_size * 2);
 
 	if (mnt_data)
 		snprintf(buf, buf_size, "%s,size=%uM", mnt_data, tmpfs_size);


More information about the ltp mailing list