Skip to content

Commit 8316dec

Browse files
committed
wasi: fix up wasi tests for ibmi
ibmi now reports os400 instead of aix Signed-off-by: Michael Dawson <[email protected]>
1 parent 1dc0667 commit 8316dec

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

test/wasi/c/poll.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ int main(void) {
1010
time_t before, now;
1111
int ret;
1212
char* platform;
13-
int is_aix;
13+
int is_aix_or_os400;
1414
int is_win;
1515

1616
platform = getenv("NODE_PLATFORM");
17-
is_aix = platform != NULL && 0 == strcmp(platform, "aix");
17+
is_aix_or_os400 = platform != NULL && (0 == strcmp(platform, "aix") || 0 == strcmp(platform, "os400"));
1818
is_win = platform != NULL && 0 == strcmp(platform, "win32");
1919

2020
// Test sleep() behavior.
@@ -64,7 +64,7 @@ int main(void) {
6464
ret = poll(fds, 1, 2000);
6565
assert(ret == 1);
6666

67-
if (is_aix)
67+
if (is_aix_or_os400)
6868
assert(fds[0].revents == POLLIN);
6969
else
7070
assert(fds[0].revents == (POLLHUP | POLLIN));

test/wasi/c/readdir.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ int main() {
1414

1515
platform = getenv("NODE_PLATFORM");
1616
assert(platform != NULL);
17-
has_d_type = (0 != strcmp(platform, "aix") && 0 != strcmp(platform, "sunos"));
17+
has_d_type = (0 != strcmp(platform, "aix") && 0 != strcmp(platform, "sunos")) && 0 != strcmp(platform, "os400");
1818

1919
dir = opendir("/sandbox");
2020
assert(dir != NULL);

test/wasi/wasm/poll.wasm

-570 Bytes
Binary file not shown.

test/wasi/wasm/readdir.wasm

475 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)