Revert "[sanitizer] Fix compilation of the test"
Revert "[sanitizer] Fix PosixSpawnImpl which fails exitcode test" This reverts commit8cabd8f0d2and part of9213202abd. It is not enough for Android.
This commit is contained in:
parent
dfd499a61c
commit
57d34cb223
|
|
@ -1,4 +1,7 @@
|
|||
// RUN: %clang %s -o %t && %run %t 2>&1 | FileCheck %s
|
||||
//
|
||||
// Older versions of Android do not have certain posix_spawn* functions.
|
||||
// UNSUPPORTED: android
|
||||
|
||||
#include <assert.h>
|
||||
#include <spawn.h>
|
||||
|
|
@ -13,8 +16,15 @@ int main(int argc, char **argv) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
posix_spawnattr_t attr = {0};
|
||||
posix_spawn_file_actions_t file_actions = {0};
|
||||
int s;
|
||||
|
||||
posix_spawnattr_t attr;
|
||||
s = posix_spawnattr_init(&attr);
|
||||
assert(!s);
|
||||
|
||||
posix_spawn_file_actions_t file_actions;
|
||||
s = posix_spawn_file_actions_init(&file_actions);
|
||||
assert(!s);
|
||||
|
||||
char *const args[] = {
|
||||
argv[0], "2", "3", "4", "2", "3", "4", "2", "3", "4",
|
||||
|
|
@ -26,7 +36,7 @@ int main(int argc, char **argv) {
|
|||
};
|
||||
|
||||
pid_t pid;
|
||||
int s = posix_spawn(&pid, argv[0], &file_actions, &attr, args, env);
|
||||
s = posix_spawn(&pid, argv[0], &file_actions, &attr, args, env);
|
||||
assert(!s);
|
||||
|
||||
waitpid(pid, &s, WUNTRACED | WCONTINUED);
|
||||
|
|
|
|||
Loading…
Reference in New Issue