Re: [PATCH v11 32/40] kselftest/arm64: Add tests for TPIDR2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux