Bug 24794 - Partial test suite run builds corrupt test-in-container testroot
Summary: Partial test suite run builds corrupt test-in-container testroot
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: 2.30
Assignee: Tulio Magno Quites Machado Filho
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-09 20:49 UTC by Florian Weimer
Modified: 2022-01-27 15:28 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Weimer 2019-07-09 20:49:30 UTC
Running 

$ make subdirs=libio check

or:

$ make libio/tests

results in a corrupt testroot because not all the required contents is installed (iconvconfig is missing, for instance).  This results in false test failures.
Comment 1 Florian Weimer 2019-07-10 05:49:31 UTC
To reproduce this, it's necessary to build glibc first, before running these commands, i.e. invoke “make”, “make -j8” or something like that.
Comment 2 Sourceware Commits 2019-07-23 16:30:05 UTC
The master branch has been updated by Tulio Magno Quites Machado Filho <tuliom@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=35e038c1d2ccb3a75395662f9c4f28d85a61444f

commit 35e038c1d2ccb3a75395662f9c4f28d85a61444f
Author: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Date:   Mon Jul 22 17:34:13 2019 -0300

    test-container: Install with $(all-subdirs) [BZ #24794]
    
    Whenever a sub-make is created, it inherits the variable subdirs from its
    parent.  This is also true when make check is called with a restricted
    list of subdirs.  In this scenario, make install is executed "partially"
    and testroot.pristine ends up with an incomplete installation.
    
    	[BZ #24794]
    	* Makefile (testroot.pristine/install.stamp): Pass
    	subdirs='$(all-subdirs)' to make install.
    
    Reviewed-by: DJ Delorie <dj@redhat.com>
Comment 3 Tulio Magno Quites Machado Filho 2019-07-23 16:30:54 UTC
Fixed in glibc 2.30.
Comment 4 Romain Geissler 2019-07-25 07:24:24 UTC
Hi,

This commit caused two regressions for me:

    FAIL: elf/tst-ldconfig-bad-aux-cache
    FAIL: nss/tst-nss-files-hosts-long

I haven't tried the patch from https://sourceware.org/ml/libc-alpha/2019-07/msg00564.html yet.

Cheers,
Romain
Comment 5 Sourceware Commits 2019-07-29 13:34:25 UTC
The master branch has been updated by Tulio Magno Quites Machado Filho <tuliom@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=354e4c1adddb1da19c1043e3e5db61ee2148d912

commit 354e4c1adddb1da19c1043e3e5db61ee2148d912
Author: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Date:   Wed Jul 24 19:49:00 2019 -0300

    test-container: Install with $(sorted-subdirs) [BZ #24794]
    
    Commit 35e038c1d2ccb3a75395662f9c4f28d85a61444f started to use an
    incomplete list of subdirs based on $(all-subdirs) causing
    testroot.pristine to miss files from nss.
    
    Tested if the list of files in testroot.pristine remains the same.
    
    	[BZ #24794]
    	* Makeconfig (all-subdirs): Improved source comments.
    	* Makefile (testroot.pristine/install.stamp): Pass
    	subdirs='$(sorted-subdirs)' to make install.
Comment 6 Tulio Magno Quites Machado Filho 2019-07-29 13:39:03 UTC
(In reply to Romain Geissler from comment #4)
> This commit caused two regressions for me:
> 
>     FAIL: elf/tst-ldconfig-bad-aux-cache
>     FAIL: nss/tst-nss-files-hosts-long
> 
> I haven't tried the patch from
> https://sourceware.org/ml/libc-alpha/2019-07/msg00564.html yet.

Romain,

Commit 354e4c1adddb1 should fix these regressions.
Comment 7 Sourceware Commits 2022-01-27 15:28:41 UTC
The release/2.29/master branch has been updated by H.J. Lu <hjl@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=646ec4ebe52a969041a2dafb4f2d7eadac221556

commit 646ec4ebe52a969041a2dafb4f2d7eadac221556
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Jan 27 07:27:47 2022 -0800

    NEWS: Add a bug fix entry for BZ #24794