<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Avinesh Kumar <<a href="mailto:akumar@suse.de">akumar@suse.de</a>> wrote:<br></div></div><div class="gmail_quote"><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> How about<br>
> 1) don't skip exfat and vfat but just skip creating file with valid name? or<br>
> <br>
> 2) Add #define NLS_MAX_CHARSET_SIZE 6 and for vfat and exfat calculate<br>
> length as: buf.f_namemax / NLS_MAX_CHARSET_SIZE - 1 ?<br></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Thank you for the review and research on vfat, exfat scenarios.<br>
I have adopted the option 1 for now and sent a v3 of this patch.<br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">I thought option_1 meant to skip creating a valide-file when</div><div class="gmail_default" style="font-size:small">detecting on "vfat,exfat" FS, but not skip for others.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Or probably I misunderstood Petr's words.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Anyway, don't hurry to send V3 until we get an agreement :).</div><div class="gmail_default" style="font-size:small"><br></div>--- a/testcases/kernel/syscalls/statvfs/statvfs01.c<br>+++ b/testcases/kernel/syscalls/statvfs/statvfs01.c<br>@@ -30,7 +30,10 @@ static void run(void)<br>        memset(valid_fname, 'a', buf.f_namemax - 1);<br>        memset(invalid_fname, 'b', buf.f_namemax + 1);<br> <br>-       TST_EXP_FD(creat(valid_fname, 0444));<br>+       long fs_type = tst_fs_type(TEST_PATH);<br>+       if  (fs_type != TST_VFAT_MAGIC && fs_type != TST_EXFAT_MAGIC)<br>+               TST_EXP_FD(creat(valid_fname, 0444));<br>+<br>        TST_EXP_FAIL(creat(invalid_fname, 0444), ENAMETOOLONG);<br> }<br> <br>@@ -46,9 +49,4 @@ static struct tst_test test = {<br>        .mount_device = 1,<br>        .mntpoint = MNT_POINT,<br>        .all_filesystems = 1,<br>-       .skip_filesystems = (const char *const[]) {<br>-               "vfat",<br>-               "exfat",<br>-               NULL<br>-       }<br> };<br><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"></div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Regards,<br>Li Wang<br></div></div></div></div></div>