From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) by sourceware.org (Postfix) with ESMTPS id 7820F3857C7B for ; Thu, 16 Jul 2020 18:13:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7820F3857C7B Received: by mail-io1-xd44.google.com with SMTP id d18so7028290ion.0 for ; Thu, 16 Jul 2020 11:13:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TEQFTNf2kDdkSteBzR3mu34YtIXebPWp7HZsIc3Ty5w=; b=GCXW+/eF3tj5/5vdW964ZOraMmjWAdEyxKs1yuz7Sc0fZxFxpOTe2hnMvIIF1iW7lA ouZ8KyNzYz2ErDTREqt0SQALLwK7BGPvZhxyLCPJcTx4ymoorlrqKptZhYAYJ9mF1JPS cawmiYj4iUxrSJclXkBafbYR4yGa23ZzyqmpdAq26xrit1iobZPMq80zCwbPyGgTI3pq dprouYaouhQYpJDc45HuwKV7Xnfge+9phGB9Agi3nRzNNGiMT19JtOoLAtYW0dPDUJyF wkQYKyJI+WzwY052+9FCj9XPjBsLL5QrB2HqEtil/n/Yle+29hWEaU1nkPJu1DxomXuX SJvg== X-Gm-Message-State: AOAM531PK7zMJ4HGGaYfKHB/mve9iwjg/nQGB1tnNim23HZwmBY4qPBP 0TVkMUGY6UV8d8k6y45SLh7KVRygxt2l7M+wcpnzIQ== X-Google-Smtp-Source: ABdhPJzvQzqlzsmZ0UlDO1T5LQRF6tfisvPsS6Uh9EJgDtK0yeBIBVm7TPcilsI0Eobu5X4/fjQtoFmQaHOj8XGb+d4= X-Received: by 2002:a02:70d6:: with SMTP id f205mr6494917jac.5.1594923215719; Thu, 16 Jul 2020 11:13:35 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Caroline Tice Date: Thu, 16 Jul 2020 11:13:24 -0700 Message-ID: Subject: Re: [PATCH] Update testsuite mechanism to allow object files as source files. To: Joseph Myers Cc: Caroline Tice via Gdb-patches , Eric Christopher , Tom Tromey , Simon Marchi Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-19.0 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL 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: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 18:13:37 -0000 On Thu, Jul 16, 2020 at 10:33 AM Joseph Myers wrote: > > On Thu, 16 Jul 2020, Caroline Tice via Gdb-patches wrote: > > > High level summary: > > In some (hopefully rare) cases, certain tests MUST be built with a > > particular compiler to work. If that compiler is not GCC, then it > > makes it very burdensome for developers to run the GDB testsuite and > > test those tests. This change allows those tests to use object files > > (generated by the required compiler) as the test source file, so that > > when the test suite is run with GCC those tests will still > > execute/test properly. > > How is this expected to work when the GDB being tested is configured for a > different architecture or OS from that of the checked-in object file and > may not be able to read its object file format at all? Will all such > tests have explicit conditioning on the target for which GDB is > configured? That is a very good point; I suppose this test should be marked to only work on the architecture for which the test was compiled? (I know I've seen those kinds of restrictions in testsuites before, although I'm not sure if the GDB testsuite is currently set up for such restrictions). > > On general free software and reproducible builds principles: > > * The source for any checked-in object file should be checked in. > > * That source should include comments giving all information required to > be able to reproduce the object file byte-for-byte - for example, the > exact git commit of the compiler used to generate it, the exact options > with which that compiler should be configured and the exact command line > to use with that compiler to generate that object file. And it should > have been verified by someone in a different environment from the person > proposing the addition of such an object file that following those > instructions does give a byte-for-byte identical object file. The source code for this test case was checked in as part of the patch recently committed for fixing GDB's handling of DWARF v5 dwo files. The source file is in gdb/testsuite/gdb.dwarf2/dw5-rnglist-test.cc The command used to generate the .object file is added in the comments of the updated testcase in the patch I attached to the first message in this thread (in the file gdb/testsuite/gdb.dwarf2/dw5-rnglist-test.exp. I did not include the compiler version information in those comments, but I can certainly update it to do so. > > -- > Joseph S. Myers > joseph@codesourcery.com