[PATCH] tests: clone3 might return EBADF with invalid cgroup

Sven Schnelle svens at stackframe.org
Sun Jun 7 17:35:45 UTC 2020


Both on s390 and x86 linux-5.7 return EBADF when an
invalid cgroup is supplied, so add that to the list
of possible return codes.
Signed-off-by: Sven Schnelle <svens at stackframe.org>
---
 tests/clone3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/clone3.c b/tests/clone3.c
index cbb7a349..c15cb1d3 100644
--- a/tests/clone3.c
+++ b/tests/clone3.c
@@ -413,7 +413,7 @@ main(int argc, char *argv[])
 	memset(arg, 0, sizeof(*arg));
 
 	arg->flags = CLONE_INTO_CGROUP;
-	rc = do_clone3(arg, sizeof(*arg), ERR(0) | ERR(EINVAL));
+	rc = do_clone3(arg, sizeof(*arg), ERR(0) | ERR(EINVAL) | ERR(EBADF));
 	print_clone3(arg, rc, sizeof(*arg), STRUCT_VALID,
 		     "CLONE_INTO_CGROUP", "0");
 	printf(", %zu) = %s" INJ_STR, sizeof(*arg), sprintrc(rc));
-- 
2.27.0.rc0



More information about the Strace-devel mailing list