From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from buffalo.birch.relay.mailchannels.net (buffalo.birch.relay.mailchannels.net [23.83.209.24]) by sourceware.org (Postfix) with ESMTPS id 09045397EC17 for ; Thu, 8 Jul 2021 06:01:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 09045397EC17 X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 65D211829FD; Thu, 8 Jul 2021 06:01:24 +0000 (UTC) Received: from pdx1-sub0-mail-a48.g.dreamhost.com (100-101-162-68.trex.outbound.svc.cluster.local [100.101.162.68]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id F0143182725; Thu, 8 Jul 2021 06:01:23 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a48.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.101.162.68 (trex/6.3.3); Thu, 08 Jul 2021 06:01:24 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Duck-Cure: 5ba0d2ff60a502b8_1625724084278_2485382636 X-MC-Loop-Signature: 1625724084278:3802576588 X-MC-Ingress-Time: 1625724084277 Received: from pdx1-sub0-mail-a48.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a48.g.dreamhost.com (Postfix) with ESMTP id 7DDDC856B7; Wed, 7 Jul 2021 23:01:23 -0700 (PDT) Received: from [192.168.1.137] (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a48.g.dreamhost.com (Postfix) with ESMTPSA id B0C0E856BC; Wed, 7 Jul 2021 23:01:21 -0700 (PDT) Subject: Re: [PATCH] elf/tests: Make thrlock and noload depend on libm To: Florian Weimer Cc: Siddhesh Poyarekar via Libc-alpha References: <20210707165859.2993732-1-siddhesh@sourceware.org> <87im1m2gvy.fsf@oldenburg.str.redhat.com> <87o8bdz7aq.fsf@oldenburg.str.redhat.com> X-DH-BACKEND: pdx1-sub0-mail-a48 From: Siddhesh Poyarekar Message-ID: Date: Thu, 8 Jul 2021 11:31:16 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <87o8bdz7aq.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3486.7 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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, 08 Jul 2021 06:01:27 -0000 On 7/8/21 11:16 AM, Florian Weimer wrote: > * Siddhesh Poyarekar: > >> On 7/7/21 10:36 PM, Florian Weimer via Libc-alpha wrote: >>> * Siddhesh Poyarekar via Libc-alpha: >>> >>>> Both tests try to dlopen libm.so at runtime, so make them depend on it >>>> to avoid running before libm.so is built. >>> Can that really happen in the current build system? >> >> I don't the exact sequence of events, but I did run into this a few >> minutes ago, which is how I realized there was a missing dependency. >> The tests failed with "file too short", which was probably them racing >> with the static linker linking libm.so. > > Hmm. I would expect that recursive make running in elf subdirectory > simply does not have the knowledge how to link libm properly. And it > will definitely not do that while running tests. My mental model of how this works is that make builds dependency trees and then runs independent trees in parallel. In that model, if tests don't have that dependency, they may end up in a different dependency tree from that of libm and both could then happen in parallel. Of course, I don't actually know if that's how make works because I haven't read the sources. Oh, and running only tests (assuming that all built objects are up to date) won't do this. It'll only happen if some object needs to be updated when the test is run because an undercaffeinated developer ran make check instead of make && make check :) Siddhesh