s4-torture: better, failing, tests for GUID_from_string
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 7 Dec 2016 01:35:58 +0000 (14:35 +1300)
committerDouglas Bagnall <dbagnall@samba.org>
Wed, 14 Dec 2016 04:02:24 +0000 (05:02 +0100)
commit6c9a185be260a914bc0bd2dcf76c9dcb9664a687
tree38929c12f8914751b645ae5742ec43dc5ea34d33
parentc0549aea68662cb7a1309d358fc8480f0023e360
s4-torture: better, failing, tests for GUID_from_string

These tests reveal that the current implementation accepts all kinds
of invalid GUIDs. In particular, we fail on these ones:

 "00000001-0002-0003-0405--060708090a0"
 "-0000001-0002-0003-0405-060708090a0b"
 "-0000001-0002-0003-04-5-060708090a0b"
 "d0000001-0002-0003-0405-060708090a-b"
 "00000001-  -2-0003-0405-060708090a0b"
 "00000001-0002-0003-0405- 060708090a0"
 "0x000001-0002-0003-0405-060708090a0b"
 "00000001-0x02-0x03-0405-060708090a0b"

This test is added to selftest/knownfail.

The test for valid string GUIDs is extended to test upper and mixed case
GUIDs.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
selftest/knownfail
source4/torture/ndr/ndr.c