From patchwork Tue Dec 4 01:38:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 1007391 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-97925-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="pxNKS5vE"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4384Mj3tx1z9s3l for ; Tue, 4 Dec 2018 12:41:21 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=brXybZwsoFODb5dTXRUlXEJ/s10sy shw0MOYKT4+CSt8bgBr5mHhukfbZ73+di0GnlueGFcMg0FhORQD8ir9z7B2eHUfN ldWDwFrejk0XH8pLQxu9opf/4EoMIZuyJ/HtqxzwPe4ovGTF07FKgNTANYQtWz4h 9xHaJ1zPr3eF30= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=gz0URcejQvZoggfiVUEZgUAfDKQ=; b=pxN KS5vEW3zh20jRtilhJDSDs/1+bywkbKmesaE6NbdYsFWmKp1eMuoHUzFbrq92KUI 7r55QrtejO8dcaNBi6oMZFL85pc/14Q4HNRQdXmiA2xxi5fgWsCPinFR5dyN6ooU Ja5U+FITHSx2ys67TcjVDtvOGxARG8vgtv2sR8J4= Received: (qmail 112050 invoked by alias); 4 Dec 2018 01:41:15 -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 112039 invoked by uid 89); 4 Dec 2018 01:41:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=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.2 spammy=our X-HELO: relay1.mentorg.com Date: Tue, 4 Dec 2018 01:38:56 +0000 From: Joseph Myers To: Subject: Stop test-in-container trying to run other-OS binaries Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 I noticed that, now that build-many-glibcs.py no longer copies glibc sources, I was getting core dumps in my glibc source directories. The cause appears to be, from the i686-gnu build: # Copy these DSOs first so we can overwrite them with our own. for dso in ` env LD_TRACE_LOADED_OBJECTS=1 \ /scratch/jmyers/glibc-bot/build/glibcs/i686-gnu/glibc/elf/ld.so.1 \ /scratch/jmyers/glibc-bot/build/glibcs/i686-gnu/glibc/testroot.pristine/bin/sh \ [...] Segmentation fault (core dumped) In this case, the x86 architecture means the binary executes, but dumps core rather than actually working. Anything involving running the newly built glibc should only be done ifeq ($(run-built-tests),yes). This patch conditions the relevant part of the testroot setup accordingly. Tested for x86_64, and with build-many-glibcs.py for i686-gnu. 2018-12-04 Joseph Myers * Makefile ($(objpfx)testroot.pristine/install.stamp): Do not run dynamic linker unless [$(run-built-tests) = yes]. diff --git a/Makefile b/Makefile index b4703e48fe..fd73d9bae3 100644 --- a/Makefile +++ b/Makefile @@ -374,6 +374,7 @@ $(objpfx)testroot.pristine/install.stamp : cp $(objpfx)support/shell-container $(objpfx)testroot.pristine/bin/sh cp $(objpfx)support/echo-container $(objpfx)testroot.pristine/bin/echo cp $(objpfx)support/true-container $(objpfx)testroot.pristine/bin/true +ifeq ($(run-built-tests),yes) # Copy these DSOs first so we can overwrite them with our own. for dso in `$(test-wrapper-env) LD_TRACE_LOADED_OBJECTS=1 \ $(objpfx)elf/$(rtld-installed-name) \ @@ -393,6 +394,7 @@ $(objpfx)testroot.pristine/install.stamp : mkdir -p `dirname $(objpfx)testroot.pristine$$dso` ;\ $(test-wrapper) cp $$dso $(objpfx)testroot.pristine$$dso ;\ done +endif $(MAKE) install DESTDIR=$(objpfx)testroot.pristine touch $(objpfx)testroot.pristine/install.stamp