diff mbox series

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

Message ID 853f6938da5d133800dc6bf1d490937b50c2e059.1576154034.git.jstancek@redhat.com
State Accepted, archived
Headers show
Series None | expand

Commit Message

Jan Stancek Dec. 12, 2019, 12:35 p.m. UTC
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
Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
 testcases/kernel/syscalls/statx/statx07.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Cyril Hrubis Dec. 13, 2019, 1:03 p.m. UTC | #1
Hi!
Acked as well.
Jan Stancek Dec. 16, 2019, 12:51 p.m. UTC | #2
----- Original Message -----
> Hi!
> Acked as well.
> 

Both pushed.
diff mbox series

Patch

diff --git a/testcases/kernel/syscalls/statx/statx07.c b/testcases/kernel/syscalls/statx/statx07.c
index a18f253bc7d4..ec1cdd19087b 100644
--- a/testcases/kernel/syscalls/statx/statx07.c
+++ b/testcases/kernel/syscalls/statx/statx07.c
@@ -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");
 	}