diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-09-06 09:39:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-06 09:39:14 +0200 |
commit | 0fe36dd93023f1be9518df12c775a920dea60e1b (patch) | |
tree | a58ae6ae6fdba4dc83b6f3897735827364e7227a /src/test/test-dns-domain.c | |
parent | 48fa42d4ef1c4175c13203e27b2b458cb94fc42a (diff) | |
download | systemd-0fe36dd93023f1be9518df12c775a920dea60e1b.tar.gz |
test-dns-domain: allow old and new libidn2 behaviour (#6749)
The behaviour changed to allow underscores. For now, lets just
accept both return values.
Fixes #6573.
Diffstat (limited to 'src/test/test-dns-domain.c')
-rw-r--r-- | src/test/test-dns-domain.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/test-dns-domain.c b/src/test/test-dns-domain.c index cbd2d1e656..93b758ec7a 100644 --- a/src/test/test-dns-domain.c +++ b/src/test/test-dns-domain.c @@ -615,7 +615,10 @@ static void test_dns_name_apply_idna_one(const char *s, int expected, const char log_debug("dns_name_apply_idna: \"%s\" → %d/\"%s\" (expected %d/\"%s\")", s, r, strnull(buf), expected, strnull(result)); - assert_se(r == expected); + /* Different libidn2 versions are more and less accepting + * of underscore-prefixed names. So let's list the lowest + * expected return value. */ + assert_se(r >= expected); if (expected == 1) assert_se(dns_name_equal(buf, result) == 1); } |