From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) by sourceware.org (Postfix) with ESMTPS id 396B8386EC3F for ; Thu, 10 Dec 2020 09:10:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 396B8386EC3F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=seketeli.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dodji@seketeli.org Received: from localhost (91-166-131-65.subs.proxad.net [91.166.131.65]) (Authenticated sender: dodj@seketeli.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 92808200002; Thu, 10 Dec 2020 09:10:12 +0000 (UTC) Received: by localhost (Postfix, from userid 1001) id 832A71A263F; Thu, 10 Dec 2020 10:10:11 +0100 (CET) From: Dodji Seketeli To: Giuliano Procida Cc: libabigail@sourceware.org, kernel-team@android.com, maennich@google.com Subject: Re: [RFC PATCH] Add qualifier / typedef / array / pointer test Organization: Me, myself and I References: <20201204165524.319806-1-gprocida@google.com> X-Operating-System: Red Hat Enterprise Linux Server 7.8 X-URL: http://www.seketeli.net/~dodji Date: Thu, 10 Dec 2020 10:10:11 +0100 In-Reply-To: <20201204165524.319806-1-gprocida@google.com> (Giuliano Procida's message of "Fri, 4 Dec 2020 16:55:24 +0000") Message-ID: <864kkuni18.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP 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: 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: Thu, 10 Dec 2020 09:10:18 -0000 Hello Giuliano, Giuliano Procida a =C3=A9crit: > This change adds a test which exercises libabigail's handling of > qualified typedefs of arrays. The base type in the test case is an > array of pointers (chosen so we can also use restrict). > > Various typedefs and (indirect) qualifications of this type are > created. In all cases, the resulting type should be an array of > qualified pointers. > > However, abidiff reports things like > > 'const volatile void* const' > > changed to > > 'restrict const volatile volatile void* const' > > I've not attempted to check whether DWARF and ABI XML faithfully > reflect the source types. There may be trouble there as well. Yeah, or there might be a bug somewhere. In any case, it'd be good to look into this. I didn't have time until now, but I feel adding these tests is improvement already. We can dig into this issue later. Maybe we should file a bug for it? [...] > diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am > index 84447185..516a7f4d 100644 > --- a/tests/data/Makefile.am > +++ b/tests/data/Makefile.am > @@ -184,6 +184,14 @@ test-abidiff-exit/test-headers-dirs/test-headers-dir= -v0.c \ > test-abidiff-exit/test-headers-dirs/test-headers-dir-v0.o \ > test-abidiff-exit/test-headers-dirs/test-headers-dir-v1.c \ > test-abidiff-exit/test-headers-dirs/test-headers-dir-v1.o \ > +test-abidiff-exit/qualifier-typedef-array-v0.c \ > +test-abidiff-exit/qualifier-typedef-array-v0.o \ > +test-abidiff-exit/qualifier-typedef-array-v1.c \ > +test-abidiff-exit/qualifier-typedef-array-v1.o \ > +test-abidiff-exit/qualifier-typedef-array-report0.txt \ > +test-abidiff-exit/qualifier-typedef-array-report1.txt \ > +test-abidiff-exit/qualifier-typedef-array-report2.txt \ > +test-abidiff-exit/qualifier-typedef-array-report3.txt \ There actual name of the reference report files that are added by the patch is qualifier-typedef-array-report-{0-3}.txt. Note the '-' character before the {0-3}. I fixed that when applying the patch. [...] > * tests/data/Makefile.am: Add new test files > * tests/data/test-abidiff-exit/qualifier-typedef-array-v0.c: > New test file. > * tests/data/test-abidiff-exit/qualifier-typedef-array-v0.o: > New test file. > * tests/data/test-abidiff-exit/qualifier-typedef-array-v1.c: > New test file. > * tests/data/test-abidiff-exit/qualifier-typedef-array-v1.o: > New test file. > * tests/data/test-abidiff-exit/qualifier-typedef-array-report-0.txt: > Plain diff report. > * tests/data/test-abidiff-exit/qualifier-typedef-array-report-1.txt: > Harmless diff report. > * tests/data/test-abidiff-exit/qualifier-typedef-array-report-2.txt: > Leaf changes report. > * tests/data/test-abidiff-exit/qualifier-typedef-array-report-3.txt: > Harmless leaf changes report. > * tests/test-abidiff-exit.cc: Run new test. > > Signed-off-by: Giuliano Procida Applied to master. Thanks! [...] Cheers, --=20 Dodji