diff options
| author | Mark Wielaard <[email protected]> | 2013-12-05 15:26:51 +0100 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2013-12-05 15:29:36 +0100 |
| commit | 813aae0e94c2e694e1cad25d4e268dfe60397196 (patch) | |
| tree | 12cf791f9abd624c523972d085ceabe0f78fcba0 /tests | |
| parent | 1bfab193f062df462b2dbc4bb56299a5194fae2d (diff) | |
tests: SKIP backtrace-data and backtrace-dwarf on unsupported arches.
run-backtrace-data.sh did check stderr whether the arch was unsupported
but the test didn't print that message yet. backtrace-dwarf did print
the message but was missing a check_unsupported test. Also add an explicit
check_main test for backtrace-dwarf.
Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ChangeLog | 5 | ||||
| -rw-r--r-- | tests/backtrace-data.c | 4 | ||||
| -rwxr-xr-x | tests/run-backtrace-dwarf.sh | 8 |
3 files changed, 14 insertions, 3 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index b3666891..89925682 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2013-12-05 Mark Wielaard <[email protected]> + + * backtrace-data.c (main): If unsupported also print to stderr. + * run-backtrace-dwarf.sh: Add check_unsupported and check_main. + 2013-12-04 Mark Wielaard <[email protected]> * Makefile.am (backtrace-child-biarch): Add $(EXEEXT). diff --git a/tests/backtrace-data.c b/tests/backtrace-data.c index f54263b9..6d213452 100644 --- a/tests/backtrace-data.c +++ b/tests/backtrace-data.c @@ -43,8 +43,10 @@ #ifndef __x86_64__ int -main (void) +main (int argc __attribute__ ((unused)), char **argv) { + fprintf (stderr, "%s: Unwinding not supported for this architecture\n", + argv[0]); return 77; } diff --git a/tests/run-backtrace-dwarf.sh b/tests/run-backtrace-dwarf.sh index b24215e3..2f4ba0f5 100755 --- a/tests/run-backtrace-dwarf.sh +++ b/tests/run-backtrace-dwarf.sh @@ -15,6 +15,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-subr.sh +. $srcdir/backtrace-subr.sh -testrun ${abs_builddir}/backtrace-dwarf +tempfiles dwarf.{bt,err} +(set +ex; testrun ${abs_builddir}/backtrace-dwarf 1>dwarf.bt 2>dwarf.err; true) +cat dwarf.{bt,err} +check_unsupported dwarf.err dwarf +check_main dwarf.bt dwarf |
