6
6
7
7
#include "_common.h"
8
8
9
- #include <stdlib.h>
10
-
11
9
#ifdef CONFIG_POSIX_API
12
10
#include <signal.h>
13
11
#else
21
19
*/
22
20
ZTEST (posix_headers , test_signal_h )
23
21
{
24
- typedef void * (* my_sig_handler_t )(int signo );
25
-
26
- my_sig_handler_t handler ;
27
-
28
- handler = SIG_DFL ;
29
- handler = SIG_ERR ;
30
- handler = SIG_IGN ;
22
+ /* zassert_not_equal(-1, SIG_DFL); */ /* not implemented */
23
+ /* zassert_not_equal(-1, SIG_ERR); */ /* not implemented */
31
24
/* zassert_not_equal(-1, SIG_HOLD); */ /* not implemented */
25
+ /* zassert_not_equal(-1, SIG_IGN); */ /* not implemented */
32
26
33
27
zassert_not_equal ((sig_atomic_t )- 1 , (sig_atomic_t )0 );
34
- zassert_not_equal ((pid_t )- 1 , (pid_t )0 );
28
+ /* zassert_not_equal((pid_t)-1, (pid_t)0); */ /* not implemented */
35
29
36
30
zassert_not_equal (-1 , offsetof(struct sigevent , sigev_notify ));
37
31
zassert_not_equal (-1 , offsetof(struct sigevent , sigev_signo ));
@@ -53,15 +47,6 @@ ZTEST(posix_headers, test_signal_h)
53
47
zassert_not_equal (-1 , SIG_UNBLOCK );
54
48
zassert_not_equal (-1 , SIG_SETMASK );
55
49
56
- zassert_not_equal (-1 , offsetof(struct sigaction , sa_handler ));
57
- zassert_not_equal (-1 , offsetof(struct sigaction , sa_mask ));
58
- zassert_not_equal (-1 , offsetof(struct sigaction , sa_flags ));
59
- zassert_not_equal (-1 , offsetof(struct sigaction , sa_sigaction ));
60
-
61
- zassert_not_equal (-1 , offsetof(siginfo_t , si_signo ));
62
- zassert_not_equal (-1 , offsetof(siginfo_t , si_code ));
63
- zassert_not_equal (-1 , offsetof(siginfo_t , si_value ));
64
-
65
50
/* zassert_not_equal(-1, SA_NOCLDSTOP); */ /* not implemented */
66
51
/* zassert_not_equal(-1, SA_ONSTACK); */ /* not implemented */
67
52
/* zassert_not_equal(-1, SA_RESETHAND); */ /* not implemented */
@@ -132,11 +117,18 @@ ZTEST(posix_headers, test_signal_h)
132
117
/* zassert_not_equal(-1, CLD_STOPPED); */ /* not implemented */
133
118
/* zassert_not_equal(-1, CLD_CONTINUED); */ /* not implemented */
134
119
135
- zassert_not_equal (-1 , SI_USER );
136
- zassert_not_equal (-1 , SI_QUEUE );
137
- zassert_not_equal (-1 , SI_TIMER );
138
- zassert_not_equal (-1 , SI_ASYNCIO );
139
- zassert_not_equal (-1 , SI_MESGQ );
120
+ /* zassert_not_equal(-1, POLL_IN); */ /* not implemented */
121
+ /* zassert_not_equal(-1, POLL_OUT); */ /* not implemented */
122
+ /* zassert_not_equal(-1, POLL_MSG); */ /* not implemented */
123
+ /* zassert_not_equal(-1, POLL_ERR); */ /* not implemented */
124
+ /* zassert_not_equal(-1, POLL_PRI); */ /* not implemented */
125
+ /* zassert_not_equal(-1, POLL_HUP); */ /* not implemented */
126
+
127
+ /* zassert_not_equal(-1, SI_USER); */ /* not implemented */
128
+ /* zassert_not_equal(-1, SI_QUEUE); */ /* not implemented */
129
+ /* zassert_not_equal(-1, SI_TIMER); */ /* not implemented */
130
+ /* zassert_not_equal(-1, SI_ASYNCIO); */ /* not implemented */
131
+ /* zassert_not_equal(-1, SI_MESGQ); */ /* not implemented */
140
132
141
133
#ifdef CONFIG_POSIX_SIGNALS
142
134
zassert_true (SIGRTMIN >= 0 );
@@ -166,40 +158,37 @@ ZTEST(posix_headers, test_signal_h)
166
158
zassert_not_equal (-1 , SIGXCPU );
167
159
zassert_not_equal (-1 , SIGXFSZ );
168
160
zassert_not_equal (((sigset_t ){.sig [0 ] = 0 }).sig [0 ], ((sigset_t ){.sig [0 ] = -1 }).sig [0 ]);
169
- zassert_not_null (abort );
170
- zassert_not_null (alarm );
171
- zassert_not_null (kill );
172
- zassert_not_null (pause );
173
- zassert_not_null (pthread_sigmask );
174
- zassert_not_null (raise );
175
- zassert_not_null (sigaction );
176
- zassert_not_null (sigaddset );
177
- zassert_not_null (sigdelset );
178
161
zassert_not_null (sigemptyset );
179
162
zassert_not_null (sigfillset );
163
+ zassert_not_null (sigaddset );
164
+ zassert_not_null (sigdelset );
180
165
zassert_not_null (sigismember );
181
- zassert_not_null (signal );
182
- zassert_not_null (sigpending );
183
- zassert_not_null (sigprocmask );
184
- zassert_not_null (sigsuspend );
185
- zassert_not_null (sigwait );
186
166
zassert_not_null (strsignal );
167
+ zassert_not_null (sigprocmask );
168
+ zassert_not_null (pthread_sigmask );
187
169
#endif /* CONFIG_POSIX_SIGNALS */
188
170
189
171
if (IS_ENABLED (CONFIG_POSIX_API )) {
172
+ /* zassert_not_null(kill); */ /* not implemented */
190
173
/* zassert_not_null(killpg); */ /* not implemented */
191
174
/* zassert_not_null(psiginfo); */ /* not implemented */
192
175
/* zassert_not_null(psignal); */ /* not implemented */
193
176
/* zassert_not_null(pthread_kill); */ /* not implemented */
177
+ /* zassert_not_null(raise); */ /* not implemented */
178
+ /* zassert_not_null(sigaction); */ /* not implemented */
194
179
/* zassert_not_null(sigaltstack); */ /* not implemented */
195
180
/* zassert_not_null(sighold); */ /* not implemented */
196
181
/* zassert_not_null(sigignore); */ /* not implemented */
197
182
/* zassert_not_null(siginterrupt); */ /* not implemented */
183
+ /* zassert_not_null(signal); */ /* not implemented */
198
184
/* zassert_not_null(sigpause); */ /* not implemented */
185
+ /* zassert_not_null(sigpending); */ /* not implemented */
199
186
/* zassert_not_null(sigqueue); */ /* not implemented */
200
187
/* zassert_not_null(sigrelse); */ /* not implemented */
201
188
/* zassert_not_null(sigset); */ /* not implemented */
189
+ /* zassert_not_null(sigsuspend); */ /* not implemented */
202
190
/* zassert_not_null(sigtimedwait); */ /* not implemented */
191
+ /* zassert_not_null(sigwait); */ /* not implemented */
203
192
/* zassert_not_null(sigwaitinfo); */ /* not implemented */
204
193
}
205
194
}
0 commit comments