summaryrefslogtreecommitdiff
path: root/python/samba/tests/emulate
AgeCommit message (Collapse)AuthorFilesLines
2020-08-11python compat: remove StringIODouglas Bagnall1-1/+1
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
2019-07-24traffic replay test: Populate total_converations and instance_idGary Lockyer1-1/+3
Ensure that the total_conversations and instance_id attributes are assigned a value in the replay contexts passed to test cases. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-09-05python/samba/tests: fix traffic for py2/py3 compatabilityNoel Power1-4/+8
load/save operations return randomly sorted dictionaries in python3 these changes make sure the already sorted expected results are compared with sorted actual values. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-09-03python/samba/tests: Use io.StringIO for py3 and StringIO.StrinIO for py2Noel Power1-1/+1
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-05-23selftest: Clean up ldb on tearDown from each packet in ↵Andrew Bartlett1-0/+1
TrafficEmulatorPacketTests Otherwise the LDB (and so the server resources) are in use until the end of the whole test due to the way the objects are maintained in python for reporting. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed May 23 00:53:25 CEST 2018 on sn-devel-144
2018-05-14traffic: optimize packet init for better performanceJoe Guo1-89/+92
When we run traffic_replay, we are creating millions of Packet objects. So small change in Packet.__init__ will make big difference. By initializing packet with converted values without parsing string, the time cost for 3961148 calls of Packet.__init__ dcrease from 17s to 4s, according to cProfile. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2018-05-12traffic_packets: provision request data for packet_drsuapi_13Joe Guo1-0/+6
The `drsuapi.DsWriteAccountSpnRequest1` struct in this packet was empty before. Samba lets it go but Windows will report an invalid parameter error. Provision the request with proper data, and give user permission to write account SPN. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2017-08-17scripts: Scripts to replay and generate samba trafficGary Lockyer3-0/+901
Scripts to generate representative network traffic and replay this to a samba instance. For load testing, performance profiling and capacity planning. traffic_learner process a file generated by traffic_summary and generate a model that can be used by traffic_replay to generate samba network traffic. traffic_replay Replay a summary file generated by traffic_summary, or use a model created by traffic_learner to generate network traffic. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Pair-programmed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Tim Beale <timbeale@catalyst.net.nz>