Merging in 2.0.2.

This commit is contained in:
Geoffrey Challen
2017-01-09 22:37:50 -05:00
parent a0406ec181
commit 50cf3276e7
118 changed files with 1350 additions and 3158 deletions

View File

@@ -39,7 +39,6 @@
#include <unistd.h>
#include <errno.h>
#include <err.h>
#include <test161/test161.h>
/*
* Some initialized data. This is here to increase the chance that
@@ -79,7 +78,6 @@ check_data(void)
if (k != SUM_OF_DATA_STUFF) {
warnx("My initialized data sums to the wrong value!");
warnx("Got: %u Expected: %u", k, SUM_OF_DATA_STUFF);
success(TEST161_FAIL, SECRET, "/testbin/zero");
errx(1, "FAILED");
}
}
@@ -96,7 +94,6 @@ check_bss(void)
warnx("BSS entry at index %u (address %p) not zero!",
i, &bss_stuff[i]);
warnx("Found: 0x%x", bss_stuff[i]);
success(TEST161_FAIL, SECRET, "/testbin/zero");
errx(1, "FAILED");
}
}
@@ -115,10 +112,9 @@ check_sbrk(void)
base = sbrk(SBRK_SIZE);
if (base == (void *)-1) {
if (errno == ENOSYS) {
tprintf("I guess you haven't implemented sbrk yet.\n");
printf("I guess you haven't implemented sbrk yet.\n");
return;
}
success(TEST161_FAIL, SECRET, "/testbin/zero");
err(1, "sbrk");
}
@@ -128,7 +124,6 @@ check_sbrk(void)
i, &base[i]);
warnx("Got: 0x%x", (unsigned char)base[i]);
warnx("Base of sbrk region: %p", base);
success(TEST161_FAIL, SECRET, "/testbin/zero");
errx(1, "FAILED");
}
}
@@ -138,13 +133,13 @@ check_sbrk(void)
int
main(void)
{
tprintf("zero: phase 1: checking .bss\n");
printf("zero: phase 1: checking .bss\n");
check_data();
check_bss();
tprintf("zero: phase 2: checking sbrk()\n");
printf("zero: phase 2: checking sbrk()\n");
check_sbrk();
success(TEST161_SUCCESS, SECRET, "/testbin/zero");
printf("zero: passed\n");
return 0;
}