[rbldnsd] Disabling ipv6-specific tests

Michael Orlitzky michael at orlitzky.com
Tue Jul 30 04:52:29 MSK 2013


On 07/29/2013 08:19 PM, Jeff Dairiki wrote:
>>
>>   ERROR: test_exclusion (test_ip6trie.TestIp6TrieDataset)
>>   ----------------------------------------------------------------------
>>   Traceback (most recent call last):
>>     File "/home/mjo/src/rbldnsd/test_ip6trie.py", line 31, in
>>     test_exclusion
>>       self.assertEqual(dnsd.query(rfc3152("dead::beef")), None)
>>     File "/home/mjo/src/rbldnsd/test_ip6trie.py", line 22, in rfc3152
>>       bytes = unpack("16B", inet_pton(AF_INET6, ip6addr))
>>   error: can't use AF_INET6, IPv6 is disabled
> 
> Urgh.  I guess the choices are:
> 
>  - Re-implement enough of inet_pton() to get by.  Let me sleep on it
>    to see if I can come up with a clean/simple way to do that.
> 
>  - Replace the calls to rfc3152() by hand-coded constants.  (Ugly and hard
>    to read, but there are only two calls to rfc3152.)

We could just comment it as such and say it requires ipv6 for now.

A relatively small subset of people are going to run into these problems
-- most people enable or disable ipv6 globally. For the corner-cases, we
just don't want the tests to /fail/ (it looks bad, triggers bug reports,
and makes people stop running the tests). If they skip a test it's not
the end of the world. Everyone else with ipv6 enabled globally will be
running it.


> What does 'host localhost' produce on this system?

 $ host localhost
 localhost has address 127.0.0.1
 localhost has IPv6 address ::1


> How about (quick-and-dirty way to see what the gethostbyname() libc
> function returns):
> 
>   python -c "import socket; print socket.gethostbyname_ex('localhost')"

 $ python -c "import socket; print socket.gethostbyname_ex('localhost')"
 ('localhost', [], ['127.0.0.1', '127.0.0.1'])



More information about the rbldnsd mailing list