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 6F4B3385E822 for ; Fri, 13 Mar 2020 17:02:31 +0000 (GMT) X-Originating-IP: 91.166.131.130 Received: from localhost (91-166-131-130.subs.proxad.net [91.166.131.130]) (Authenticated sender: dodji@seketeli.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 79EC260015; Fri, 13 Mar 2020 17:02:20 +0000 (UTC) Received: by localhost (Postfix, from userid 1000) id 7A32E581890; Fri, 13 Mar 2020 18:02:19 +0100 (CET) From: Dodji Seketeli To: Giuliano Procida Cc: libabigail@sourceware.org, kernel-team@android.com Subject: Re: [PATCH 2/2 v2] [abidiff] Add more leaf change reporting. Organization: Me, myself and I References: <20200313153429.142808-1-gprocida@google.com> X-Operating-System: Fedora 33 X-URL: http://www.seketeli.net/~dodji Date: Fri, 13 Mar 2020 18:02:18 +0100 In-Reply-To: <20200313153429.142808-1-gprocida@google.com> (Giuliano Procida's message of "Fri, 13 Mar 2020 15:34:29 +0000") Message-ID: <87ftecw5lx.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS 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: Libabigail mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2020 17:02:32 -0000 Giuliano Procida a =C3=A9crit: > The leaf-changes-only reporting path does not report on all the same > kinds of differences as the default reporting path does, such as > reporting about changes to variables, even though they can be > considered leaf changs. > > - The addition or removal of any symbol affects the ABI and is > clearly a leaf change. > - A change to a variable's declaration may be local rather than > caused by a type change elsewhere. > > This patch adds these missing pieces and reorders some of the existing > leaf reporting, bringing the default and leaf corpus_diff functions > closer to the point where they can be trivially merged or refactored. > > This patch also corrects an error in reporting the total number of > leaf changes. > > * src/abg-comparison.cc (emit_diff_stats): Exclude non-leaf > changes to variables from the reported total of leaf changes. > * src/abg-default-reporter.cc (report): In the corpus_diff > override, move some code and comments for clarity. > * src/abg-leaf-reporter.cc (report): In the corpus_diff > override, additionally report removed/added/changed variables > and removed/added symbols absent from debug info. > * tests/data/Makefile.am: Add new test case files. > * tests/data/test-abidiff-exit/test-leaf0-report.txt: Update > to include reporting of variable diff (change of type). > * tests/data/test-abidiff-exit/test-leaf1-report.txt: New test > case with added/removed variables/functions and changed > variables (both local and non-local type changes). > * tests/data/test-abidiff-exit/test-leaf1-v0.cc: Ditto. > * tests/data/test-abidiff-exit/test-leaf1-v0.o: Ditto. > * tests/data/test-abidiff-exit/test-leaf1-v1.cc: Ditto. > * tests/data/test-abidiff-exit/test-leaf1-v1.o: Ditto. > * tests/test-abidiff-exit.cc: Run new test case. Supply > --redundant otherwise the test isn't meaningful. This looks OK to me. I have just updated the manual of the abi{pkg}diff tools to say that --leaf-changes-only implies --redudant, just as you did in the help string of these tools. The patch was applied to master. Thanks! --=20 Dodji