From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 2CCE03870891 for ; Thu, 14 Jan 2021 16:53:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2CCE03870891 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 10EGXZJZ143820 for ; Thu, 14 Jan 2021 11:53:14 -0500 Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com with ESMTP id 362sjk0kfk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 14 Jan 2021 11:53:14 -0500 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 10EGmAvF029161 for ; Thu, 14 Jan 2021 16:53:13 GMT Received: from b01cxnp22035.gho.pok.ibm.com (b01cxnp22035.gho.pok.ibm.com [9.57.198.25]) by ppma03dal.us.ibm.com with ESMTP id 35y449r59r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 14 Jan 2021 16:53:13 +0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 10EGrC3f22217032 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 14 Jan 2021 16:53:12 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6342AAE063 for ; Thu, 14 Jan 2021 16:53:12 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 059D0AE062 for ; Thu, 14 Jan 2021 16:53:11 +0000 (GMT) Received: from [9.65.236.15] (unknown [9.65.236.15]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP for ; Thu, 14 Jan 2021 16:53:11 +0000 (GMT) Subject: Re: [PATCH 1/1] elf: Limit tst-prelink-cmp target archs To: libc-alpha@sourceware.org References: <20201215183541.89487-1-msc@linux.ibm.com> From: Matheus Castanho Message-ID: <6ae53630-ed51-2308-2400-da086bdbfa3b@linux.ibm.com> Date: Thu, 14 Jan 2021 13:53:10 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20201215183541.89487-1-msc@linux.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737 definitions=2021-01-14_06:2021-01-14, 2021-01-14 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 adultscore=0 mlxlogscore=999 mlxscore=0 bulkscore=0 suspectscore=0 priorityscore=1501 clxscore=1015 spamscore=0 phishscore=0 impostorscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101140094 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 16:53:16 -0000 Ping. This fixes a failing test on powerpc, so it should be fine to merge during the freeze. On 12/15/20 3:35 PM, Matheus Castanho via Libc-alpha wrote: > Follow up from [0]. > > [0] https://sourceware.org/pipermail/libc-alpha/2020-November/119970.html > > ---8<--- > > elf/tst-prelink-cmp was initially added for x86 (commit fe534fe898) to validate > the fix for Bug 19178, and later applied to all architectures that use GLOB_DAT > relocations (commit 89569c8bb6). However, that bug only affected targets that > handle GLOB_DAT relocations as ELF_TYPE_CLASS_EXTERN_PROTECTED_DATA, so the test > should only apply to targets defining DL_EXTERN_PROTECTED_DATA, which gates the > usage of the elf type class above. For all other targets not meeting that > criteria, the test now returns with UNSUPPORTED status. > > --- > elf/Makefile | 9 ++------ > elf/tst-prelink-cmp.c | 48 +++++++++++++++++++++++++++++++++++++++++++ > elf/tst-prelink.exp | 1 - > 3 files changed, 50 insertions(+), 8 deletions(-) > create mode 100644 elf/tst-prelink-cmp.c > delete mode 100644 elf/tst-prelink.exp > > diff --git a/elf/Makefile b/elf/Makefile > index 0b4d78c874..9d171416ad 100644 > --- a/elf/Makefile > +++ b/elf/Makefile > @@ -453,12 +453,10 @@ update-all-abi: update-all-abi-ld > > ifeq ($(have-glob-dat-reloc),yes) > tests += tst-prelink > +tests-internal += tst-prelink-cmp > # Don't compile tst-prelink.c with PIE for GLOB_DAT relocation. > CFLAGS-tst-prelink.c += -fno-pie > tst-prelink-no-pie = yes > -ifeq ($(run-built-tests),yes) > -tests-special += $(objpfx)tst-prelink-cmp.out > -endif > endif > > # The test requires shared _and_ PIE because the executable > @@ -1599,10 +1597,7 @@ tst-prelink-ENV = LD_TRACE_PRELINKING=1 > $(objpfx)tst-prelink-conflict.out: $(objpfx)tst-prelink.out > grep stdout $< | grep conflict | $(AWK) '{ print $$10, $$11 }' > $@ > > -$(objpfx)tst-prelink-cmp.out: tst-prelink.exp \ > - $(objpfx)tst-prelink-conflict.out > - cmp $^ > $@; \ > - $(evaluate-test) > +$(objpfx)tst-prelink-cmp.out: $(objpfx)tst-prelink-conflict.out > > $(objpfx)tst-ldconfig-X.out : tst-ldconfig-X.sh $(objpfx)ldconfig > $(SHELL) $< '$(common-objpfx)' '$(test-wrapper-env)' \ > diff --git a/elf/tst-prelink-cmp.c b/elf/tst-prelink-cmp.c > new file mode 100644 > index 0000000000..5d21f1ddfd > --- /dev/null > +++ b/elf/tst-prelink-cmp.c > @@ -0,0 +1,48 @@ > +/* Test the output from the environment variable, LD_TRACE_PRELINKING, > + for prelink. > + Copyright (C) 2020 Free Software Foundation, Inc. > + This file is part of the GNU C Library. > + > + The GNU C Library is free software; you can redistribute it and/or > + modify it under the terms of the GNU Lesser General Public > + License as published by the Free Software Foundation; either > + version 2.1 of the License, or (at your option) any later version. > + > + The GNU C Library 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 > + Lesser General Public License for more details. > + > + You should have received a copy of the GNU Lesser General Public > + License along with the GNU C Library; if not, see > + . */ > + > +#include > +#include > +#include > +#include > +#include > + > +static int > +do_test (void) > +{ > +#ifndef DL_EXTERN_PROTECTED_DATA > + return EXIT_UNSUPPORTED; > +#else > + char *src = xasprintf ("%s/elf/tst-prelink-conflict.out", support_objdir_root); > + FILE *f = xfopen (src,"r"); > + size_t buffer_length = 0; > + char *buffer = NULL; > + > + const char *expected = "/0 stdout\n"; > + > + xgetline (&buffer, &buffer_length, f); > + TEST_COMPARE_STRING (expected, buffer); > + > + free (buffer); > + xfclose (f); > + return 0; > +#endif > +} > + > +#include > diff --git a/elf/tst-prelink.exp b/elf/tst-prelink.exp > deleted file mode 100644 > index b35b4c9705..0000000000 > --- a/elf/tst-prelink.exp > +++ /dev/null > @@ -1 +0,0 @@ > -/0 stdout > -- > 2.26.2 >