From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by sourceware.org (Postfix) with ESMTPS id ADE513857C7B for ; Wed, 10 Nov 2021 11:58:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org ADE513857C7B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=seketeli.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=seketeli.org Received: (Authenticated sender: dodji@seketeli.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id BACE460002; Wed, 10 Nov 2021 11:58:52 +0000 (UTC) Received: by localhost (Postfix, from userid 1000) id E2008581C26; Tue, 9 Nov 2021 15:47:43 +0100 (CET) From: Dodji Seketeli To: Guillermo Martinez via Libabigail Subject: Re: Regression tests for ctf reader: Avoid duplicating files Organization: Me, myself and I References: <1859179.TfuLjZUhfy@sali> <87y264mik2.fsf@oracle.com> <1990370.rjD3G2zAS3@sali> X-Operating-System: Fedora 36 X-URL: http://www.seketeli.net/~dodji Date: Tue, 09 Nov 2021 15:47:43 +0100 In-Reply-To: <1990370.rjD3G2zAS3@sali> (Guillermo Martinez via Libabigail's message of "Tue, 9 Nov 2021 02:52:50 +0000") Message-ID: <87sfw575dc.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, DATE_IN_PAST_12_24, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, 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: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Nov 2021 11:58:56 -0000 Hello Guillermo and Jose, Sorry for my late reply. Guillermo Martinez via Libabigail a =C3=A9crit: > On Thursday, November 4, 2021 2:27:57 AM CST Jose E. Marchesi wrote: > > Hello libabigail team, >>=20 >> > I'm working in the implementation of regression tests for ctf reader >> > (tests/test-read-ctf.cc), it's very similar to test-read-dwarf.cc, so >> > they have some C and header source files that are common among >> > them, e.g: >> > >> > tests/data/test-read-ctf/PR27700/include-dir/priv.h >> > tests/data/test-read-ctf/PR27700/include-dir/pub.h >> > tests/data/test-read-ctf/PR27700/pub-incdir/inc.h >> > tests/data/test-read-ctf/PR27700/test-PR27700.c >> > tests/data/test-read-ctf/test-PR26568-1.c >> > tests/data/test-read-ctf/test-PR26568-2.c >> > >> > So, we're planning move those common source file to: >> > >> > tests/data/test-read-common/ Great. >> > But we still need *two different* binary files with the debugging >> > information: DWARF (-gdwarf) and CTF (-gctf), that they would=20 >> > need to be recompiled. The current implementation to test ctf reader >> > use binary files previously compiled, so there is one file for=20 >> > each binary format: >> >=20=20=20=20 >> > tests/data/test-read-*ctf*/test-PR26568-1.o >> > ... >> > tests/data/test-read-*dwarf*/test-PR26568-1.o >> > >> > So, Are you agree with this approach? >> > >> > We are looking for the way to avoid duplicating files :-) >> > >> > Thanks in advanced for your comments! On Thursday, November 4, 2021 2:27:57 AM CST Jose E. Marchesi wrote: >> An alternative to have two copies of compiled objects is to have just >> one copy (in test-read-common) compiled with both -gdwarf -gctf. Right, we could do that too. You'll thus need to adjust the existing tests in test-read-dwarf.cc to make them pick their data from test-read-common instead, e.g: This: { "data/test-read-dwarf/test0", "", "", SEQUENCE_TYPE_ID_STYLE, "data/test-read-dwarf/test0.abi", "output/test-read-dwarf/test0.abi" }, would be changed into: { "data/test-read-common/test0", "", "", SEQUENCE_TYPE_ID_STYLE, "data/test-read-common/test0.abi", "output/test-read-common/test0.abi" }, The tests/data/Makefile.am will also need some adjustments. I think that sounds a fair path to take, as far as I am concerned. > Thanks Jose for your advice! .. any other alternative? .. I would like to= start > working on this :-) Great. If you see that you need to share code between tests/test-read-ctf.cc and tests/test-read-dwarf.cc, maybe you can just create a tests/test-read-common.{h,cc} files, if that helps. This will obviously be welcome, unless someone objects to it, of course :-) Cheers, --=20 Dodji