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 <mjw@redhat.com>
+2013-12-05 Mark Wielaard <mjw@redhat.com>
+
+ * 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 <mjw@redhat.com>
* Makefile.am (backtrace-child-biarch): Add $(EXEEXT).
#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;
}
# 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