-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2015-02-20 um 16:07 schrieb Mark Jansen:
Hey,
I do not have the intention to rewrite the ipv4 tests now, i do have another few tests lined up for different ipv6 functions (addr2str), i'll look into rewriting the ipv4 then. As for now, few tests are better than no tests, right?
That's OK with me. I recommend to move the ipv4 test to the end of the patch series in this case. That way Alexandre can apply the ipv6 patch if he disagrees with the partial ipv4 test.
Broken means xp pro, 2003, vista and 2008 did not behave correct.
What behaves correctly? Windows 7?
if (ipv6_tests[i].ex_fails == 2) /* testing vs ex doesnt >make sense. */
continue;
Please document why, it took me a while to come up with the guess above. (And I'm not even sure it's the real reason). You're also not checking the output IP for the IP tests from the non-ex tests here. Is there a reason for that? Are there any cases where -Ex returns a different IP than non-ex?
Because the function will succeed on ex, it is even in the ex-test table. Cases like this are exactly why i didnt want it in one table in the first place.
There's no problem with running a test or two twice in a situation like this. The reason why you need special handling for this test is that it is the only test that fails on base and succeeds on ex. Your way of handling this works reasonably well, it's just that the comment could be better. E.g. something like "Fails on base, succeeds on -Ex. Success case tested by -Ex test table." would be a better explanation why the test is skipped.
Alternatively you can remove the test from the base table and test it with a separate function call in the base tests.
Probably not, but I was under the impression that windows doesnt run on big endian machines. If wine does run on big endian this might need an additional check, however i do not have a b.e. machine to verify it on.
Yeah, it is a fairly academic question. Even Windows NT on Power was little endian. I vaguely remembered that there were helper functions for manipulating IP addresses that take care of endianess. I didn't find any though, just the hostname resolving string-to-IP ones.
Ex doesnt write anything if it fails.
This line from the -ex table suggests something else:
{ "[3ffe:2a00:100:7031::1].8080", STATUS_INVALID_PARAMETER, 0xbadf00d, 0xbeef, { 0xfe3f, 0x2a, 1, 0x3170, 0, 0, 0, 0x100 } },
This has a working address and broken port though. Things may be different if the address parsing fails. Please add an ip == 0xabab comparison in the part of the -ex test that runs the non-ex / IP address checks, and check the returned address in case the function succeeds.