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 8A2E3385E017 for ; Mon, 19 Apr 2021 13:41:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8A2E3385E017 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 (unknown [88.120.130.27]) (Authenticated sender: dodji@seketeli.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 19827200012; Mon, 19 Apr 2021 13:41:01 +0000 (UTC) Received: by localhost (Postfix, from userid 1000) id 19625580100; Mon, 19 Apr 2021 15:40:48 +0200 (CEST) From: Dodji Seketeli To: Giuliano Procida Cc: Giuliano Procida via Libabigail , kernel-team@android.com, Matthias =?utf-8?Q?M=C3=A4nnich?= Subject: Re: [PATCH v2, v4] XML reader: improve XML node traversal Organization: Me, myself and I References: <20210331092352.619148-1-gprocida@google.com> <20210331170454.951900-1-gprocida@google.com> <8735w3vdkv.fsf@seketeli.org> <87o8eftz5v.fsf_-_@seketeli.org> X-Operating-System: Fedora 34 X-URL: http://www.seketeli.net/~dodji Date: Mon, 19 Apr 2021 15:40:48 +0200 In-Reply-To: (Giuliano Procida's message of "Fri, 16 Apr 2021 13:03:53 +0100") Message-ID: <87k0oytmsf.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, 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: Mon, 19 Apr 2021 13:41:09 -0000 Hello Giuliano, Thanks for the your thourough response. [...] > And full disclosure, I've since found (a day or so ago) that the > libxml Tree API already defines xmlFirstElementChild and > xmlNextElementSibling which are essentially identical to the > primitives I defined. This also gives me a boost in confidence that > they are the right primitives for traversing the XML tree for > libabigail. Right. As the text/element node handling issue is addressed by the patch I sent, I went ahead and (hopefully) address the confusion and useless redundancy that arise from not using the xmlFirstElementChild and xmlNextElementSibling APIs. I am thus adding two patches to that one to use those functions instead. [...] > I was going to reply separately to review, but the commit below is > quite short. I'm sure it addresses the issue of significant > whitespace. If you haven't done so already, please test by removing > all whitespace from all the test XML files and then running abidiff vs > the originals. There is a short recipe for doing this in the bug > report. I have tested the series of 3 patches that I am going to post as reply of this message with that script you added to the bug report at https://sourceware.org/bugzilla/show_bug.cgi?id=27616. There are two crashes that are unrelated to this issue at hand. That's because libabigail doesn't (yet) support comparing decls coming from templates and that's a known issue. The two invocations that crash are: build/tools/abidiff --harmless tests/data/test-read-write/test12.xml tests/data/test-read-write/test12.xml.wrung build/tools/abidiff --harmless tests/data/test-read-write/test13.xml tests/data/test-read-write/test13.xml.wrung Other than that, everything else seem to work. Thank you for your time and dedication! [...] Cheers, -- Dodji