summaryrefslogtreecommitdiffstats
path: root/dwarflint/tests
diff options
context:
space:
mode:
authorPetr Machata <[email protected]>2010-08-18 19:14:19 +0200
committerPetr Machata <[email protected]>2010-08-18 19:14:19 +0200
commit49367888c077cce134f06515751ee03c9939c299 (patch)
treef5c5e2bc4cd273b4a6755e5937c0d71d1e7970df /dwarflint/tests
parente9223eb4eca36df13d68d7cb8321db5cc18a3c64 (diff)
dwarflint: Add test suite
... the first test being for the bugfix of the previous commit
Diffstat (limited to 'dwarflint/tests')
-rw-r--r--dwarflint/tests/debug_abbrev-duplicate-attribute.bz2bin0 -> 616 bytes
-rwxr-xr-xdwarflint/tests/run-debug_abbrev-duplicate-attribute.sh37
2 files changed, 37 insertions, 0 deletions
diff --git a/dwarflint/tests/debug_abbrev-duplicate-attribute.bz2 b/dwarflint/tests/debug_abbrev-duplicate-attribute.bz2
new file mode 100644
index 00000000..119c3996
--- /dev/null
+++ b/dwarflint/tests/debug_abbrev-duplicate-attribute.bz2
Binary files differ
diff --git a/dwarflint/tests/run-debug_abbrev-duplicate-attribute.sh b/dwarflint/tests/run-debug_abbrev-duplicate-attribute.sh
new file mode 100755
index 00000000..a750863b
--- /dev/null
+++ b/dwarflint/tests/run-debug_abbrev-duplicate-attribute.sh
@@ -0,0 +1,37 @@
+#! /bin/sh
+# Copyright (C) 2010 Red Hat, Inc.
+# This file is part of Red Hat elfutils.
+#
+# Red Hat elfutils is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by the
+# Free Software Foundation; version 2 of the License.
+#
+# Red Hat elfutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Red Hat elfutils; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+#
+# Red Hat elfutils is an included package of the Open Invention Network.
+# An included package of the Open Invention Network is a package for which
+# Open Invention Network licensees cross-license their patents. No patent
+# license is granted, either expressly or impliedly, by designation as an
+# included package. Should you wish to participate in the Open Invention
+# Network licensing program, please visit www.openinventionnetwork.com
+# <http://www.openinventionnetwork.com>.
+
+. $srcdir/../tests/test-subr.sh
+
+srcdir=$srcdir/tests
+
+testfiles debug_abbrev-duplicate-attribute
+
+testrun_compare ./dwarflint debug_abbrev-duplicate-attribute <<EOF
+error: .debug_abbrev: abbr. attribute 0x19: duplicate attribute byte_size (first was at 0x13).
+error: .debug_abbrev: abbr. attribute 0x1b: duplicate attribute decl_file (first was at 0x15).
+error: .debug_abbrev: abbr. attribute 0x1d: duplicate attribute decl_line (first was at 0x17).
+error: .debug_line: table 0: sequence of opcodes not terminated with DW_LNE_end_sequence.
+EOF