From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 09FF53858C2F for ; Mon, 15 Aug 2022 14:35:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 09FF53858C2F Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-389-WHKheaYKNoCFQkAJG6rppQ-1; Mon, 15 Aug 2022 10:35:56 -0400 X-MC-Unique: WHKheaYKNoCFQkAJG6rppQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3FEC729AB41B for ; Mon, 15 Aug 2022 14:35:56 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.36]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9A0C9492C3B for ; Mon, 15 Aug 2022 14:35:55 +0000 (UTC) From: Florian Weimer To: Florian Weimer via Libc-alpha Subject: Re: [PATCH 1/3] scripts/dso-ordering-test.py: Generate program run-time dependencies References: <9faf4908b8b923ca077b4a0eac10465d754350d2.1660573629.git.fweimer@redhat.com> Date: Mon, 15 Aug 2022 16:35:53 +0200 In-Reply-To: <9faf4908b8b923ca077b4a0eac10465d754350d2.1660573629.git.fweimer@redhat.com> (Florian Weimer via Libc-alpha's message of "Mon, 15 Aug 2022 16:30:50 +0200") Message-ID: <87czd1ing6.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Mon, 15 Aug 2022 14:36:00 -0000 * Florian Weimer via Libc-alpha: > The main program needs to depend on all shared objects, even objects > that have link-time dependencies among shared objects. Filtering > out shared objects that already have an link-time dependencies is not > necessary here; make will do this automatically. > --- > scripts/dso-ordering-test.py | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/scripts/dso-ordering-test.py b/scripts/dso-ordering-test.py > index 2dd6bfda18..f6d22aa00e 100644 > --- a/scripts/dso-ordering-test.py > +++ b/scripts/dso-ordering-test.py > @@ -707,13 +707,12 @@ def process_testcase(t): > "\t$(compile.c) $(OUTPUT_OPTION)\n") > makefile.write (rule) > > - not_depended_objs = find_objs_not_depended_on(test_descr) > - if not_depended_objs: > - depstr = "" > - for dep in not_depended_objs: > - depstr += (" $(objpfx)" + test_subdir + "/" > - + test_name + "-" + dep + ".so") > - makefile.write("$(objpfx)%s.out:%s\n" % (base_test_name, depstr)) > + # Ensure that all shared objects are built before running the > + # test, whether there link-time dependencies or not. > + depobjs = ["$(objpfx){}/{}-{}.so".format(test_subdir, test_name, dep) > + for dep in test_descr.objs] > + makefile.write("$(objpfx){}.out: {}\n".format( > + base_test_name, " ".join(depobjs))) > > # Add main executable to test-srcs > makefile.write("test-srcs += %s/%s\n" % (test_subdir, test_name)) > @@ -779,6 +778,7 @@ def process_testcase(t): > # description string. > for obj in test_descr.objs: > src_name = test_name + "-" + obj + ".c" > + print('Generating {}...'.format(src_name)) > f = open(testpfx_src + src_name, "w") > if obj in test_descr.callrefs: > called_objs = test_descr.callrefs[obj] Ugh, I'm going to remove that debugging leftover before committing. Thanks, Florian