aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2019-11-17 22:55:05 +0100
committerAnders Broman <a.broman58@gmail.com>2019-11-18 04:41:40 +0000
commit00fd41b61985286b728c6631d83a0cc82d037cb3 (patch)
tree304a702a992e4091e611844f11f179fb1a2e1a8b /test
parent85ede9a503021f0d053c4390e83144f9a7e73699 (diff)
print: fix ek output with -j option.
Bug: 16207 Change-Id: I95047f76430f5e83083b950a8ed7400e6cdd40ec Reviewed-on: https://code.wireshark.org/review/35117 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/baseline/dhcp-filter.ek8
-rw-r--r--test/suite_outputformats.py5
2 files changed, 13 insertions, 0 deletions
diff --git a/test/baseline/dhcp-filter.ek b/test/baseline/dhcp-filter.ek
new file mode 100644
index 0000000000..49d0a19795
--- /dev/null
+++ b/test/baseline/dhcp-filter.ek
@@ -0,0 +1,8 @@
+{"index":{"_index":"packets-2004-12-05","_type":"doc"}}
+{"timestamp":"1102274184317","layers":{"frame":{"filtered":"frame"},"eth":{"filtered":"eth"},"ip":{"filtered":"ip"},"udp":{"filtered":"udp"},"dhcp":{"dhcp_dhcp_type":{"filtered":"dhcp.type"},"dhcp_dhcp_hw_type":{"filtered":"dhcp.hw.type"},"dhcp_dhcp_hw_len":{"filtered":"dhcp.hw.len"},"dhcp_dhcp_hops":{"filtered":"dhcp.hops"},"dhcp_dhcp_id":{"filtered":"dhcp.id"},"dhcp_dhcp_secs":{"filtered":"dhcp.secs"},"dhcp_dhcp_flags":{"filtered":"dhcp.flags"},"dhcp_dhcp_ip_client":{"filtered":"dhcp.ip.client"},"dhcp_dhcp_ip_your":{"filtered":"dhcp.ip.your"},"dhcp_dhcp_ip_server":{"filtered":"dhcp.ip.server"},"dhcp_dhcp_ip_relay":{"filtered":"dhcp.ip.relay"},"dhcp_dhcp_hw_mac_addr":{"filtered":"dhcp.hw.mac_addr"},"dhcp_dhcp_hw_addr_padding":{"filtered":"dhcp.hw.addr_padding"},"dhcp_dhcp_server":{"filtered":"dhcp.server"},"dhcp_dhcp_file":{"filtered":"dhcp.file"},"dhcp_dhcp_cookie":{"filtered":"dhcp.cookie"},"dhcp_dhcp_option_type":[{"filtered":"dhcp.option.type"},{"filtered":"dhcp.option.type"},{"filtered":"dhcp.option.type"},{"filtered":"dhcp.option.type"},{"filtered":"dhcp.option.type"}],"dhcp_dhcp_option_padding":{"filtered":"dhcp.option.padding"}}}}
+{"index":{"_index":"packets-2004-12-05","_type":"doc"}}
+{"timestamp":"1102274184317","layers":{"frame":{"filtered":"frame"},"eth":{"filtered":"eth"},"ip":{"filtered":"ip"},"udp":{"filtered":"udp"},"dhcp":{"dhcp_dhcp_type":{"filtered":"dhcp.type"},"dhcp_dhcp_hw_type":{"filtered":"dhcp.hw.type"},"dhcp_dhcp_hw_len":{"filtered":"dhcp.hw.len"},"dhcp_dhcp_hops":{"filtered":"dhcp.hops"},"dhcp_dhcp_id":{"filtered":"dhcp.id"},"dhcp_dhcp_secs":{"filtered":"dhcp.secs"},"dhcp_dhcp_flags":{"filtered":"dhcp.flags"},"dhcp_dhcp_ip_client":{"filtered":"dhcp.ip.client"},"dhcp_dhcp_ip_your":{"filtered":"dhcp.ip.your"},"dhcp_dhcp_ip_server":{"filtered":"dhcp.ip.server"},"dhcp_dhcp_ip_relay":{"filtered":"dhcp.ip.relay"},"dhcp_dhcp_hw_mac_addr":{"filtered":"dhcp.hw.mac_addr"},"dhcp_dhcp_hw_addr_padding":{"filtered":"dhcp.hw.addr_padding"},"dhcp_dhcp_server":{"filtered":"dhcp.server"},"dhcp_dhcp_file":{"filtered":"dhcp.file"},"dhcp_dhcp_cookie":{"filtered":"dhcp.cookie"},"dhcp_dhcp_option_type":[{"filtered":"dhcp.option.type"},{"filtered":"dhcp.option.type"},{"filtered":"dhcp.option.type"},{"filtered":"dhcp.option.type"},{"filtered":"dhcp.option.type"},{"filtered":"dhcp.option.type"},{"filtered":"dhcp.option.type"}],"dhcp_dhcp_option_padding":{"filtered":"dhcp.option.padding"}}}}
+{"index":{"_index":"packets-2004-12-05","_type":"doc"}}
+{"timestamp":"1102274184387","layers":{"frame":{"filtered":"frame"},"eth":{"filtered":"eth"},"ip":{"filtered":"ip"},"udp":{"filtered":"udp"},"dhcp":{"dhcp_dhcp_type":{"filtered":"dhcp.type"},"dhcp_dhcp_hw_type":{"filtered":"dhcp.hw.type"},"dhcp_dhcp_hw_len":{"filtered":"dhcp.hw.len"},"dhcp_dhcp_hops":{"filtered":"dhcp.hops"},"dhcp_dhcp_id":{"filtered":"dhcp.id"},"dhcp_dhcp_secs":{"filtered":"dhcp.secs"},"dhcp_dhcp_flags":{"filtered":"dhcp.flags"},"dhcp_dhcp_ip_client":{"filtered":"dhcp.ip.client"},"dhcp_dhcp_ip_your":{"filtered":"dhcp.ip.your"},"dhcp_dhcp_ip_server":{"filtered":"dhcp.ip.server"},"dhcp_dhcp_ip_relay":{"filtered":"dhcp.ip.relay"},"dhcp_dhcp_hw_mac_addr":{"filtered":"dhcp.hw.mac_addr"},"dhcp_dhcp_hw_addr_padding":{"filtered":"dhcp.hw.addr_padding"},"dhcp_dhcp_server":{"filtered":"dhcp.server"},"dhcp_dhcp_file":{"filtered":"dhcp.file"},"dhcp_dhcp_cookie":{"filtered":"dhcp.cookie"},"dhcp_dhcp_option_type":[{"filtered":"dhcp.option.type"},{"filtered":"dhcp.option.type"},{"filtered":"dhcp.option.type"},{"filtered":"dhcp.option.type"},{"filtered":"dhcp.option.type"},{"filtered":"dhcp.option.type"}],"dhcp_dhcp_option_padding":{"filtered":"dhcp.option.padding"}}}}
+{"index":{"_index":"packets-2004-12-05","_type":"doc"}}
+{"timestamp":"1102274184387","layers":{"frame":{"filtered":"frame"},"eth":{"filtered":"eth"},"ip":{"filtered":"ip"},"udp":{"filtered":"udp"},"dhcp":{"dhcp_dhcp_type":{"filtered":"dhcp.type"},"dhcp_dhcp_hw_type":{"filtered":"dhcp.hw.type"},"dhcp_dhcp_hw_len":{"filtered":"dhcp.hw.len"},"dhcp_dhcp_hops":{"filtered":"dhcp.hops"},"dhcp_dhcp_id":{"filtered":"dhcp.id"},"dhcp_dhcp_secs":{"filtered":"dhcp.secs"},"dhcp_dhcp_flags":{"filtered":"dhcp.flags"},"dhcp_dhcp_ip_client":{"filtered":"dhcp.ip.client"},"dhcp_dhcp_ip_your":{"filtered":"dhcp.ip.your"},"dhcp_dhcp_ip_server":{"filtered":"dhcp.ip.server"},"dhcp_dhcp_ip_relay":{"filtered":"dhcp.ip.relay"},"dhcp_dhcp_hw_mac_addr":{"filtered":"dhcp.hw.mac_addr"},"dhcp_dhcp_hw_addr_padding":{"filtered":"dhcp.hw.addr_padding"},"dhcp_dhcp_server":{"filtered":"dhcp.server"},"dhcp_dhcp_file":{"filtered":"dhcp.file"},"dhcp_dhcp_cookie":{"filtered":"dhcp.cookie"},"dhcp_dhcp_option_type":[{"filtered":"dhcp.option.type"},{"filtered":"dhcp.option.type"},{"filtered":"dhcp.option.type"},{"filtered":"dhcp.option.type"},{"filtered":"dhcp.option.type"},{"filtered":"dhcp.option.type"},{"filtered":"dhcp.option.type"}],"dhcp_dhcp_option_padding":{"filtered":"dhcp.option.padding"}}}}
diff --git a/test/suite_outputformats.py b/test/suite_outputformats.py
index f92e20f11e..c5a0a66f3e 100644
--- a/test/suite_outputformats.py
+++ b/test/suite_outputformats.py
@@ -88,3 +88,8 @@ class case_outputformats(subprocesstest.SubprocessTestCase):
{"index": {"_index": "packets-2004-12-05", "_type": "doc"}},
{"timestamp": "1102274184317", "layers": {"frame_number": ["1"]}}
], multiline=True)
+
+ def test_outputformat_ek_filter_field(self, check_outputformat):
+ ''' Check that the option -j works with -Tek.'''
+ check_outputformat("ek", extra_args=['-j', 'dhcp'], expected="dhcp-filter.ek",
+ multiline=True)