Skip to contentSkip to conversation

statx07: add fsid= to exports

PATCH New Jan Stancek 2 participants 5 messages Dec 12, 2019 – Dec 16, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 statx07: add fsid= to exports

Not all filesystems are stored on devices, and not all filesystems have UUIDs. tmpfs is one of them, which lead to test failing:
/tmp/XRzHSG/server requires fsid= for NFS export

Fixes #622
---
 testcases/kernel/syscalls/statx/statx07.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
testcases/kernel/syscalls/statx/statx07.c +2 -2
index 997e81ad843a..a18f253bc7d4 100644
@@ -133,8 +133,8 @@ static void setup(void)
 	snprintf(server_path, sizeof(server_path), ":%s/%s", cwd, SERV_PATH);
 
 	snprintf(cmd, sizeof(cmd),
-		 "exportfs -i -o no_root_squash,rw,sync,no_subtree_check *%.1024s",
-		 server_path);
+		 "exportfs -i -o no_root_squash,rw,sync,no_subtree_check,fsid=%d *%.1024s",
+		 getpid(), server_path);
 	exported = 1;
 
 	ret = tst_system(cmd);
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 2/2 statx07: handle ETIMEDOUT when rpcbind.socket is not started

Recent Fedora distros (kernel-5.3.7-301.fc31.x86_64, nfs-utils-2.4.1-1.rc1.fc31.x86_64), by default don't start rpcbind service, where rpcbind.socket is a dependency.

This leads to test failing with ETIMEDOUT:

  # ./statx07
  tst_test.c:1215: INFO: Timeout per run is 0h 05m 00s
  statx07.c:149: BROK: mount() nfs failed: ETIMEDOUT (110)
  # systemctl start rpcbind.socket
  # ./statx07
  tst_test.c:1215: INFO: Timeout per run is 0h 05m 00s
  statx07.c:148: CONF: nfs server not set up?: EOPNOTSUPP (95)

Watch for ETIMEDOUT as well.

Fixes #622
---
 testcases/kernel/syscalls/statx/statx07.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
testcases/kernel/syscalls/statx/statx07.c +2 -1
index a18f253bc7d4..ec1cdd19087b 100644
@@ -144,7 +144,8 @@ static void setup(void)
 		tst_brk(TBROK | TST_ERR, "failed to exportfs");
 
 	if (mount(server_path, CLI_PATH, "nfs", 0, "addr=127.0.0.1")) {
-		if (errno == EOPNOTSUPP || errno == ECONNREFUSED)
+		if (errno == EOPNOTSUPP || errno == ECONNREFUSED
+			|| errno == ETIMEDOUT)
 			tst_brk(TCONF | TERRNO, "nfs server not set up?");
 		tst_brk(TBROK | TERRNO, "mount() nfs failed");
 	}
Signature · 1 line
1.8.3.1
#3 lore raw

PATCH 2/2 statx07: handle ETIMEDOUT when rpcbind.socket is not started

----- Original Message -----

Quoted 3 lines

Hi!
Acked as well.

Both pushed.