summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/enet/unix.c2
-rw-r--r--tests/sockets/test_gethostbyname.c9
-rw-r--r--tests/test_core.py1
-rw-r--r--tests/test_other.py2
-rw-r--r--tests/test_sanity.py2
-rw-r--r--tests/unistd/login.out2
-rw-r--r--tests/unistd/misc.out8
7 files changed, 16 insertions, 10 deletions
diff --git a/tests/enet/unix.c b/tests/enet/unix.c
index a225b57d..67d4a8b8 100644
--- a/tests/enet/unix.c
+++ b/tests/enet/unix.c
@@ -80,7 +80,7 @@ enet_address_set_host (ENetAddress * address, const char * name)
char buffer [2048];
int errnum;
-#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__EMSCRIPTEN__)
gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & hostEntry, & errnum);
#else
hostEntry = gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & errnum);
diff --git a/tests/sockets/test_gethostbyname.c b/tests/sockets/test_gethostbyname.c
index de7da706..459c6b98 100644
--- a/tests/sockets/test_gethostbyname.c
+++ b/tests/sockets/test_gethostbyname.c
@@ -13,12 +13,17 @@
int main() {
char str[INET_ADDRSTRLEN];
+ struct hostent *host = NULL;
+ struct hostent hostData;
struct in_addr addr;
const char *res;
+ char buffer[2048];
int err;
- // resolve the hostname ot an actual address
- struct hostent *host = gethostbyname("slashdot.org");
+ // gethostbyname_r calls the same stuff as gethostbyname, so we'll test the
+ // more complicated one.
+ // resolve the hostname to an actual address
+ gethostbyname_r("slashdot.org", &hostData, buffer, sizeof(buffer), &host, &err);
assert(host->h_addrtype == AF_INET);
assert(host->h_length == sizeof(uint32_t));
diff --git a/tests/test_core.py b/tests/test_core.py
index d02e6778..dd3b7c44 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -1431,6 +1431,7 @@ Succeeded!
self.do_run(src, 'BUG?\nDisplay: Vu=465.100000 Vv=465.200000 Wu=160.300000 Wv=111.400000')
def test_math(self):
+ if Settings.USE_TYPED_ARRAYS != 2: return self.skip('requires ta2')
src = '''
#include <stdio.h>
#include <stdlib.h>
diff --git a/tests/test_other.py b/tests/test_other.py
index 64be60fa..b11f22e5 100644
--- a/tests/test_other.py
+++ b/tests/test_other.py
@@ -1755,7 +1755,7 @@ $
other=ay file...
seeked= file.
''', output[0])
- self.assertIdentical('texte\n', output[1])
+ self.assertContained('texte\n', output[1])
def test_emconfig(self):
output = Popen([PYTHON, EMCONFIG, 'LLVM_ROOT'], stdout=PIPE, stderr=PIPE).communicate()[0].strip()
diff --git a/tests/test_sanity.py b/tests/test_sanity.py
index 4188afff..6fdf5ddd 100644
--- a/tests/test_sanity.py
+++ b/tests/test_sanity.py
@@ -478,7 +478,7 @@ fi
(['--jcache'], 'hello_malloc.cpp', False, True, False, True, False, True, []),
([], 'hello_malloc.cpp', False, False, False, False, False, False, []),
# new, huge file
- ([], 'hello_libcxx.cpp', False, False, False, False, False, False, ('3 chunks',)),
+ ([], 'hello_libcxx.cpp', False, False, False, False, False, False, ('4 chunks',)),
(['--jcache'], 'hello_libcxx.cpp', True, False, True, False, True, False, []),
(['--jcache'], 'hello_libcxx.cpp', False, True, False, True, False, True, []),
([], 'hello_libcxx.cpp', False, False, False, False, False, False, []),
diff --git a/tests/unistd/login.out b/tests/unistd/login.out
index 50e850ae..c1919c3c 100644
--- a/tests/unistd/login.out
+++ b/tests/unistd/login.out
@@ -3,7 +3,7 @@ errno: 0
gethostname/2 ret: -1
gethostname/2: em------------------------
-errno: 91
+errno: 36
gethostname/256 ret: 0
gethostname/256: emscripten
diff --git a/tests/unistd/misc.out b/tests/unistd/misc.out
index 8f03f688..ae641d57 100644
--- a/tests/unistd/misc.out
+++ b/tests/unistd/misc.out
@@ -11,8 +11,8 @@ lockf(good): 0, errno: 0
lockf(bad): -1, errno: 9
nice: 0, errno: 1
pause: -1, errno: 4
-pipe(good): -1, errno: 88
-pipe(bad): -1, errno: 88
+pipe(good): -1, errno: 38
+pipe(bad): -1, errno: 38
execl: -1, errno: 8
execle: -1, errno: 8
execlp: -1, errno: 8
@@ -29,8 +29,8 @@ alarm: 0, errno: 0
ualarm: 0, errno: 0
fork: -1, errno: 11
vfork: -1, errno: 11
-crypt: (null), errno: 88
-encrypt, errno: 88
+crypt: (null), errno: 38
+encrypt, errno: 38
getgid: 0, errno: 0
getegid: 0, errno: 0
getuid: 0, errno: 0