text2pcap test: Add fractional seconds qualifier

text2pcap now has support for fractional sections using the field
descriptor %f and doesn't support the old method, so change the format
string in the test.  None of the existing tests depended on the
fractional seconds being correct.
This commit is contained in:
John Thacker 2021-12-25 20:56:45 -05:00
parent 9e7b5c9189
commit b9e299b1a3
1 changed files with 2 additions and 1 deletions

View File

@ -133,7 +133,8 @@ def check_text2pcap(cmd_tshark, cmd_text2pcap, capture_file):
pcapng_flag = '-n'
else:
pcapng_flag = ''
text2pcap_cmd = '{cmd} {ns} -d -l {linktype} -t "%Y-%m-%d %H:%M:%S." {in_f} {out_f}'.format(
# XXX: -t ISO also works now too for this output
text2pcap_cmd = '{cmd} {ns} -d -l {linktype} -t "%Y-%m-%d %H:%M:%S.%f" {in_f} {out_f}'.format(
cmd = cmd_text2pcap,
ns = pcapng_flag,
linktype = encap_to_link_type[pre_cap_info['encapsulation']],