A simple way to verify my assumption, you can try:

--- a/testcases/kernel/syscalls/fallocate/fallocate05.c
+++ b/testcases/kernel/syscalls/fallocate/fallocate05.c
@@ -147,7 +147,7 @@ static void cleanup(void)
 static struct tst_test test = {
        .needs_root = 1,
        .mount_device = 1,
-       .dev_min_size = 512,
+       .dev_min_size = 64,
        .mntpoint = MNTPOINT,
        .all_filesystems = 1,
        .setup = setup,


Or, another way I can think of, is to cancel the tmpfs size limitation
when MemFree is less than the twofold size to be mounted.

(I guess guarantee twofold size MemFree is safe enough for avoiding OOM)


--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -895,6 +895,9 @@ static const char *limit_tmpfs_mount_size(const char *mnt_data,
        if (strcmp(fs_type, "tmpfs"))
                return mnt_data;
 
+       if ((SAFE_READ_MEMINFO("MemFree:") / 1024) < (tdev.size * 2))
+               return mnt_data;
+
        if (mnt_data)
                snprintf(buf, buf_size, "%s,size=%luM", mnt_data, tdev.size);
        else


--
Regards,
Li Wang