How to check for SIGABRT?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We use the autoconf generated testsuite script in GnuCOBOL to test the
compiler and runtime - and it works very well for "normal" tests.

There are some tests where the compiler should abort and it does, but
when it does so "correctly" by raising SIGABRT we can check for return
code 134 but get an additional stderr message similar to
"/full/path/to/testsuite.de/testcasenumber/run aborted on line 40" (and
I don't know if SIGABRT will result in return code 134 on all "exotic"
systems).

The following options come to mind:

* use `trap` in AT_CHECK to catch the error if it is the expected result
--> should fix the additional stderr, we still would have to check for
return code 134

* use some builtin expectation similar to XFAIL(true) - but I don't
found anything like this in the docs

* when running the testsuite (we have one case where we check this via
an environment variable set in atlocal and return 77 for skipping the
test if the compiler cannot use an external tool) don't raise SIGABRT
but something like `exit 96`

Do you have any experience/thoughts about this?
Is there any "best practice" (ideally as official documentation) for
checking signals in the autoconf generated testsuite script?

Thank you in advance,
Simon

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf



[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux