From patchwork Thu Aug 30 15:08:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos O'Donell X-Patchwork-Id: 29130 Received: (qmail 2151 invoked by alias); 30 Aug 2018 15:08:12 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 2012 invoked by uid 89); 30 Aug 2018 15:08:11 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, URIBL_RED autolearn=ham version=3.3.2 spammy=8.1.1, thr, H*RU:209.85.216.194, Hx-spam-relays-external:209.85.216.194 X-HELO: mail-qt0-f194.google.com Return-Path: To: GNU C Library From: Carlos O'Donell Subject: [PATCH] Fix test failure with -DNDEBUG. Openpgp: preference=signencrypt Message-ID: <0792219b-b921-2d0e-3102-0095a45fc82f@redhat.com> Date: Thu, 30 Aug 2018 11:08:05 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 The elf/tst-dlopen-aout.c test uses asserts to verify properties of the test execution. Instead of using assert it should use TEST_VERIFY to avoid the situation where the assert is removed by building with -DNDEBUG. This shows up in Fedora 28 when building for i686-pc-linux-gnu and using gcc 8.1.1. The fix is to use TEST_VERIFY which is not impacted by -DNDEBUG. Tested on i686, and fixes a check failure with -DNDEBUG. Signed-off-by: Carlos O'Donell From c1dc1f0b4c7f477c9ff66165fd873420aa7a6e74 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 30 Aug 2018 11:01:33 -0400 Subject: [PATCH] Fix test failure with -DNDEBUG. The elf/tst-dlopen-aout.c test uses asserts to verify properties of the test execution. Instead of using assert it should use TEST_VERIFY to avoid the situation where the assert is removed by building with -DNDEBUG. This shows up in Fedora 28 when building for i686-pc-linux-gnu and using gcc 8.1.1. The fix is to use TEST_VERIFY which is not impacted by -DNDEBUG. Tested on i686, and fixes a check failure with -DNDEBUG. Signed-off-by: Carlos O'Donell --- ChangeLog | 4 ++++ elf/tst-dlopen-aout.c | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index cdc9b8c207..00ea098fe1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2018-02-30 Carlos O'Donell + + * elf/tst-dlopen-aout.c: Include support/check.h. Use TEST_VERIFY. + 2018-08-28 Joseph Myers * sysdeps/aarch64/fpu/fenv_private.h: New file. Based on .... diff --git a/elf/tst-dlopen-aout.c b/elf/tst-dlopen-aout.c index 9038e2096a..5da38dde88 100644 --- a/elf/tst-dlopen-aout.c +++ b/elf/tst-dlopen-aout.c @@ -27,6 +27,7 @@ #include #include #include +#include __thread int x; @@ -54,10 +55,10 @@ do_test (int argc, char *argv[]) return 1; } rc = pthread_create (&thr, NULL, fn, NULL); - assert (rc == 0); + TEST_VERIFY (rc == 0); rc = pthread_join (thr, NULL); - assert (rc == 0); + TEST_VERIFY (rc == 0); } return 0; -- 2.17.1