Skip to contentSkip to conversation

test/statx: test for ENOSYS in statx_syscall_supported

PATCH New Tobias Klauser 1 participant 1 message Jul 10, 2020 io_uring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test/statx: test for ENOSYS in statx_syscall_supported

errno will be ENOSYS, not EOPNOTSUPP if the syscall is not there. This also matches what errno is set to in do_statx if __NR_statx is not defined.

---
 test/statx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
test/statx.c +1 -1
index 66f333f93cf9..c846a4ad5b9f 100644
@@ -51,7 +51,7 @@ static int create_file(const char *file, size_t size)
 
 static int statx_syscall_supported(void)
 {
-	return errno == EOPNOTSUPP ? 0 : -1;
+	return errno == ENOSYS ? 0 : -1;
 }
 
 static int test_statx(struct io_uring *ring, const char *path)
Signature · 1 line
2.27.0