* [PATCH, applied] test-symtab: Update after support for empty symtabs
@ 2023-03-27 9:19 Dodji Seketeli
0 siblings, 0 replies; only message in thread
From: Dodji Seketeli @ 2023-03-27 9:19 UTC (permalink / raw)
To: libabigail
Hello,
Now that we support empty symtabs test-symtab needs to be updated so
that it expects to have a corpus now, upon a binary with no exported
symbols, albeit an empty one.
* tests/test-symtab.cc (TEST_CASE("Symtab::Empty", "[symtab,
basic]")): Adjust.
(TEST_CASE("Symtab::NoDebugInfo", "[symtab, basic]")): Likewise.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
tests/test-symtab.cc | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/tests/test-symtab.cc b/tests/test-symtab.cc
index dd3f3824..8a5860af 100644
--- a/tests/test-symtab.cc
+++ b/tests/test-symtab.cc
@@ -66,10 +66,9 @@ TEST_CASE("Symtab::Empty", "[symtab, basic]")
{
const std::string binary = "basic/empty.so";
corpus_sptr corpus_ptr;
- const fe_iface::status status = read_corpus(binary, corpus_ptr);
- REQUIRE(!corpus_ptr);
-
- REQUIRE((status & fe_iface::STATUS_NO_SYMBOLS_FOUND));
+ read_corpus(binary, corpus_ptr);
+ REQUIRE(corpus_ptr->get_fun_symbol_map().empty());
+ REQUIRE(corpus_ptr->get_var_symbol_map().empty());
}
TEST_CASE("Symtab::NoDebugInfo", "[symtab, basic]")
@@ -241,10 +240,9 @@ TEST_CASE("Symtab::SymtabWithWhitelist", "[symtab, whitelist]")
+ "basic/one_function_one_variable_irrelevant.whitelist");
corpus_sptr corpus_ptr;
- const fe_iface::status status =
- read_corpus(binary, corpus_ptr, whitelists);
- REQUIRE(!corpus_ptr);
- REQUIRE((status & fe_iface::STATUS_NO_SYMBOLS_FOUND));
+ read_corpus(binary, corpus_ptr, whitelists);
+ REQUIRE(corpus_ptr->get_fun_symbol_map().empty());
+ REQUIRE(corpus_ptr->get_var_symbol_map().empty());
}
GIVEN("we read the binary with only the function whitelisted")
--
2.39.2
--
Dodji
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-27 9:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-27 9:19 [PATCH, applied] test-symtab: Update after support for empty symtabs Dodji Seketeli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).