Commit f167081f authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Merge branch 'fix-test' into 'master'

Re-enable netdb tests, fix compiler warning, improve brk coverage

See merge request redox-os/relibc!254
parents a3f7a174 18e1a560
......@@ -16,10 +16,13 @@ EXPECT_NAMES=\
libgen \
locale \
math \
netdb/getaddrinfo \
netdb/netdb \
ptrace \
regex \
select \
setjmp \
signal \
stdio/all \
stdio/buffer \
stdio/fgets \
......@@ -98,11 +101,7 @@ EXPECT_NAMES=\
wchar/wcsstr \
wchar/wcstod \
wchar/wcstok \
wchar/wcstol \
signal
# TODO: Fix these
# netdb/getaddrinfo \
# netdb/netdb \
wchar/wcstol
# Binaries that may generate varied output
NAMES=\
......
IPv4 address: 23.21.162.66 (www.redox-os.org)
No visible errors occurred!
......@@ -5,10 +5,22 @@
#include "test_helpers.h"
int main(void) {
// sbrk report current brk
void * current = sbrk(0);
ERROR_IF(sbrk, current, == (void *)-1);
int status = brk(current + 4096);
// sbrk increment and report previous brk
void * prev = current;
current = sbrk(4096);
ERROR_IF(sbrk, current, != prev);
// sbrk report current break
prev = current;
current = sbrk(0);
ERROR_IF(sbrk, current, != (void*)((uintptr_t)prev + 4096));
// brk set break to new value
int status = brk((void*)((uintptr_t)current + 4096));
ERROR_IF(brk, status, == -1);
UNEXP_IF(brk, status, != 0);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment