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:
parent
73f4362606
commit
238d08b07d
@ -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
|
||||
'''
|
||||
|
1
selftest/knownfail.d/ndrdump-structs-only
Normal file
1
selftest/knownfail.d/ndrdump-structs-only
Normal file
@ -0,0 +1 @@
|
||||
^samba.tests.blackbox.ndrdump.samba.tests.blackbox.ndrdump.NdrDumpTests.test_ndrdump_with_enum_not_struct
|
Loading…
x
Reference in New Issue
Block a user