Hi All,

Please review the fix for

7116135 pkg requires first portion of hostname in publisher URI to have more than one character

webrev : https://cr.opensolaris.org/action/browse/pkg/saurabhv/7116135/webrev/

and let me know your comments / feedback.

I ran the test suite & and found no errors, also I wrote a standalone
test to validate various scenarios of IP Addr (both IPv4 & IPv6) and
hostnames. See below for more details on this test.

Does this fix require more test case(es) to be added ?

Thanks in advance,
~Saurabh


Standalone test case attached (ipaddr.py)

Test run :
----------
vyas@gladiator:/mypool/Learnings/Python$ ./ipaddr.py
yahoo-inc.com <_sre.SRE_Match object at 0x80fa100>
127.0.0.1 <_sre.SRE_Match object at 0x80fa100>
[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210] <_sre.SRE_Match object at 0x80fa100>
[1080:0:0:0:8:800:200C:417A] <_sre.SRE_Match object at 0x80fa100>
[3ffe:2a00:100:7031::1] <_sre.SRE_Match object at 0x80fa100>
[1080::8:800:200C:417A] <_sre.SRE_Match object at 0x80fa100>
[::192.9.5.5] <_sre.SRE_Match object at 0x80fa100>
[::FFFF:129.144.52.38] <_sre.SRE_Match object at 0x80fa100>
[::GGGG:129.144.52.38] None
[2010:836B:4179::836B:4179] <_sre.SRE_Match object at 0x80fa100>
[yahoo-inc.com] None
a.foo.com <_sre.SRE_Match object at 0x80fa100>
aa.foo.com <_sre.SRE_Match object at 0x80fa100>
192.1.56 <_sre.SRE_Match object at 0x80fa100>
999.999.99.9 <_sre.SRE_Match object at 0x80fa100>
1943.2.34.189 <_sre.SRE_Match object at 0x80fa100>
::1 None
[::1] <_sre.SRE_Match object at 0x80fa100>
a-01.foo.com <_sre.SRE_Match object at 0x80fa100>
#!/usr/bin/python

import re

hostre = \
    re.compile('^(?:[a-zA-Z-.0-9]+|(?:\d{1,3}\.){3}\d{3}|\[[a-fA-F0-9.:]+\])$')

for host in ["yahoo-inc.com", "127.0.0.1",
                "[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]",
                "[1080:0:0:0:8:800:200C:417A]",
                "[3ffe:2a00:100:7031::1]",
                "[1080::8:800:200C:417A]",
                "[::192.9.5.5]",
                "[::FFFF:129.144.52.38]",
                "[::GGGG:129.144.52.38]",
                "[2010:836B:4179::836B:4179]",
                "[yahoo-inc.com]",
                "a.foo.com",
                "aa.foo.com",
                "192.1.56",
                "999.999.99.9",
                "1943.2.34.189",
                "::1",
                "[::1]",
                "a-01.foo.com" ]:
        print host, hostre.match(host)

_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to