Source-Changes-HG archive

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

[src/trunk]: src/tests/usr.bin/gdb Add a regression test for PR bin/54154, or...



details:   https://anonhg.NetBSD.org/src/rev/ce51ed5d87af
branches:  trunk
changeset: 841919:ce51ed5d87af
user:      gson <gson%NetBSD.org@localhost>
date:      Fri Jun 07 19:05:15 2019 +0000

description:
Add a regression test for PR bin/54154, or in other words, make sure
we get notified in a timely manner if gdb's XML support disappears
again.

diffstat:

 tests/usr.bin/gdb/t_regress.sh |  23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diffs (38 lines):

diff -r 80a1f970064b -r ce51ed5d87af tests/usr.bin/gdb/t_regress.sh
--- a/tests/usr.bin/gdb/t_regress.sh    Fri Jun 07 16:43:58 2019 +0000
+++ b/tests/usr.bin/gdb/t_regress.sh    Fri Jun 07 19:05:15 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_regress.sh,v 1.1 2016/04/08 10:09:16 gson Exp $
+# $NetBSD: t_regress.sh,v 1.2 2019/06/07 19:05:15 gson Exp $
 #
 # Copyright (c) 2016 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -71,7 +71,28 @@
        atf_check -s exit:1 -o ignore -e ignore grep "annot access memory" gdb.out
 }
 
+# PR 54154
+
+atf_test_case xml
+xml_head() {
+       atf_set "descr" "Test that gdb was built with XML support"
+       atf_set "require.progs" "gdb"
+}
+xml_body() {
+       cat <<\EOF >target.xml
+<target version="1.0">
+  <architecture>i386:x86-64</architecture>
+</target>
+EOF
+       cat <<EOF >test.gdb
+set tdesc filename "target.xml"
+EOF
+       gdb --batch -x test.gdb >gdb.out 2>&1
+       atf_check -s exit:1 -o ignore -e ignore grep "Can not parse XML" gdb.out
+}
+
 atf_init_test_cases() {
        atf_add_test_case threads
        atf_add_test_case pie
+       atf_add_test_case xml
 }



Home | Main Index | Thread Index | Old Index