[LTP] [PATCH v3] syscalls/ptrace11: Add test for tracing init process

Cyril Hrubis chrubis@suse.cz
Fri Nov 13 16:12:39 CET 2020


Hi!
> +	/*
> +	 * Running attach/detach more times will trigger a ESRCH error because
> +	 * ptrace_check_attach function in kernel will report it if its process
> +	 * stats is not __TASK_TRACED.
> +	 */
> +	TST_RETRY_FUNC(ptrace(PTRACE_DETACH, 1, NULL, NULL), TST_RETVAL_EQ0);

Why do we have to retry the detach here?

Other than that the rest looks fine now.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list