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

Jan Stancek jstancek@redhat.com
Thu Dec 12 13:35:04 CET 2019


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(-)

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");
 	}
-- 
1.8.3.1



More information about the ltp mailing list