From 03c4cf5b10dcd054f8500c5e8be0b5c9e5a09dee Mon Sep 17 00:00:00 2001 From: Garming Sam Date: Fri, 9 Dec 2016 10:50:38 +1300 Subject: tests/ndrdump: Add a test for --hex-input Signed-off-by: Garming Sam Reviewed-by: Andrew Bartlett Autobuild-User(master): Andrew Bartlett Autobuild-Date(master): Tue Feb 14 13:39:01 CET 2017 on sn-devel-144 --- python/samba/tests/blackbox/ndrdump.py | 4 ++++ source4/librpc/tests/dns-decode_dns_name_packet-hex.dat | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 source4/librpc/tests/dns-decode_dns_name_packet-hex.dat diff --git a/python/samba/tests/blackbox/ndrdump.py b/python/samba/tests/blackbox/ndrdump.py index fca9a931533..f0cd5f750ec 100644 --- a/python/samba/tests/blackbox/ndrdump.py +++ b/python/samba/tests/blackbox/ndrdump.py @@ -47,3 +47,7 @@ class NdrDumpTests(BlackboxTestCase): def test_ndrdump_with_validate(self): self.check_run("ndrdump --validate samr samr_CreateUser in %s" % (self.data_path("samr-CreateUser-in.dat"))) + + def test_ndrdump_with_hex(self): + self.check_run("ndrdump dns decode_dns_name_packet in --hex-input %s" % + self.data_path("dns-decode_dns_name_packet-hex.dat")) diff --git a/source4/librpc/tests/dns-decode_dns_name_packet-hex.dat b/source4/librpc/tests/dns-decode_dns_name_packet-hex.dat new file mode 100644 index 00000000000..c095bccaddc --- /dev/null +++ b/source4/librpc/tests/dns-decode_dns_name_packet-hex.dat @@ -0,0 +1,7 @@ +[0000] EC EF 28 00 00 01 00 00 00 01 00 00 09 73 61 6D ..(..... .....sam +[0010] 62 61 32 30 30 33 07 65 78 61 6D 70 6C 65 03 63 ba2003.e xample.c +[0020] 6F 6D 00 00 06 00 01 0F 63 6E 61 6D 65 64 6F 74 om...... cnamedot +[0030] 70 72 65 66 69 78 30 C0 0C 00 05 00 01 00 00 03 prefix0. ........ +[0040] 84 00 13 00 0F 62 6E 61 6D 65 64 6F 74 70 72 65 .....bna medotpre +[0050] 66 69 78 32 C0 0C fix2.. + -- cgit v1.2.1