/[ascend]/trunk/ascend/utilities/test/test_ascSignal.c
ViewVC logotype

Contents of /trunk/ascend/utilities/test/test_ascSignal.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2535 - (show annotations) (download) (as text)
Thu Jan 26 00:19:50 2012 UTC (10 years, 5 months ago) by jpye
File MIME type: text/x-csrc
File size: 17983 byte(s)
New implementation of signal handler stacks, less code.
Fixed one issue with utilities_ascSignal test cases, but can't work out reason for the other.
1 /*
2 * Unit test functions for ASCEND: utilities/ascSignal.c
3 *
4 * Copyright (C) 2005 Jerry St.Clair
5 *
6 * This file is part of the Ascend Environment.
7 *
8 * The Ascend Environment is free software; you can redistribute it
9 * and/or modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
12 *
13 * The Ascend Environment is distributed in hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with the program; if not, write to the Free Software Foundation,
20 * Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check the file named
21 * COPYING.
22 */
23
24 #include <ascend/utilities/ascSignal.h>
25 #include <ascend/general/platform.h>
26 #include <ascend/general/ascMalloc.h>
27 #include <test/common.h>
28 #include <stdio.h>
29
30 static jmp_buf my_jmp_buf1;
31 static int f_handler1_called;
32 static int f_handler1_sigval;
33 /*
34 * Signal handler for unit tests.
35 * Resets the signal handlers and sets f_handler1_called to
36 * TRUE and f_handler1_sigval to the signal type code (-1 if
37 * an unsupported sigval). Then longjmp's using
38 * my_jmp_buf1 and the sigval.
39 */
40 void my_handler1(int sigval){
41 f_handler1_called = TRUE;
42 Asc_SignalRecover(FALSE);
43 switch (sigval){
44 case SIGFPE:
45 FPRESET;
46 case SIGINT:
47 case SIGSEGV:
48 f_handler1_sigval = sigval;
49 break;
50 default:
51 f_handler1_sigval = -1;
52 break;
53 }
54 longjmp(my_jmp_buf1, sigval);
55 }
56
57 static jmp_buf my_jmp_buf2;
58 static int f_handler2_called;
59 static int f_handler2_sigval;
60 /* identical to my_handler1 */
61 void my_handler2(int sigval){
62 f_handler2_called = TRUE;
63 Asc_SignalRecover(FALSE);
64 switch (sigval){
65 case SIGFPE:
66 FPRESET;
67 case SIGINT:
68 case SIGSEGV:
69 f_handler2_sigval = sigval;
70 break;
71 default:
72 f_handler2_sigval = -1;
73 break;
74 }
75 longjmp(my_jmp_buf2, sigval);
76 }
77
78 static jmp_buf my_jmp_buf3;
79 static int f_handler3_called;
80 static int f_handler3_sigval;
81 /* identical to my_handler1 */
82 void my_handler3(int sigval){
83 f_handler3_called = TRUE;
84 Asc_SignalRecover(FALSE);
85 switch (sigval){
86 case SIGFPE:
87 FPRESET;
88 case SIGINT:
89 case SIGSEGV:
90 f_handler3_sigval = sigval;
91 break;
92 default:
93 f_handler3_sigval = -1;
94 break;
95 }
96 longjmp(my_jmp_buf3, sigval);
97 }
98
99 /*----------------------------------------------------------------------------*/
100
101 static void test_ascSignal(void){
102 SigHandlerFn* old_fpe_handler = NULL;
103 SigHandlerFn* old_int_handler = NULL;
104 SigHandlerFn* old_seg_handler = NULL;
105 SigHandlerFn* old_handler;
106 volatile int signal1_caught;
107 volatile int signal2_caught;
108 volatile int signal3_caught;
109 unsigned long prior_meminuse;
110
111 prior_meminuse = ascmeminuse(); /* save meminuse() at start of test function */
112
113 #ifdef NO_SIGNAL_TRAPS
114 /* no point in testing if the functionality is disabled */
115 CU_FAIL("Signal handler manager not enabled.");
116 #else
117
118 old_fpe_handler = signal(SIGFPE, my_handler1); /* save any pre-existing handlers */
119 old_int_handler = signal(SIGINT, my_handler1);
120 old_seg_handler = signal(SIGSEGV, my_handler1);
121
122 signal(SIGFPE, my_handler1); /* install some pre-existing handlers */
123 signal(SIGINT, SIG_DFL);
124 signal(SIGSEGV, my_handler2);
125
126 /* Asc_SignalInit(), Asc_SignalDestroy() - not much to test */
127
128 CU_TEST(0 == Asc_SignalInit()); /* initialize the signal manager */
129
130 /* previously-installed handlers should still be active */
131 CU_TEST(signal(SIGFPE, SIG_DFL) == my_handler1);
132 CU_TEST(signal(SIGINT, SIG_DFL) == SIG_DFL);
133 CU_TEST(signal(SIGSEGV, SIG_DFL) == my_handler2);
134
135 Asc_SignalRecover(TRUE);
136
137 /* handlers should have been reinstalled */
138 CU_TEST(signal(SIGFPE, SIG_DFL) == my_handler1);
139 CU_TEST(signal(SIGINT, SIG_DFL) == SIG_DFL);
140 CU_TEST(signal(SIGSEGV, SIG_DFL) == my_handler2);
141
142 Asc_SignalRecover(TRUE); /* back to h1, 0, h2 again */
143
144 /*
145 In the following, take
146 H1 = my_handler1
147 H2 = my_handler2
148 AS = Asc_SignalTrap
149 DF = SIG_DFL
150 00 = NULL
151 so the initial state of the stacks is
152 FPE:H1, INT:00, SEG: H2.
153 */
154
155 CONSOLE_DEBUG("INITIAL STACKS...");
156 Asc_SignalPrintStack(SIGFPE);
157 Asc_SignalPrintStack(SIGINT);
158 Asc_SignalPrintStack(SIGSEGV);
159
160 /* test Asc_SignalPush(), Asc_SignalPop() */
161 CU_TEST(Asc_SignalStackLength(SIGFPE) == 1);
162
163 CU_TEST(0 == Asc_SignalHandlerPush(SIGFPE, Asc_SignalTrap)); /* ok - supported signal, ok func */
164 CU_TEST(signal(SIGFPE, SIG_DFL) == Asc_SignalTrap);
165
166 CU_TEST(0 == Asc_SignalHandlerPush(SIGINT, my_handler1)); /* ok - supported signal, ok func */
167 CU_TEST(signal(SIGINT, SIG_DFL) == my_handler1);
168
169 CU_TEST(-2 == Asc_SignalHandlerPush(SIGSEGV, NULL)); /* NULL func - should have no effect */
170 CU_TEST(signal(SIGSEGV, SIG_DFL) == my_handler2); /* old handler should still be installed */
171
172 CU_TEST(0 != Asc_SignalHandlerPush(SIGILL, Asc_SignalTrap)); /* unsupported signal type */
173 CU_TEST(0 != Asc_SignalHandlerPush(SIGABRT, my_handler2)); /* unsupported signal type */
174
175 /* expect FPE:H1:AS, INT:00,H1, SEG:H2 */
176 CU_TEST(Asc_SignalStackLength(SIGFPE) == 2);
177
178 Asc_SignalRecover(TRUE);
179
180 CONSOLE_DEBUG("UPDATED STACKS...");
181 Asc_SignalPrintStack(SIGFPE);
182 Asc_SignalPrintStack(SIGINT);
183 Asc_SignalPrintStack(SIGSEGV);
184
185 /* handlers should have been reinstalled */
186 CU_TEST(signal(SIGFPE, SIG_DFL) == Asc_SignalTrap);
187 CU_TEST(signal(SIGINT, SIG_DFL) == my_handler1);
188 CU_TEST(signal(SIGSEGV, SIG_DFL) == my_handler2);
189 Asc_SignalRecover(TRUE); /* still at asc, h1, 0 */
190
191 CU_TEST(0 == Asc_SignalHandlerPop(SIGINT, my_handler1));
192 /* SIGINT should be reset to no handler */
193 /* expect FPE:H1:AS, INT:00, SEG:H2 */
194 CU_TEST(signal(SIGFPE, SIG_DFL) == Asc_SignalTrap);
195 CU_TEST(signal(SIGINT, SIG_DFL) == NULL);
196 CU_TEST(signal(SIGSEGV, SIG_DFL) == my_handler2);
197 Asc_SignalRecover(TRUE);
198
199 CONSOLE_DEBUG("Testing pop of incorrect handler...");
200 CU_TEST(0 != Asc_SignalHandlerPop(SIGFPE, my_handler2)); /* wrong handler indicated */
201 /* expect FPE:H1, INT:00, SEG:H2, but SIGFPE shoule still be AS. */
202 CU_TEST(signal(SIGFPE, SIG_DFL) == Asc_SignalTrap);
203 CU_TEST(signal(SIGINT, SIG_DFL) == NULL);
204 CU_TEST(signal(SIGSEGV, SIG_DFL) == my_handler2);
205
206 Asc_SignalRecover(TRUE);
207 /* but Asc_SignalRecover should fix up SIGFPE to H1 */
208 /* expect FPE:H1, INT:00, SEG:H2 */
209 CU_TEST(signal(SIGFPE, SIG_DFL) == my_handler1);
210 CU_TEST(signal(SIGINT, SIG_DFL) == NULL);
211 CU_TEST(signal(SIGSEGV, SIG_DFL) == my_handler2);
212 Asc_SignalRecover(TRUE);
213
214 CU_TEST(0 != Asc_SignalHandlerPop(SIGILL, my_handler1)); /* unsupported signal type */
215 CU_TEST(0 != Asc_SignalHandlerPop(SIGABRT, Asc_SignalTrap)); /* unsupported signal type */
216
217 /* should be no change in handlers */
218 CU_TEST(signal(SIGFPE, SIG_DFL) == my_handler1);
219 CU_TEST(signal(SIGINT, SIG_DFL) == NULL);
220 CU_TEST(signal(SIGSEGV, SIG_DFL) == my_handler2);
221 Asc_SignalRecover(TRUE);
222
223 /* test Asc_SignalTrap() */
224
225 //CONSOLE_DEBUG("Testing trapping of signals");
226 CU_TEST(0 == Asc_SignalHandlerPush(SIGFPE, Asc_SignalTrap));
227 CU_TEST(0 == Asc_SignalHandlerPush(SIGINT, Asc_SignalTrap));
228 CU_TEST(0 == Asc_SignalHandlerPush(SIGSEGV, Asc_SignalTrap));
229
230 signal1_caught = FALSE;
231 if (0 == setjmp(g_fpe_env)) { /* raise & catch a SIGFPE */
232 raise(SIGFPE);
233 }
234 else {
235 signal1_caught = TRUE;
236 CU_PASS("SIGFPE caught.");
237 }
238 CU_TEST(TRUE == signal1_caught);
239
240 signal1_caught = FALSE;
241 if (0 == setjmp(g_int_env)) { /* raise & catch a SIGINT */
242 raise(SIGINT);
243 }
244 else {
245 signal1_caught = TRUE;
246 CU_PASS("SIGINT caught.");
247 }
248 CU_TEST(TRUE == signal1_caught);
249
250 signal1_caught = FALSE;
251 if (0 == setjmp(g_seg_env)) { /* raise & catch a SIGSEGV */
252 raise(SIGSEGV);
253 }
254 else {
255 signal1_caught = TRUE;
256 CU_PASS("SIGSEGV caught.");
257 }
258 CU_TEST(TRUE == signal1_caught);
259
260 Asc_SignalRecover(TRUE);
261
262 CU_TEST(0 == Asc_SignalHandlerPop(SIGFPE, Asc_SignalTrap));
263 CU_TEST(0 == Asc_SignalHandlerPop(SIGINT, Asc_SignalTrap));
264 CU_TEST(0 == Asc_SignalHandlerPop(SIGSEGV, Asc_SignalTrap));
265
266 //CONSOLE_DEBUG("Check handler settings after pop");
267
268 /* handlers should be restored at this point */
269 CU_TEST(signal(SIGFPE, SIG_DFL) == my_handler1);
270 CU_TEST(signal(SIGINT, SIG_DFL) == NULL);
271 CU_TEST(signal(SIGSEGV, SIG_DFL) == my_handler2);
272 Asc_SignalRecover(TRUE);
273
274 CONSOLE_DEBUG("CURRENT STACKS...");
275 Asc_SignalPrintStack(SIGFPE);
276 Asc_SignalPrintStack(SIGINT);
277 Asc_SignalPrintStack(SIGSEGV);
278
279
280 /* test typical use with nesting of handlers */
281 //CONSOLE_DEBUG("Testing typical use of nested handlers");
282
283 f_handler1_called = FALSE; /* initialize flags for detecting flow */
284 f_handler1_sigval = 0;
285 f_handler2_called = FALSE;
286 f_handler2_sigval = 0;
287 f_handler3_called = FALSE;
288 f_handler3_sigval = 0;
289 signal1_caught = FALSE;
290 signal2_caught = FALSE;
291 signal3_caught = FALSE;
292
293 CU_TEST(0 == Asc_SignalHandlerPush(SIGFPE, my_handler1)); /* test for SIGFPE */
294 if(0 == setjmp(my_jmp_buf1)){
295 CU_TEST(0 == Asc_SignalHandlerPush(SIGFPE, my_handler2));
296 if(0 == setjmp(my_jmp_buf2)){
297 CU_TEST(0 == Asc_SignalHandlerPush(SIGFPE, my_handler3));
298
299 Asc_SignalRecover(TRUE);
300 CONSOLE_DEBUG("CURRENT STACKS...");
301 Asc_SignalPrintStack(SIGFPE);
302 Asc_SignalPrintStack(SIGINT);
303 Asc_SignalPrintStack(SIGSEGV);
304
305 if(0 == setjmp(my_jmp_buf3)){
306 /* make sure the expected handler is in place... */
307 CU_TEST(my_handler3 == signal(SIGFPE, my_handler3));
308
309 /* raise our first SIGFPE... */
310 CONSOLE_DEBUG("Raising SIGFPE exception...");
311 CU_TEST(0 == raise(SIGSEGV));
312
313 CU_FAIL("should'nt be here!");
314 CONSOLE_DEBUG("got here (didn't want to)");
315 //Asc_SignalTrap(SIGFPE);
316 //CONSOLE_DEBUG("and here");
317 }else{
318 /* catching our first SIGFPE, labelled 'signal 3' */
319 CONSOLE_DEBUG("got here");
320 CU_TEST(f_handler1_called == FALSE);
321 CU_TEST(f_handler1_sigval == 0);
322 CU_TEST(f_handler2_called == FALSE);
323 CU_TEST(f_handler2_sigval == 0);
324 signal3_caught = TRUE;
325 }
326 /* fall through: we should have caught 'signal 3' before this */
327 CONSOLE_DEBUG("down here");
328 CU_TEST(FALSE == signal1_caught);
329 CU_TEST(FALSE == signal2_caught);
330 CU_TEST(TRUE == signal3_caught);
331
332 CU_TEST(0 == Asc_SignalHandlerPop(SIGFPE, Asc_SignalTrap));
333
334 f_handler1_called = FALSE;
335 f_handler1_sigval = 0;
336 f_handler2_called = FALSE;
337 f_handler2_sigval = 0;
338 signal1_caught = FALSE;
339 signal2_caught = FALSE;
340 signal3_caught = FALSE;
341 raise(SIGFPE);
342 }else{
343 CU_TEST(f_handler1_called == FALSE);
344 CU_TEST(f_handler1_sigval == 0);
345 CU_TEST(f_handler2_called == TRUE);
346 CU_TEST(f_handler2_sigval == SIGFPE);
347 signal2_caught = TRUE;
348 }
349 CU_TEST(FALSE == signal1_caught);
350 CU_TEST(TRUE == signal2_caught);
351 CU_TEST(FALSE == signal3_caught);
352
353 CU_TEST(0 == Asc_SignalHandlerPop(SIGFPE, my_handler2));
354
355 f_handler1_called = FALSE;
356 f_handler1_sigval = 0;
357 f_handler2_called = FALSE;
358 f_handler2_sigval = 0;
359 signal1_caught = FALSE;
360 signal2_caught = FALSE;
361 signal3_caught = FALSE;
362 raise(SIGFPE);
363 }else{
364 CU_TEST(f_handler1_called == TRUE);
365 CU_TEST(f_handler1_sigval == SIGFPE);
366 CU_TEST(f_handler2_called == FALSE);
367 CU_TEST(f_handler2_sigval == 0);
368 signal1_caught = TRUE;
369 }
370 CU_TEST(TRUE == signal1_caught);
371 CU_TEST(FALSE == signal2_caught);
372 CU_TEST(FALSE == signal3_caught);
373
374 CU_TEST(0 == Asc_SignalHandlerPop(SIGFPE, my_handler1));
375
376 f_handler1_called = FALSE; /* initialize flags for detecting flow */
377 f_handler1_sigval = 0;
378 f_handler2_called = FALSE;
379 f_handler2_sigval = 0;
380 signal1_caught = FALSE;
381 signal2_caught = FALSE;
382 signal3_caught = FALSE;
383
384 CU_TEST(0 == Asc_SignalHandlerPush(SIGINT, my_handler2)); /* test for SIGINT */
385 if(0 == setjmp(my_jmp_buf2)) {
386 CU_TEST(0 == Asc_SignalHandlerPush(SIGINT, Asc_SignalTrap));
387 if(0 == setjmp(g_int_env)) {
388 CU_TEST(0 == Asc_SignalHandlerPush(SIGINT, my_handler1));
389 if(0 == setjmp(my_jmp_buf1)) {
390 raise(SIGINT);
391 CU_FAIL("shouldn't be here!");
392 }else{
393 CU_TEST(f_handler1_called == TRUE);
394 CU_TEST(f_handler1_sigval == SIGINT);
395 CU_TEST(f_handler2_called == FALSE);
396 CU_TEST(f_handler2_sigval == 0);
397 signal3_caught = TRUE;
398 }
399 CU_TEST(FALSE == signal1_caught);
400 CU_TEST(FALSE == signal2_caught);
401 CU_TEST(TRUE == signal3_caught);
402 CU_TEST(0 == Asc_SignalHandlerPop(SIGINT, my_handler1));
403 f_handler1_called = FALSE;
404 f_handler1_sigval = 0;
405 f_handler2_called = FALSE;
406 f_handler2_sigval = 0;
407 signal1_caught = FALSE;
408 signal2_caught = FALSE;
409 signal3_caught = FALSE;
410 raise(SIGINT);
411 }else{
412 CU_TEST(f_handler1_called == FALSE);
413 CU_TEST(f_handler1_sigval == 0);
414 CU_TEST(f_handler2_called == FALSE);
415 CU_TEST(f_handler2_sigval == 0);
416 signal2_caught = TRUE;
417 }
418 CU_TEST(FALSE == signal1_caught);
419 CU_TEST(TRUE == signal2_caught);
420 CU_TEST(FALSE == signal3_caught);
421 CU_TEST(0 == Asc_SignalHandlerPop(SIGINT, Asc_SignalTrap));
422 f_handler1_called = FALSE;
423 f_handler1_sigval = 0;
424 f_handler2_called = FALSE;
425 f_handler2_sigval = 0;
426 signal1_caught = FALSE;
427 signal2_caught = FALSE;
428 signal3_caught = FALSE;
429 raise(SIGINT);
430 }else{
431 CU_TEST(f_handler1_called == FALSE);
432 CU_TEST(f_handler1_sigval == 0);
433 CU_TEST(f_handler2_called == TRUE);
434 CU_TEST(f_handler2_sigval == SIGINT);
435 signal1_caught = TRUE;
436 }
437 CU_TEST(TRUE == signal1_caught);
438 CU_TEST(FALSE == signal2_caught);
439 CU_TEST(FALSE == signal3_caught);
440 CU_TEST(0 == Asc_SignalHandlerPop(SIGINT, my_handler2));
441
442 f_handler1_called = FALSE; /* initialize flags for detecting flow */
443 f_handler1_sigval = 0;
444 f_handler2_called = FALSE;
445 f_handler2_sigval = 0;
446 signal1_caught = FALSE;
447 signal2_caught = FALSE;
448 signal3_caught = FALSE;
449
450 CU_TEST(0 == Asc_SignalHandlerPush(SIGSEGV, Asc_SignalTrap)); /* test for SIGSEGV */
451 if(0 == setjmp(g_seg_env)) {
452 CU_TEST(0 == Asc_SignalHandlerPush(SIGSEGV, my_handler2));
453 if(0 == setjmp(my_jmp_buf2)) {
454 CU_TEST(0 == Asc_SignalHandlerPush(SIGSEGV, my_handler1));
455 if(0 == setjmp(my_jmp_buf1)) {
456 raise(SIGSEGV);
457 CU_FAIL("shouldn't be here!");
458 }else{
459 CU_TEST(f_handler1_called == TRUE);
460 CU_TEST(f_handler1_sigval == SIGSEGV);
461 CU_TEST(f_handler2_called == FALSE);
462 CU_TEST(f_handler2_sigval == 0);
463 signal3_caught = TRUE;
464 }
465 CU_TEST(FALSE == signal1_caught);
466 CU_TEST(FALSE == signal2_caught);
467 CU_TEST(TRUE == signal3_caught);
468 CU_TEST(0 == Asc_SignalHandlerPop(SIGSEGV, my_handler1));
469 f_handler1_called = FALSE;
470 f_handler1_sigval = 0;
471 f_handler2_called = FALSE;
472 f_handler2_sigval = 0;
473 signal1_caught = FALSE;
474 signal2_caught = FALSE;
475 signal3_caught = FALSE;
476 raise(SIGSEGV);
477 }else{
478 CU_TEST(f_handler1_called == FALSE);
479 CU_TEST(f_handler1_sigval == 0);
480 CU_TEST(f_handler2_called == TRUE);
481 CU_TEST(f_handler2_sigval == SIGSEGV);
482 signal2_caught = TRUE;
483 }
484 CU_TEST(FALSE == signal1_caught);
485 CU_TEST(TRUE == signal2_caught);
486 CU_TEST(FALSE == signal3_caught);
487 CU_TEST(0 == Asc_SignalHandlerPop(SIGSEGV, my_handler2));
488 f_handler1_called = FALSE;
489 f_handler1_sigval = 0;
490 f_handler2_called = FALSE;
491 f_handler2_sigval = 0;
492 signal1_caught = FALSE;
493 signal2_caught = FALSE;
494 signal3_caught = FALSE;
495 raise(SIGSEGV);
496 }else{
497 CU_TEST(f_handler1_called == FALSE);
498 CU_TEST(f_handler1_sigval == 0);
499 CU_TEST(f_handler2_called == FALSE);
500 CU_TEST(f_handler2_sigval == 0);
501 signal1_caught = TRUE;
502 }
503 CU_TEST(TRUE == signal1_caught);
504 CU_TEST(FALSE == signal2_caught);
505 CU_TEST(FALSE == signal3_caught);
506 CU_TEST(0 == Asc_SignalHandlerPop(SIGSEGV, Asc_SignalTrap));
507
508 //CONSOLE_DEBUG("Check recovered signals");
509
510 old_handler = signal(SIGFPE, SIG_DFL); /* handlers should be restored at this point */
511 CU_TEST(my_handler1 == old_handler);
512 old_handler = signal(SIGINT, SIG_DFL);
513 CU_TEST(NULL == old_handler);
514 old_handler = signal(SIGSEGV, SIG_DFL);
515 CU_TEST(my_handler2 == old_handler);
516 Asc_SignalRecover(TRUE);
517
518 Asc_SignalDestroy();
519
520 old_handler = signal(SIGFPE, SIG_DFL); /* original handlers should still be in place */
521 CU_TEST(my_handler1 == old_handler);
522 old_handler = signal(SIGINT, SIG_DFL);
523 CU_TEST(NULL == old_handler);
524 old_handler = signal(SIGSEGV, SIG_DFL);
525 CU_TEST(my_handler2 == old_handler);
526 Asc_SignalRecover(TRUE);
527
528 #endif /* NO_SIGNAL_TRAPS */
529
530 if (NULL != old_fpe_handler) /* restore any pre-existing handlers */
531 signal(SIGFPE, old_fpe_handler);
532 if (NULL != old_int_handler)
533 signal(SIGINT, old_int_handler);
534 if (NULL != old_seg_handler)
535 signal(SIGSEGV, old_seg_handler);
536
537 /* TODO what if they WERE null... has something changed now in that case?? */
538
539 CU_TEST(prior_meminuse == ascmeminuse()); /* make sure we cleaned up after ourselves */
540 }
541
542 /*===========================================================================*/
543 /* Registration information */
544
545 #define TESTS(T) \
546 T(ascSignal)
547
548 REGISTER_TESTS_SIMPLE(utilities_ascSignal, TESTS)
549

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22