1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

selftest: Confirm that ndrdump struct mode is not available for enums

These are not passed by pointer so the structure dump system does not work
for these.  It is best to dump the containing structure instead.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Andrew Bartlett 2019-12-06 11:00:57 +13:00 committed by Stefan Metzmacher
parent 73f4362606
commit 238d08b07d
2 changed files with 15 additions and 0 deletions

View File

@ -111,6 +111,20 @@ dump OK
# convert expected to bytes for python 3
self.assertEqual(actual, expected.encode('utf-8'))
def test_ndrdump_with_enum_not_struct(self):
expected = '''Public structure 'netr_SchannelType' not found
'''
try:
actual = self.check_exit_code(
"ndrdump misc netr_SchannelType --input=x struct",
1)
except BlackboxProcessError as e:
self.fail(e)
# check_output will return bytes
# convert expected to bytes for python 3
self.assertEqual(actual, expected.encode('utf-8'))
def test_ndrdump_input_cmdline_short_struct_name(self):
expected = '''pull returned Buffer Size Error
'''

View File

@ -0,0 +1 @@
^samba.tests.blackbox.ndrdump.samba.tests.blackbox.ndrdump.NdrDumpTests.test_ndrdump_with_enum_not_struct