Hunt down more bugs

After going through the MODE=dbg and MODE=zero build modes, a bunch of
little issues were identified, which have been addressed. Fixing those
issues created even more troubles for the project, because it improved
our ability to detect latent problems which are getting fixed so fast.
This commit is contained in:
Justine Tunney 2023-07-03 17:35:11 -07:00
parent 73c0faa1b5
commit 97b7116953
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
39 changed files with 557 additions and 754 deletions

View file

@ -54,6 +54,7 @@ TEST(getcontext, test) {
TEST(getcontext, canReadAndWriteSignalMask) {
sigset_t ss, old;
volatile int n = 0;
EXPECT_TRUE(__interruptible);
sigemptyset(&ss);
sigaddset(&ss, SIGUSR1);
sigprocmask(SIG_SETMASK, &ss, &old);
@ -81,7 +82,10 @@ void SetGetContext(void) {
}
BENCH(getcontext, bench) {
EZBENCH2("get/setcontext", donothing, SetGetContext());
__interruptible = false;
EZBENCH2("getsetcontext nosig", donothing, SetGetContext());
__interruptible = true;
EZBENCH2("getsetcontext", donothing, SetGetContext());
}
BENCH(swapcontext, bench) {
@ -95,7 +99,11 @@ BENCH(swapcontext, bench) {
}
} else {
ready = true;
EZBENCH2("x2 swapcontext", donothing, swapcontext(&loop, &main));
__interruptible = false;
EZBENCH2("swapcontextx2 nosig", donothing, swapcontext(&loop, &main));
// kprintf("dollar\n");
__interruptible = true;
EZBENCH2("swapcontextx2", donothing, swapcontext(&loop, &main));
// kprintf("dollar\n");
}
}