From patchwork Mon Mar 27 09:19:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 66928 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5435E3858C53 for ; Mon, 27 Mar 2023 09:20:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5435E3858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679908800; bh=XSnUs5Rf/eBf2/6uwibhjsguaJwGsx1N9tRCTev2BwQ=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Help: List-Subscribe:From:Reply-To:From; b=MT+qA2ttfkGoh+LYRQbEkdMSroT92MLLsGS52Ft/0tBEgKLkDnSoyqOxti2SsVHS7 cB7QL3jjZQKmz1D5uuQY5ftG4EY+2nqfsolUaDeUBvZ6os8/y8Zu8rdOypdzOsep4E bpBWKeOJSStttZ0HqizhRAsMtiuVh7uc+0IPUfe4= X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 74D523858D39 for ; Mon, 27 Mar 2023 09:19:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 74D523858D39 Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-190-0971__XjOP-89xOiSOlrKQ-1; Mon, 27 Mar 2023 05:19:51 -0400 X-MC-Unique: 0971__XjOP-89xOiSOlrKQ-1 Received: by mail-qk1-f197.google.com with SMTP id c186-20020a379ac3000000b007484744a472so3383835qke.22 for ; Mon, 27 Mar 2023 02:19:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679908791; h=mime-version:user-agent:message-id:date:organization:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XSnUs5Rf/eBf2/6uwibhjsguaJwGsx1N9tRCTev2BwQ=; b=jJ1gcoIOHyFruK5rTQsnrNonY8g5Z/WjqBM/eS+fH2gJ7Nj/zXKHRaP2y4g8/G6W0W CrtIgo9evqKqdTK8+G0bqxwaIib4TakyefvrHv1nVSaGufYLxapvcu8ebRqjb0wmvBAr nX7k5dZJPOYIFmz+C8h4UBqitlIgxNvRLjC6HHolI6yy5QWjXcIdCRYhQ7WiZKZHxI9M J4IrgmFtW2SMlakV50xf9OWyONNLn3tnzQgVmqi5oofntjPsi2q7i1B+dZsQB7EkBVkL 3AAOKlIu0WlHUN8jrKhxWQaXgY3zAGPN8zqv7wYNQRT3GQSkwJ1M1btcx0hBUMSRU5o5 uomQ== X-Gm-Message-State: AAQBX9c/tFyVc89xLYcpfx8E0wyEL5lh380IaCeHOJ8EDeYvL2f8KyxA fhcgsSlCz5EdXhJEysEE6asHGzuJha+KEYas6HqawDlZjon2cu0qX1eRwqVPWkRD997sDnXz4Bs a8d3C9nBAPSFvASM4qqK4XsCcspdlPFZTXLAtXbzY1G6HI6suhlqKl+zjLvd+7ac66dEBxMGKQx fI X-Received: by 2002:ad4:5d42:0:b0:5db:963b:bb1b with SMTP id jk2-20020ad45d42000000b005db963bbb1bmr21118671qvb.10.1679908791110; Mon, 27 Mar 2023 02:19:51 -0700 (PDT) X-Google-Smtp-Source: AKy350ZuqDaCRiXvFdS7HO1DHDC+bcHOPlFZfpiOO1HGA7Uwwi+ClWWRngcIqPR72WvdL6+ZIPhejA== X-Received: by 2002:ad4:5d42:0:b0:5db:963b:bb1b with SMTP id jk2-20020ad45d42000000b005db963bbb1bmr21118649qvb.10.1679908790814; Mon, 27 Mar 2023 02:19:50 -0700 (PDT) Received: from localhost ([88.120.130.27]) by smtp.gmail.com with ESMTPSA id a14-20020a0ccdce000000b005dd8b9345e5sm2815230qvn.125.2023.03.27.02.19.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 02:19:50 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id 2A6F6581C79; Mon, 27 Mar 2023 11:19:48 +0200 (CEST) To: libabigail@sourceware.org Subject: [PATCH, applied] test-symtab: Update after support for empty symtabs Organization: Red Hat / France X-Operating-System: Fedora 38 X-URL: http://www.redhat.com Date: Mon, 27 Mar 2023 11:19:47 +0200 Message-ID: <87pm8umtzg.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-Patchwork-Original-From: Dodji Seketeli via Libabigail From: Dodji Seketeli Reply-To: Dodji Seketeli Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Sender: "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 --- 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")