Skip to contentSkip to conversation

utime03.c: Fix filesystem name

PATCH In review Petr Vorel 3 participants 8 messages Jan 14, 2022 – Jan 18, 2022

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH 1/1 utime03.c: Fix filesystem name

Use the same name as in tst_fs_type_name() to actually skip it.

---
"v9fs is a Unix implementation of the Plan 9 9p remote filesystem protocol." [1]

NOTE: filesystem is called v9fs, but mount parameter is "9p" that's probably the reason why named "9p" and not "v9" in tst_fs_type_name().

Kind regards,
Petr

[1] https://www.kernel.org/doc/html/latest/filesystems/9p.html

 testcases/kernel/syscalls/utime/utime03.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/syscalls/utime/utime03.c +1 -1
index 48cc3bae77..823bc5f72a 100644
@@ -93,7 +93,7 @@ static struct tst_test test = {
 	.mntpoint = MNTPOINT,
 	.all_filesystems = 1,
 	.skip_filesystems = (const char *const[]) {
-		"v9",
+		"9p",
 		"vfat",
 		"exfat",
 		NULL
Signature · 5 lines
2.34.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#1 lore raw

Hi Petr,

Quoted 25 lines · Petr Vorel

Use the same name as in tst_fs_type_name() to actually skip it.

---
"v9fs is a Unix implementation of the Plan 9 9p remote filesystem protocol." [1]

NOTE: filesystem is called v9fs, but mount parameter is "9p" that's probably the reason why named "9p" and not "v9" in tst_fs_type_name().

Kind regards,
Petr

[1] https://www.kernel.org/doc/html/latest/filesystems/9p.html

 testcases/kernel/syscalls/utime/utime03.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/syscalls/utime/utime03.c +0 -0
index 48cc3bae77..823bc5f72a 100644

testcases/kernel/syscalls/utime/utime03.c static struct tst_test test = { · line 96

Quoted 5 lines
testcases/kernel/syscalls/utime/utime03.c +1 -1
@@ -93,7 +93,7 @@ static struct tst_test test = {
        .mntpoint = MNTPOINT,
        .all_filesystems = 1,
        .skip_filesystems = (const char *const[]) {
-               "v9",
+               "9p",

I'm wondering does it really take effect with whatever "v9" or "9p"? Because the fs_type_whitelist[] does not include any of them.

Quoted 10 lines
testcases/kernel/syscalls/utime/utime03.c +0 -1
                "vfat",
                "exfat",
                NULL
--

2.34.1

--
Mailing list info: https://lists.linux.it/listinfo/ltp

Signature · 6 lines
Regards,
Li Wang


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#2 lore raw
Quoted 10 lines

testcases/kernel/syscalls/utime/utime03.c static struct tst_test test = { · line 96

Quoted 7 lines

+++ b/testcases/kernel/syscalls/utime/utime03.c

testcases/kernel/syscalls/utime/utime03.c +1 -1
@@ -93,7 +93,7 @@ static struct tst_test test = {
        .mntpoint = MNTPOINT,
        .all_filesystems = 1,
        .skip_filesystems = (const char *const[]) {
-               "v9",
+               "9p",

I'm wondering does it really take effect with whatever "v9" or "9p"? Because the fs_type_whitelist[] does not include any of them.

Unless removing the .all_filesystems as well otherwise, it is impossible has a chance to test on 9p.

Signature · 6 lines
Regards,
Li Wang


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
author
#3 lore raw

Hi Li, Cyril,

Quoted 10 lines
Quoted 10 lines

testcases/kernel/syscalls/utime/utime03.c static struct tst_test test = { · line 96

Quoted 7 lines

+++ b/testcases/kernel/syscalls/utime/utime03.c

testcases/kernel/syscalls/utime/utime03.c +1 -1
@@ -93,7 +93,7 @@ static struct tst_test test = {
        .mntpoint = MNTPOINT,
        .all_filesystems = 1,
        .skip_filesystems = (const char *const[]) {
-               "v9",
+               "9p",

I'm wondering does it really take effect with whatever "v9" or "9p"? Because the fs_type_whitelist[] does not include any of them.

+1. Do we want to add 9p to fs_type_whitelist[]? I suppose not, because (despite of the name containing "whitelist" it's the list of filesystems actually being tested - this is a bit confusing to me).

Quoted 2 lines

Unless removing the .all_filesystems as well otherwise, it is impossible has a chance to test on 9p.

Yep. I forgot that .skip_filesystems works also on single fs. So correct entry in .skip_filesystems is kind of documentation in case of .all_filesystems being removed. I guess we should just remove the entry.

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#4 lore raw
Quoted 13 lines · Petr Vorel

Hi Li, Cyril,

Quoted 10 lines
Quoted 10 lines

testcases/kernel/syscalls/utime/utime03.c static struct tst_test test = { · line 96

Quoted 7 lines

+++ b/testcases/kernel/syscalls/utime/utime03.c

testcases/kernel/syscalls/utime/utime03.c +1 -1
@@ -93,7 +93,7 @@ static struct tst_test test = {
        .mntpoint = MNTPOINT,
        .all_filesystems = 1,
        .skip_filesystems = (const char *const[]) {
-               "v9",
+               "9p",

I'm wondering does it really take effect with whatever "v9" or "9p"? Because the fs_type_whitelist[] does not include any of them.

Quoted 1 line

+1. Do we want to add 9p to fs_type_whitelist[]? I suppose not, because (despite

I agree with you, as 9p is not a widely used filesystem for Linux distribution.

Quoted 2 lines

of the name containing "whitelist" it's the list of filesystems actually being tested - this is a bit confusing to me).

Yes, it is actually the filesystem list that LTP will be tested on. or maybe rename it to better understand.

Quoted 6 lines
Quoted 3 lines

Unless removing the .all_filesystems as well otherwise, it is impossible has a chance to test on 9p.

Yep. I forgot that .skip_filesystems works also on single fs. So correct entry in .skip_filesystems is kind of documentation in case of .all_filesystems being removed. I guess we should just remove the entry.

Sorry, what does that 'remove the entry' mean? I didn't catch your point here.

--
Regards,
Li Wang

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
author
#5 lore raw

Hi all,

Quoted 16 lines · Petr Vorel
Quoted 13 lines

Hi Li, Cyril,

Quoted 10 lines
Quoted 10 lines

testcases/kernel/syscalls/utime/utime03.c static struct tst_test test = { · line 96

Quoted 7 lines

+++ b/testcases/kernel/syscalls/utime/utime03.c

testcases/kernel/syscalls/utime/utime03.c +1 -1
@@ -93,7 +93,7 @@ static struct tst_test test = {
        .mntpoint = MNTPOINT,
        .all_filesystems = 1,
        .skip_filesystems = (const char *const[]) {
-               "v9",
+               "9p",

I'm wondering does it really take effect with whatever "v9" or "9p"? Because the fs_type_whitelist[] does not include any of them.

Quoted 1 line

+1. Do we want to add 9p to fs_type_whitelist[]? I suppose not, because (despite

Quoted 7 lines

I agree with you, as 9p is not a widely used filesystem for Linux distribution.

Quoted 2 lines

of the name containing "whitelist" it's the list of filesystems actually being tested - this is a bit confusing to me).

Yes, it is actually the filesystem list that LTP will be tested on. or maybe rename it to better understand.

+1. I'll try to send patch after release.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Unless removing the .all_filesystems as well otherwise, it is impossible has a chance to test on 9p.

Yep. I forgot that .skip_filesystems works also on single fs. So correct entry in .skip_filesystems is kind of documentation in case of .all_filesystems being removed. I guess we should just remove the entry.

Sorry, what does that 'remove the entry' mean? I didn't catch your point here.

As you pointed out it does not have any effect now to whitelist 9p. It's kind of documentation. Maybe instead of fixing the line we should remove it and put a comment above.

	/* NOTE: also does not work on 9p */
	.skip_filesystems = (const char *const[]) {
		"vfat",
		"exfat",
		NULL
	}

Obviously the best would be to recheck if the limitation still exists, because whole problem is 10 years old: it was added bc5da68248cc963e17862b7a0c556409c29c763e in 2011 by Cyril:

The functional tests for utime checks if utime updates the modification and access time to current time, however V9FS, similar to NFS, by default uses the server's localtime if client doesnt specify a new time. The current implentation does not run the test if the underlying filesystem is NFS. A similar check for V9FS is also required, hence this patch.

Note later was found that NFS was ok on 2.6.18:
d623e2c7fe ("splice01/tee01/utime: add kernel version check for NFS test") and remove during Martin's rewrite in ec3c3e5462.

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#6 lore raw
Quoted 31 lines · Petr Vorel

Hi all,

Quoted 16 lines · Petr Vorel
Quoted 13 lines

Hi Li, Cyril,

Quoted 10 lines
Quoted 10 lines

testcases/kernel/syscalls/utime/utime03.c static struct tst_test test = { · line 96

Quoted 7 lines

+++ b/testcases/kernel/syscalls/utime/utime03.c

testcases/kernel/syscalls/utime/utime03.c +1 -1
@@ -93,7 +93,7 @@ static struct tst_test test = {
        .mntpoint = MNTPOINT,
        .all_filesystems = 1,
        .skip_filesystems = (const char *const[]) {
-               "v9",
+               "9p",

I'm wondering does it really take effect with whatever "v9" or "9p"? Because the fs_type_whitelist[] does not include any of them.

Quoted 1 line

+1. Do we want to add 9p to fs_type_whitelist[]? I suppose not, because (despite

Quoted 7 lines

I agree with you, as 9p is not a widely used filesystem for Linux distribution.

Quoted 2 lines

of the name containing "whitelist" it's the list of filesystems actually being tested - this is a bit confusing to me).

Yes, it is actually the filesystem list that LTP will be tested on. or maybe rename it to better understand.

+1. I'll try to send patch after release.

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Unless removing the .all_filesystems as well otherwise, it is impossible has a chance to test on 9p.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Yep. I forgot that .skip_filesystems works also on single fs. So correct entry in .skip_filesystems is kind of documentation in case of .all_filesystems being removed. I guess we should just remove the entry.

Sorry, what does that 'remove the entry' mean? I didn't catch your point here.

As you pointed out it does not have any effect now to whitelist 9p. It's kind of documentation. Maybe instead of fixing the line we should remove it and put a comment above.

Ah sure, I'm fine with that quick fix (before the new release) unless Cyril has additional comments.

Quoted 11 lines
        /* NOTE: also does not work on 9p */
        .skip_filesystems = (const char *const[]) {
                "vfat",
                "exfat",
                NULL
        }

Obviously the best would be to recheck if the limitation still exists, because whole problem is 10 years old: it was added bc5da68248cc963e17862b7a0c556409c29c763e in 2011 by Cyril:

Agree, we can leave this more time to rethink that.

Quoted 15 lines

The functional tests for utime checks if utime updates the modification and access time to current time, however V9FS, similar to NFS, by default uses the server's localtime if client doesnt specify a new time. The current implentation does not run the test if the underlying filesystem is NFS. A similar check for V9FS is also required, hence this patch.

Note later was found that NFS was ok on 2.6.18:
d623e2c7fe ("splice01/tee01/utime: add kernel version check for NFS test") and remove during Martin's rewrite in ec3c3e5462.

Kind regards,
Petr

Signature · 6 lines
Regards,
Li Wang


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#7 lore raw

Hi!

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Sorry, what does that 'remove the entry' mean? I didn't catch your point here.

As you pointed out it does not have any effect now to whitelist 9p. It's kind of documentation. Maybe instead of fixing the line we should remove it and put a comment above.

Ah sure, I'm fine with that quick fix (before the new release) unless Cyril has additional comments.

I would go for removing the entry as well.

Signature · 5 lines
Cyril Hrubis
[email protected]

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp