catchestat01: skip some tests loop with large pagesize
PATCH 1/1 catchestat01: skip some tests loop with large pagesize
To avoid errors with ENOSPC on systems with large page sizes (e.g., ppc64le with 64kB page size), this patch updates the test_cached_pages function to check the total memory requirement against the available device size before running the test. If the required memory exceeds the available device size, the test is skipped with a message indicating that the device size is not sufficient for testing.
Also, loosen 45MB for XFS filesystem because it needs a bit of space for inodes or others.
This prevents errors like the following:
83 cachestat01.c:39: TINFO: Number of pages: 8192
84 cachestat01.c:46: TBROK: write(3,0x10037180be0,65536) failed: ENOSPC (28)
--- testcases/kernel/syscalls/cachestat/cachestat01.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
testcases/kernel/syscalls/cachestat/cachestat01.c +4 -1
@@ -36,7 +36,10 @@ static void test_cached_pages(const unsigned int use_sync, const int num_pages)int fd;tst_res (TINFO ,"%s file synchronization" , use_sync ?"Enable" :"Disable" ); -tst_res (TINFO ,"Number of pages: %d" , num_pages); +tst_res (TINFO ,"Number of pages: %d, Page_size: %d" , num_pages, page_size); + +if ((uint64_t )page_size * num_pages >= (tst_device->size -64 ) *1024 *1024 ) +tst_brk (TCONF ,"Device size (%luMB) is not enough for testing" , tst_device->size);memset (cs,0 ,sizeof (struct cachestat ));
Signature · 5 lines
2.45.2 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
Isn't this fixed by Peter yesterday?
commit 8422d4680b21e6576da63c677b5d49f46b477df0
Author: Petr Vorel <[email protected]> Date: Tue Jul 30 00:16:03 2024 +0200
cachestat01: Reduce required space on 64kb page size
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 3 lines · Cyril Hrubis
Hi!
Isn't this fixed by Peter yesterday?
Oh, sorry for missing that, I just back from vacation and haven't synced my local branch.
Anyway, thanks for the info.
Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp