[LTP] tst_clone: Fix child detection on sparc
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Tue Sep 29 13:16:36 CEST 2026
Hi Anders,
On Tue Sep 29 10:42:53 2026 +0200, Anders Roxell wrote:
> tst_clone: Fix child detection on sparc
> @@ -20,6 +20,9 @@ pid_t tst_clone(const struct tst_clone_args *tst_args)
> };
> int flags;
> pid_t pid = -1;
> +#ifdef __sparc__
> + pid_t parent_pid = tst_getpid();
> +#endif
On SPARC, clone3 already returns 0 in the child, making this call redundant
when clone3 succeeds; move it into the clone fallback path right before
syscall(__NR_clone, ...). Additionally, the SPARC kernel returns the
caller's TID (current->pid) in %o0 to the child, so use tst_gettid()
instead of tst_getpid() to support multithreaded callers.
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
More information about the ltp
mailing list