]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tests: add test from #3979
authorLennart Poettering <lennart@poettering.net>
Fri, 19 Aug 2016 09:01:21 +0000 (11:01 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 19 Aug 2016 09:01:59 +0000 (11:01 +0200)
Let's add one more test that came up during the discussion of an issue.

The selected name with 69 chars is above the Linux hostname limit of 64.

src/test/test-hostname-util.c

index 17fde9f27eecfba906b4cb4435ae099c17b0e08a..1c3d13ed1d79a07628744bcb3e3d53c10a27b2b6 100644 (file)
@@ -42,6 +42,7 @@ static void test_hostname_is_valid(void) {
         assert_se(!hostname_is_valid("foo..bar", false));
         assert_se(!hostname_is_valid("foo.bar..", false));
         assert_se(!hostname_is_valid("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", false));
+        assert_se(!hostname_is_valid("au-xph5-rvgrdsb5hcxc-47et3a5vvkrc-server-wyoz4elpdpe3.openstack.local", false));
 
         assert_se(hostname_is_valid("foobar", true));
         assert_se(hostname_is_valid("foobar.com", true));