Skip to content

Commit

Permalink
Revert "tests: posix: headers: add checks for posix signals option gr…
Browse files Browse the repository at this point in the history
…oup"

This reverts commit 308322e.

PR zephyrproject-rtos#73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
zephyrproject-rtos#75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
  • Loading branch information
aescolar authored and DashingR committed Jul 15, 2024
1 parent 1903caf commit 4742a5c
Showing 1 changed file with 27 additions and 38 deletions.
65 changes: 27 additions & 38 deletions tests/posix/headers/src/signal_h.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

#include "_common.h"

#include <stdlib.h>

#ifdef CONFIG_POSIX_API
#include <signal.h>
#else
Expand All @@ -21,17 +19,13 @@
*/
ZTEST(posix_headers, test_signal_h)
{
typedef void *(*my_sig_handler_t)(int signo);

my_sig_handler_t handler;

handler = SIG_DFL;
handler = SIG_ERR;
handler = SIG_IGN;
/* zassert_not_equal(-1, SIG_DFL); */ /* not implemented */
/* zassert_not_equal(-1, SIG_ERR); */ /* not implemented */
/* zassert_not_equal(-1, SIG_HOLD); */ /* not implemented */
/* zassert_not_equal(-1, SIG_IGN); */ /* not implemented */

zassert_not_equal((sig_atomic_t)-1, (sig_atomic_t)0);
zassert_not_equal((pid_t)-1, (pid_t)0);
/* zassert_not_equal((pid_t)-1, (pid_t)0); */ /* not implemented */

zassert_not_equal(-1, offsetof(struct sigevent, sigev_notify));
zassert_not_equal(-1, offsetof(struct sigevent, sigev_signo));
Expand All @@ -53,15 +47,6 @@ ZTEST(posix_headers, test_signal_h)
zassert_not_equal(-1, SIG_UNBLOCK);
zassert_not_equal(-1, SIG_SETMASK);

zassert_not_equal(-1, offsetof(struct sigaction, sa_handler));
zassert_not_equal(-1, offsetof(struct sigaction, sa_mask));
zassert_not_equal(-1, offsetof(struct sigaction, sa_flags));
zassert_not_equal(-1, offsetof(struct sigaction, sa_sigaction));

zassert_not_equal(-1, offsetof(siginfo_t, si_signo));
zassert_not_equal(-1, offsetof(siginfo_t, si_code));
zassert_not_equal(-1, offsetof(siginfo_t, si_value));

/* zassert_not_equal(-1, SA_NOCLDSTOP); */ /* not implemented */
/* zassert_not_equal(-1, SA_ONSTACK); */ /* not implemented */
/* zassert_not_equal(-1, SA_RESETHAND); */ /* not implemented */
Expand Down Expand Up @@ -132,11 +117,18 @@ ZTEST(posix_headers, test_signal_h)
/* zassert_not_equal(-1, CLD_STOPPED); */ /* not implemented */
/* zassert_not_equal(-1, CLD_CONTINUED); */ /* not implemented */

zassert_not_equal(-1, SI_USER);
zassert_not_equal(-1, SI_QUEUE);
zassert_not_equal(-1, SI_TIMER);
zassert_not_equal(-1, SI_ASYNCIO);
zassert_not_equal(-1, SI_MESGQ);
/* zassert_not_equal(-1, POLL_IN); */ /* not implemented */
/* zassert_not_equal(-1, POLL_OUT); */ /* not implemented */
/* zassert_not_equal(-1, POLL_MSG); */ /* not implemented */
/* zassert_not_equal(-1, POLL_ERR); */ /* not implemented */
/* zassert_not_equal(-1, POLL_PRI); */ /* not implemented */
/* zassert_not_equal(-1, POLL_HUP); */ /* not implemented */

/* zassert_not_equal(-1, SI_USER); */ /* not implemented */
/* zassert_not_equal(-1, SI_QUEUE); */ /* not implemented */
/* zassert_not_equal(-1, SI_TIMER); */ /* not implemented */
/* zassert_not_equal(-1, SI_ASYNCIO); */ /* not implemented */
/* zassert_not_equal(-1, SI_MESGQ); */ /* not implemented */

#ifdef CONFIG_POSIX_SIGNALS
zassert_true(SIGRTMIN >= 0);
Expand Down Expand Up @@ -166,40 +158,37 @@ ZTEST(posix_headers, test_signal_h)
zassert_not_equal(-1, SIGXCPU);
zassert_not_equal(-1, SIGXFSZ);
zassert_not_equal(((sigset_t){.sig[0] = 0}).sig[0], ((sigset_t){.sig[0] = -1}).sig[0]);
zassert_not_null(abort);
zassert_not_null(alarm);
zassert_not_null(kill);
zassert_not_null(pause);
zassert_not_null(pthread_sigmask);
zassert_not_null(raise);
zassert_not_null(sigaction);
zassert_not_null(sigaddset);
zassert_not_null(sigdelset);
zassert_not_null(sigemptyset);
zassert_not_null(sigfillset);
zassert_not_null(sigaddset);
zassert_not_null(sigdelset);
zassert_not_null(sigismember);
zassert_not_null(signal);
zassert_not_null(sigpending);
zassert_not_null(sigprocmask);
zassert_not_null(sigsuspend);
zassert_not_null(sigwait);
zassert_not_null(strsignal);
zassert_not_null(sigprocmask);
zassert_not_null(pthread_sigmask);
#endif /* CONFIG_POSIX_SIGNALS */

if (IS_ENABLED(CONFIG_POSIX_API)) {
/* zassert_not_null(kill); */ /* not implemented */
/* zassert_not_null(killpg); */ /* not implemented */
/* zassert_not_null(psiginfo); */ /* not implemented */
/* zassert_not_null(psignal); */ /* not implemented */
/* zassert_not_null(pthread_kill); */ /* not implemented */
/* zassert_not_null(raise); */ /* not implemented */
/* zassert_not_null(sigaction); */ /* not implemented */
/* zassert_not_null(sigaltstack); */ /* not implemented */
/* zassert_not_null(sighold); */ /* not implemented */
/* zassert_not_null(sigignore); */ /* not implemented */
/* zassert_not_null(siginterrupt); */ /* not implemented */
/* zassert_not_null(signal); */ /* not implemented */
/* zassert_not_null(sigpause); */ /* not implemented */
/* zassert_not_null(sigpending); */ /* not implemented */
/* zassert_not_null(sigqueue); */ /* not implemented */
/* zassert_not_null(sigrelse); */ /* not implemented */
/* zassert_not_null(sigset); */ /* not implemented */
/* zassert_not_null(sigsuspend); */ /* not implemented */
/* zassert_not_null(sigtimedwait); */ /* not implemented */
/* zassert_not_null(sigwait); */ /* not implemented */
/* zassert_not_null(sigwaitinfo); */ /* not implemented */
}
}

0 comments on commit 4742a5c

Please sign in to comment.