diff options
author | Milian Wolff <milian.wolff@kdab.com> | 2017-02-10 10:33:09 +0100 |
---|---|---|
committer | Milian Wolff <milian.wolff@kdab.com> | 2017-02-10 14:36:22 +0000 |
commit | 1151a6cb5577fdcf81a6c76703074d5d6c7dd5df (patch) | |
tree | e3cd6e4fabeae362eaca3b80642a8c8729630066 /tests | |
parent | fb423b624c76bfcd7cb59e818e32531146f69138 (diff) |
Fix test when kallsyms mapping is disabled/broken
On our CI, the kallsyms file only contains 0 addresses, i.e. lines
of the form
...
0000000000000000 b current_type [floppy]
0000000000000000 t disk_change [floppy]
0000000000000000 t set_dor [floppy]
0000000000000000 t set_fdc [floppy]
...
This cannot be used to build a proper mapping. Extend the test to
ensure we don't fail on the CI for such a case and also remove the
check on the found address, as it may point to 0 (see above). We
do want to get some name though.
Sometimes the kallsyms file only contains 0 addresses
Change-Id: I7f307ff89a9ec0cfd0f4d8e679e25a63db561bd0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/kallsyms/tst_kallsyms.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/auto/kallsyms/tst_kallsyms.cpp b/tests/auto/kallsyms/tst_kallsyms.cpp index 415fda9..4d8d756 100644 --- a/tests/auto/kallsyms/tst_kallsyms.cpp +++ b/tests/auto/kallsyms/tst_kallsyms.cpp @@ -63,6 +63,14 @@ private slots: QTest::newRow("serio_interrupt:0") << kallsyms << 0xffffffffa0000e80ull << 0xffffffffa0000e80ull << QByteArrayLiteral("serio_interrupt") << QByteArrayLiteral("[serio]"); } + { + const auto kallsyms = QByteArrayLiteral("0000000000000000 A irq_stack_union"); + QTest::newRow("zeros-only") << kallsyms << 0x0ull + << 0x0ull << QByteArrayLiteral("irq_stack_union") << QByteArray(); + QTest::newRow("zeros-only") << kallsyms << std::numeric_limits<quint64>::max() + << 0x0ull + << QByteArrayLiteral("irq_stack_union") << QByteArray(); + } } void testResolve() @@ -97,7 +105,6 @@ private slots: // just check that we find any entry const auto addr = std::numeric_limits<quint64>::max(); const auto entry = kallsyms.findEntry(addr); - QVERIFY(entry.address); QVERIFY(!entry.symbol.isEmpty()); } |