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

_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux