[PATCH v3 8/9] selftests/arm: Add ptrace_64 test
Mark Brown
broonie at kernel.org
Tue Jun 25 11:18:29 PDT 2024
On Tue, Jun 25, 2024 at 05:54:07PM +0530, Dev Jain wrote:
> +static int do_child(void)
> +{
> + if (ptrace(PTRACE_TRACEME, -1, NULL, NULL))
> + ksft_exit_fail_perror("PTRACE_TRACEME");
> +
> + /* SIGTRAP makes the child stop after exec; do_parent() resumes it */
> + execv("trivial_32bit_program", NULL);
> + return EXIT_SUCCESS;
> +}
We should check that the execv() worked, one thing that can go wrong is
partially installing the tests or trying to run the tests in a different
directory to the one where everything is installed. I'd be inclined to
specify the path as ./ too to avoid surprises.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20240625/ab2b6da7/attachment.sig>
More information about the linux-arm-kernel
mailing list