Commit Graph

3 Commits

Author SHA1 Message Date
Jakub Jelinek a554497024 Update copyright years.
From-SVN: r267494
2019-01-01 13:31:55 +01:00
Tom de Vries a37a52e592 [testsuite] Remove bashism from libbacktrace/allocfail.sh
Test-case libbacktrace/allocfail.sh contains bashism "set -o pipefail", which
makes the script fail on ubuntu 18.04, which links /bin/sh to /bin/dash.

Fix this by removing the "set -o pipefail".

Tested by running the test-case with dash on x86_64-linux.

2018-12-14  Tom de Vries  <tdevries@suse.de>

	PR testsuite/88491
	* allocfail.sh: Remove "set -o pipefail".

From-SVN: r267127
2018-12-14 09:43:41 +00:00
Tom de Vries d665cd9b13 [libbacktrace] Add allocfail.sh test-case
Add test-case that forces alloc.c functions to fail, and check whether fail
handling is robust.

This is the test-case for "[libbacktrace] Fix segfault upon allocation
failure".  Without that patch, this test-case fails like this:
...
allocfail.sh: line 71: 26041 Segmentation fault      (core dumped) \
  ./allocfail $i > /dev/null 2>&1
Unallowed fail found: 13
FAIL allocfail.sh (exit status: 1)
...

This is a seperate patch because the test-case is nontrivial.

Bootstrapped and reg-tested on x86_64.

2018-12-12  Tom de Vries  <tdevries@suse.de>

	* Makefile.am (TESTS): Add allocfail.sh.
	(check_PROGRAMS): Add allocfail.
	* Makefile.in: Regenerate.
	* instrumented_alloc.c: New file.  Redefine malloc and realloc.
	Include alloc.c.
	* allocfail.c: New file.
	* allocfail.sh: New file.

From-SVN: r267054
2018-12-12 13:50:51 +00:00