From: "gprocida+abigail at google dot com" <sourceware-bugzilla@sourceware.org>
To: libabigail@sourceware.org
Subject: [Bug default/27616] New: libabigail treats empty and nearly empty XML elements inconsistently
Date: Sat, 20 Mar 2021 20:09:09 +0000 [thread overview]
Message-ID: <bug-27616-9487@http.sourceware.org/bugzilla/> (raw)
https://sourceware.org/bugzilla/show_bug.cgi?id=27616
Bug ID: 27616
Summary: libabigail treats empty and nearly empty XML elements
inconsistently
Product: libabigail
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: default
Assignee: dodji at redhat dot com
Reporter: gprocida+abigail at google dot com
CC: libabigail at sourceware dot org
Target Milestone: ---
At least in the case of abi-corpus, the case of "no children" is handled
differently from "only blank children". One consequence is that the
architecture of an empty corpus may be ignored if the XML is normalised or has
blank text stripped.
tests/data/test-abidiff/test-empty-corpus-2.xml:
<abi-corpus-group architecture='elf-arm-aarch64'>
<abi-corpus path='vmlinux' architecture='elf-arm-aarch64'>
</abi-corpus>
</abi-corpus-group>
Nothing changes if the inner element is changed to.
<abi-corpus path='vmlinux' architecture='elf-arm-aarch64'> </abi-corpus>
These are treated differently (abidiff reports architecture is ''):
<abi-corpus path='vmlinux' architecture='elf-arm-aarch64'></abi-corpus>
and
<abi-corpus path='vmlinux' architecture='elf-arm-aarch64'/>
I've not audited the code in detail, but any early return or similar
short-cutting on (!node->children) etc. should be reviewed.
Actually, the following shows plenty of places where whitespace is significant
where it should not be.
find tests -name '*.abi' -or -name '*.xml' | while read f; do
<"$f" sed 's;^ *;;' | tr -d '\n' >"$f".wrung
build/tools/abidiff --harmless "$f" "$f".wrung
done
--
You are receiving this mail because:
You are on the CC list for the bug.
next reply other threads:[~2021-03-20 20:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-20 20:09 gprocida+abigail at google dot com [this message]
2021-03-31 11:16 ` [Bug default/27616] " gprocida+abigail at google dot com
2021-04-14 10:56 ` dodji at redhat dot com
2021-04-15 14:17 ` dodji at redhat dot com
2022-05-24 14:15 ` gprocida at google dot com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-27616-9487@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=libabigail@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).