diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/signal/6-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/signal/6-1.c index ea9e0a9fd4..d032e2be3f 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/signal/6-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/signal/6-1.c @@ -24,15 +24,15 @@ void myhandler(int signo) int main() { - errno = -1; + errno = 0; if (signal(-1, myhandler) != SIG_ERR) { printf("Test FAILED: signal() didn't return SIG_ERR even though invalid signal number was passed to it\n"); return PTS_FAIL; } - if (errno <= 0) { - printf("Test FAILED: errno wasn't set to a positive number even though invalid signal number was passed to the signal() function\n"); + if (errno != EINVAL) { + printf("Test FAILED: errno wasn't set to EINVAL even though invalid signal number was passed to the signal() function\n"); return PTS_FAIL; } printf("signal(): Test passed\n"); diff --git a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/signal/7-1.c b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/signal/7-1.c index d4a59427d7..e213dacb32 100644 --- a/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/signal/7-1.c +++ b/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/signal/7-1.c @@ -24,15 +24,15 @@ void myhandler(int signo) int main() { - errno = -1; + errno = 0; if (signal(SIGKILL, myhandler) != SIG_ERR) { printf("Test FAILED: signal() didn't return SIG_ERR even though a non-catchable signal was passed to it\n"); return PTS_FAIL; } - if (errno <= 0) { - printf("Test FAILED: errno wasn't set to a positive number even though a non-catchable signal was passed to the signal() function\n"); + if (errno != EINVAL) { + printf("Test FAILED: errno wasn't set to EINVAL even though a non-catchable signal was passed to the signal() function\n"); return PTS_FAIL; } printf("signal(): Test passed\n");