[PATCH v11 32/40] kselftest/arm64: Add tests for TPIDR2
Mark Brown
broonie at kernel.org
Tue Feb 8 08:19:15 PST 2022
On Mon, Feb 07, 2022 at 05:23:15PM -0700, Shuah Khan wrote:
> On 2/7/22 8:21 AM, Mark Brown wrote:
> > + set_tpidr2(getpid());
> > + if (get_tpidr2() == getpid()) {
> > + exit(1);
> > + } else {
> > + putstr("# Failed to set TPIDR2 in child\n");
> > + exit(0);
> Is this test expected to fail? Is that why it exits with 0 status?
This is so that we can use the exit code as a boolean value in the
parent without having to invert it. Given that this is just a fork() of
the program itself it didn't seem useful to invert the value purely to
pass it back to the parent, it seemed better to consistently use natural
true/false rather than 0 on success rather than mixing the two.
-------------- 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/20220208/032e934e/attachment.sig>
More information about the linux-arm-kernel
mailing list