Simon Sobisch <simonsobi...@web.de> writes:

> 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?

Personally, I'd make the actual test a tiny C program that execs argv,
waits for it to exit, and then inspects the resulting exit status to see
if it died with SIGABRT.

-- 
Russ Allbery (ea...@eyrie.org)              <http://www.eyrie.org/~eagle/>

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

Reply via email to