From patchwork Wed Aug 21 15:58:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 34230 Received: (qmail 117646 invoked by alias); 21 Aug 2019 15:58:57 -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 117517 invoked by uid 89); 21 Aug 2019 15:58:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=pieces, principle, verifying X-HELO: esa1.mentor.iphmx.com IronPort-SDR: /W7EoPajEmAc19Tqdgn9YcRvOP9o4hTVx/HFBqFfH7oMX9ajY1sff1lR2f+WAuxvzjukeMqZ3s B2VNpMCfT8Km/eJf0WcXvEY5P1bpoBm7X56bp3RjSygYNK4sz20X/Ay4/jko0xeYWvmC2PqRk2 tO2bXGvC5ybpfLKGDLv8kAxe5pn4LvyiK3r5asHJZsOFFGkaqIxqLpSykgWifd6wbWBN7ZkuZ8 5BUFJDD1ZqMnkkM3gwa50nepKq/N5pAY476vfcDM3EjxremsfB1EpZvcjiXNW4sdJElWe+4Pgg 7Rw= IronPort-SDR: mxdkabgk5YX+Pdltoq2YZ5j1Zctx2Lwhq/r5LUaqLV+j1+nTwzOxDD9ks90qIzr6HTH9sHzKVJ 89hv/PE1sPtAd0PAmvAiEI6fcHm5AL5xekW74ktNiblOxoHFrLQDnRdiyz+G4WY4lhvH9UaVub sIGfIay5KtHaouhWHrBxSdnXDVsltc+GUdd4VDnviE8f8nT6g1NYlfZXj0ctYloGRljSrWb0b/ vebUfrrc8LaKlKTFSjEJ42dEM+kpPhjYY8YQ1ZtDhxZjjr6q/xs7cF7Xm+rLkMavrWGRDbORfh /UY= Date: Wed, 21 Aug 2019 15:58:46 +0000 From: Joseph Myers To: Florian Weimer CC: Carlos O'Donell , Mark Wielaard , libc-alpha , Tulio Magno Quites Machado Filho , Szabolcs Nagy , Stefan Liebler , Siddhesh Poyarekar Subject: Re: Status of build bots? In-Reply-To: <87h86akib4.fsf@oldenburg2.str.redhat.com> Message-ID: References: <2ea82ddf-600e-d3db-c3fd-183684d0b173@redhat.com> <87sgpwp2xd.fsf@oldenburg2.str.redhat.com> <87h86akib4.fsf@oldenburg2.str.redhat.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Return-Path: joseph@codesourcery.com On Wed, 21 Aug 2019, Florian Weimer wrote: > * Joseph Myers: > > > Case in point: the known (and documented as such on the wiki) failures of > > > > FAIL: resolv/tst-resolv-ai_idn > > FAIL: resolv/tst-resolv-ai_idn-latin1 > > > > with libidn2 before version 2.0.5. > > > > Marking as either UNSUPPORTED or XFAIL when using older libidn2 would be > > reasonable (I suspect UNSUPPORTED is more practical, since the tests could > > dlopen libidn2 and call idn2_check_version). Leaving as FAIL is > > unhelpful; it means anyone testing on Ubuntu 18.04, for example, needs to > > know to disregard those failures. > > I'll gladly review a patch for that. I'm not sure what the system > configuration is exactly because I don't think that a supported Ubunutu > 18.04 installation contains the prerequisites for building glibc, so I'm > not sure how to replicate this locally. The system compiler is GCC 7.4, with binutils 2.30, which should be fine for building glibc (though I'm using locally built GCC / binutils). The only special thing I'm aware of being needed is unsetting LD_PRELOAD which is otherwise set by default (pointing to libgtk3-nocsd.so.0). Here is a patch (testing on a system with libidn2 2.0.5 or later advised). Mark IDN tests unsupported with libidn2 before 2.0.5. When using a system (e.g. Ubuntu 18.04) with libidn2 2.0.4 or earlier, test results include: FAIL: resolv/tst-resolv-ai_idn FAIL: resolv/tst-resolv-ai_idn-latin1 It was previously stated that "It should fail to indicate you have bugs in your system libidn.". However, the glibc testsuite should be indicating whether there are bugs in glibc, not whether there are bugs in other system pieces - so unless you consider it a glibc bug that it fails to work around the libidn issues, these FAILs are not helpful. And as a general principle, it's best for the expected glibc test results to be clean, with Bugzilla used to track known bugs in glibc itself, rather than people needing to know about the expected FAILs to tell if there are problems with their glibc build. So, while there is an argument that install.texi (not just the old NEWS entries for 2.28) should explain the use of libidn2 and that 2.0.5 or later is recommended, test FAILs are not the right way to indicate the presence of an old libidn2 version. This patch accordingly makes those tests return UNSUPPORTED for older libidn2 versions, just as they do when libidn2 isn't present at all. As implied by that past discussion, it's possible this could result in UNSUPPORTED for systems with older versions but whatever required fixes backported so the tests previously passed, if there are any such systems. Tested for x86_64 on Ubuntu 18.04, including verifying that putting an earlier version in place of 2.0.5 results in the tests FAILing whereas using 2.0.5 as in the patch results in UNSUPPORTED. I have not tested on a system using 2.0.5 or later. 2019-08-21 Joseph Myers * resolv/tst-resolv-ai_idn-latin1.c (do_test): Mark test unsupported with libidn2 before 2.0.5. * resolv/tst-resolv-ai_idn.c (do_test): Likewise. Reviewed-by: Carlos O'Donell diff --git a/resolv/tst-resolv-ai_idn-latin1.c b/resolv/tst-resolv-ai_idn-latin1.c index 4a6bf5623c..5c515958c2 100644 --- a/resolv/tst-resolv-ai_idn-latin1.c +++ b/resolv/tst-resolv-ai_idn-latin1.c @@ -29,6 +29,11 @@ do_test (void) void *handle = dlopen (LIBIDN2_SONAME, RTLD_LAZY); if (handle == NULL) FAIL_UNSUPPORTED ("libidn2 not installed"); + void *check_ver_sym = xdlsym (handle, "idn2_check_version"); + const char *check_res + = ((const char *(*) (const char *)) check_ver_sym) ("2.0.5"); + if (check_res == NULL) + FAIL_UNSUPPORTED ("libidn2 too old"); if (setlocale (LC_CTYPE, "en_US.ISO-8859-1") == NULL) FAIL_EXIT1 ("setlocale: %m"); diff --git a/resolv/tst-resolv-ai_idn.c b/resolv/tst-resolv-ai_idn.c index 493d1c7741..046842769a 100644 --- a/resolv/tst-resolv-ai_idn.c +++ b/resolv/tst-resolv-ai_idn.c @@ -28,6 +28,11 @@ do_test (void) void *handle = dlopen (LIBIDN2_SONAME, RTLD_LAZY); if (handle == NULL) FAIL_UNSUPPORTED ("libidn2 not installed"); + void *check_ver_sym = xdlsym (handle, "idn2_check_version"); + const char *check_res + = ((const char *(*) (const char *)) check_ver_sym) ("2.0.5"); + if (check_res == NULL) + FAIL_UNSUPPORTED ("libidn2 too old"); if (setlocale (LC_CTYPE, "en_US.UTF-8") == NULL) FAIL_EXIT1 ("setlocale: %m");