mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 08:12:28 +00:00
Get all tests passing on NetBSD
This commit is contained in:
parent
23ae9dfceb
commit
b2cd58a322
41 changed files with 202 additions and 655 deletions
|
@ -32,6 +32,10 @@ void OnSigInt(int sig) {
|
|||
gotsigint = true;
|
||||
}
|
||||
|
||||
void SetUp(void) {
|
||||
gotsigint = false;
|
||||
}
|
||||
|
||||
TEST(sigaction, test) {
|
||||
/* TODO(jart): Why does RHEL5 behave differently? */
|
||||
/* TODO(jart): Windows needs huge signal overhaul */
|
||||
|
@ -61,3 +65,12 @@ TEST(sigaction, test) {
|
|||
EXPECT_EQ(0, WTERMSIG(status));
|
||||
EXPECT_NE(-1, sigprocmask(SIG_BLOCK, &oldmask, NULL));
|
||||
}
|
||||
|
||||
TEST(sigaction, raise) {
|
||||
if (IsWindows()) return;
|
||||
struct sigaction saint = {.sa_handler = OnSigInt};
|
||||
EXPECT_NE(-1, sigaction(SIGINT, &saint, NULL));
|
||||
ASSERT_FALSE(gotsigint);
|
||||
EXPECT_NE(-1, raise(SIGINT));
|
||||
ASSERT_TRUE(gotsigint);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue