ioctl09: Use proper device for partitioning
PATCH 1/1 ioctl09: Use proper device for partitioning
The test occasionally fails because loop0p2 partition never gets created. This happens because the uses parted(8) to modify partitions in the backing file (test.img) while the loop device with this file as a backing is already setup. Thus the page cache of loop0 can cache old version of the partition table which is then used by the partitioning code. Fix the problem by calling parted against the loop device directly.
Signed-off-by Jan Kara <[email protected]>
--- testcases/kernel/syscalls/ioctl/ioctl09.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/syscalls/ioctl/ioctl09.c +1 -1
@@ -64,7 +64,7 @@ static void verify_ioctl(void)"mklabel" ,"msdos" ,"mkpart" ,"primary" ,"ext4" ,"1M" ,"10M" , NULL}; -const char *const cmd_parted_new[] = {"parted" ,"-s" ,"test.img" , +const char *const cmd_parted_new[] = {"parted" ,"-s" , dev_path,"mklabel" ,"msdos" ,"mkpart" ,"primary" ,"ext4" ,"1M" ,"10M" , "mkpart", "primary", "ext4",
Signature · 5 lines
2.43.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
Reviewed-by Cyril Hrubis <[email protected]>
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Jan,
thanks for your fix, merged!
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp