Deflake namespace_test

When fetching exit status only lower 8-bits will be read.
Thus if getpid()&0xff == 0 the test can fail.

PiperOrigin-RevId: 257163766
Change-Id: I690c645fde33d1205578fd8873c5fc2974352ada
This commit is contained in:
Wiktor Garbacz 2019-07-09 04:10:47 -07:00 committed by Copybara-Service
parent 6d06df1b86
commit d170bc3c80

View File

@ -57,7 +57,7 @@ int main(int argc, char* argv[]) {
case 2: {
if (getpid() != 2) {
return getpid();
return -1;
}
} break;
@ -68,7 +68,7 @@ int main(int argc, char* argv[]) {
if (getuid() != atoi(argv[2]) // NOLINT(runtime/deprecated_fn)
|| getgid() != atoi(argv[3])) { // NOLINT(runtime/deprecated_fn)
return getuid();
return -1;
}
} break;