mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
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:
parent
6d06df1b86
commit
d170bc3c80
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user