diff --git a/README.md b/README.md index 8e73bac4..bbac0ff8 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ The JSON output can be compact (default) or pretty formatted with the `-p` optio - `--hosts` enables the `/etc/hosts` file parser - `--id` enables the `id` command parser - `--ifconfig` enables the `ifconfig` command parser -- `--ini` enables the `INI` file parser +- `--ini` enables the `INI` file parser. Also parses files/output containing simple key/value pairs - `--iptables` enables the `iptables` command parser - `--jobs` enables the `jobs` command parser - `--last` enables the `last` and `lastb` command parser @@ -145,6 +145,7 @@ The JSON output can be compact (default) or pretty formatted with the `-p` optio - `--netstat` enables the `netstat` command parser - `--ntpq` enables the `ntpq -p` command parser - `--passwd` enables the `/etc/passwd` file parser +- `--ping` enables the `ping` and `ping6` command parser - `--pip-list` enables the `pip list` command parser - `--pip-show` enables the `pip show` command parser - `--ps` enables the `ps` command parser @@ -158,6 +159,8 @@ The JSON output can be compact (default) or pretty formatted with the `-p` optio - `--systemctl-ls` enables the `systemctl list-sockets` command parser - `--systemctl-luf` enables the `systemctl list-unit-files` command parser - `--timedatectl` enables the `timedatectl status` command parser +- `--tracepath` enables the `tracepath` and `tracepath6` command parser +- `--traceroute` enables the `traceroute` and `traceroute6` command parser - `--uname` enables the `uname -a` command parser - `--uptime` enables the `uptime` command parser - `--w` enables the `w` command parser @@ -229,6 +232,7 @@ Feel free to add/improve code or parsers! You can use the [`jc/parsers/foo.py`]( - [`ifconfig-parser`](https://github.com/KnightWhoSayNi/ifconfig-parser) module by KnightWhoSayNi - [`xmltodict`](https://github.com/martinblech/xmltodict) module by Martín Blech - [`ruamel.yaml`](https://pypi.org/project/ruamel.yaml) module by Anthon van der Neut +- [`trparse`](https://github.com/lbenitez000/trparse) module by Luis Benitez - Parsing [code](https://gist.github.com/cahna/43a1a3ff4d075bcd71f9d7120037a501) from Conor Heine adapted for some parsers - Excellent constructive feedback from [Ilya Sher](https://github.com/ilyash-b) @@ -1239,7 +1243,7 @@ ifconfig | jc --ifconfig -p # or: jc -p ifconfig } ] ``` -### INI files +### INI and plain key/value pair files ```bash cat example.ini ``` @@ -1278,6 +1282,31 @@ cat example.ini | jc --ini -p } } ``` +```bash +cat keyvalue.txt +``` +``` +# this file contains key/value pairs +name = John Doe +address=555 California Drive +age: 34 +; comments can include # or ; +# delimiter can be = or : +# quoted values have quotation marks stripped by default +# but can be preserved with the -r argument +occupation:"Engineer" +``` +```bash +cat keyvalue.txt | jc --ini -p +``` +```json +{ + "name": "John Doe", + "address": "555 California Drive", + "age": "34", + "occupation": "Engineer" +} +``` ### iptables ```bash iptables --line-numbers -v -L -t nat | jc --iptables -p # or: jc -p iptables --line-numbers -v -L -t nat @@ -1910,6 +1939,59 @@ cat /etc/passwd | jc --passwd -p } ] ``` +### ping +```bash +ping 8.8.8.8 -c 3 | jc --ping -p # or: jc -p ping 8.8.8.8 -c 3 +``` +```json +{ + "destination_ip": "8.8.8.8", + "data_bytes": 56, + "pattern": null, + "destination": "8.8.8.8", + "packets_transmitted": 3, + "packets_received": 3, + "packet_loss_percent": 0.0, + "duplicates": 0, + "time_ms": 2005.0, + "round_trip_ms_min": 23.835, + "round_trip_ms_avg": 30.46, + "round_trip_ms_max": 34.838, + "round_trip_ms_stddev": 4.766, + "responses": [ + { + "type": "reply", + "timestamp": null, + "bytes": 64, + "response_ip": "8.8.8.8", + "icmp_seq": 1, + "ttl": 118, + "time_ms": 23.8, + "duplicate": false + }, + { + "type": "reply", + "timestamp": null, + "bytes": 64, + "response_ip": "8.8.8.8", + "icmp_seq": 2, + "ttl": 118, + "time_ms": 34.8, + "duplicate": false + }, + { + "type": "reply", + "timestamp": null, + "bytes": 64, + "response_ip": "8.8.8.8", + "icmp_seq": 3, + "ttl": 118, + "time_ms": 32.7, + "duplicate": false + } + ] +} +``` ### pip list ```bash pip list | jc --pip-list -p # or: jc -p pip list # or: jc -p pip3 list @@ -1929,7 +2011,6 @@ pip list | jc --pip-list -p # or: jc -p pip list # or: jc -p "version": "0.24.0" } ] - ``` ### pip show ```bash @@ -2422,6 +2503,131 @@ timedatectl | jc --timedatectl -p # or: jc -p timedatectl "dst_active": true } ``` +### tracepath +```bash +tracepath6 3ffe:2400:0:109::2 | jc --tracepath -p +``` +```json +{ + "pmtu": 1480, + "forward_hops": 2, + "return_hops": 2, + "hops": [ + { + "ttl": 1, + "guess": true, + "host": "[LOCALHOST]", + "reply_ms": null, + "pmtu": 1500, + "asymmetric_difference": null, + "reached": false + }, + { + "ttl": 1, + "guess": false, + "host": "dust.inr.ac.ru", + "reply_ms": 0.411, + "pmtu": null, + "asymmetric_difference": null, + "reached": false + }, + { + "ttl": 2, + "guess": false, + "host": "dust.inr.ac.ru", + "reply_ms": 0.39, + "pmtu": 1480, + "asymmetric_difference": 1, + "reached": false + }, + { + "ttl": 2, + "guess": false, + "host": "3ffe:2400:0:109::2", + "reply_ms": 463.514, + "pmtu": null, + "asymmetric_difference": null, + "reached": true + } + ] +} +``` +### traceroute +```bash +traceroute -m 3 8.8.8.8 | jc --traceroute -p # or: jc -p traceroute -m 3 8.8.8.8 +``` +```json +{ + "destination_ip": "8.8.8.8", + "destination_name": "8.8.8.8", + "hops": [ + { + "hop": 1, + "probes": [ + { + "annotation": null, + "asn": null, + "ip": "192.168.1.254", + "name": "dsldevice.local.net", + "rtt": 6.616 + }, + { + "annotation": null, + "asn": null, + "ip": "192.168.1.254", + "name": "dsldevice.local.net", + "rtt": 6.413 + }, + { + "annotation": null, + "asn": null, + "ip": "192.168.1.254", + "name": "dsldevice.local.net", + "rtt": 6.308 + } + ] + }, + { + "hop": 2, + "probes": [ + { + "annotation": null, + "asn": null, + "ip": "76.220.24.1", + "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", + "rtt": 29.367 + }, + { + "annotation": null, + "asn": null, + "ip": "76.220.24.1", + "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", + "rtt": 40.197 + }, + { + "annotation": null, + "asn": null, + "ip": "76.220.24.1", + "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", + "rtt": 29.162 + } + ] + }, + { + "hop": 3, + "probes": [ + { + "annotation": null, + "asn": null, + "ip": null, + "name": null, + "rtt": null + } + ] + } + ] +} +``` ### uname -a ```bash uname -a | jc --uname -p # or: jc -p uname -a diff --git a/changelog.txt b/changelog.txt index 0a456799..3a1d3f7a 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,10 +1,18 @@ jc changelog +20200727 v1.13.0 +- Add ping and ping6 command parser tested on linux, macos, and freebsd +- Add traceroute and traceroute6 command parser tested on linux, macos, and freebsd +- Add tracepath command parser tested on linux +- Update ini parser to support files only containing key/value pairs +- Update uname parser exception with a hint to use "uname -a" +- Update route parser to support IPv6 tables + 20200711 v1.12.1 - Fix tests when using older version of pygments library 20200710 v1.12.0 -- Add sysctl command parser tested on linux, macOS, and freebsd12 +- Add sysctl command parser tested on linux, macOS, and freebsd - Update the cli code to allow older versions of the pygments library (2.3.0) for debian packaging - Code cleanup on the cli - Add tests for the cli diff --git a/docgen.sh b/docgen.sh index f7ab0bab..27f78227 100755 --- a/docgen.sh +++ b/docgen.sh @@ -37,6 +37,7 @@ pydocmd simple jc.parsers.mount+ > ../docs/parsers/mount.md pydocmd simple jc.parsers.netstat+ > ../docs/parsers/netstat.md pydocmd simple jc.parsers.ntpq+ > ../docs/parsers/ntpq.md pydocmd simple jc.parsers.passwd+ > ../docs/parsers/passwd.md +pydocmd simple jc.parsers.ping+ > ../docs/parsers/ping.md pydocmd simple jc.parsers.pip_list+ > ../docs/parsers/pip_list.md pydocmd simple jc.parsers.pip_show+ > ../docs/parsers/pip_show.md pydocmd simple jc.parsers.ps+ > ../docs/parsers/ps.md @@ -50,6 +51,8 @@ pydocmd simple jc.parsers.systemctl_lj+ > ../docs/parsers/systemctl_lj.md pydocmd simple jc.parsers.systemctl_ls+ > ../docs/parsers/systemctl_ls.md pydocmd simple jc.parsers.systemctl_luf+ > ../docs/parsers/systemctl_luf.md pydocmd simple jc.parsers.timedatectl+ > ../docs/parsers/timedatectl.md +pydocmd simple jc.parsers.tracepath+ > ../docs/parsers/tracepath.md +pydocmd simple jc.parsers.traceroute+ > ../docs/parsers/traceroute.md pydocmd simple jc.parsers.uname+ > ../docs/parsers/uname.md pydocmd simple jc.parsers.uptime+ > ../docs/parsers/uptime.md pydocmd simple jc.parsers.w+ > ../docs/parsers/w.md diff --git a/docs/parsers/ini.md b/docs/parsers/ini.md index 41ecc5bc..4067caca 100644 --- a/docs/parsers/ini.md +++ b/docs/parsers/ini.md @@ -3,7 +3,9 @@ jc - JSON CLI output utility INI Parser Usage: - specify --ini as the first argument if the piped input is coming from an INI file + Specify --ini as the first argument if the piped input is coming from an INI file or any + simple key/value pair file. Delimiter can be '=' or ':'. Missing values are supported. + Comment prefix can be '#' or ';'. Comments must be on their own line. Compatibility: @@ -61,11 +63,14 @@ Parameters: Returns: - Dictionary representing an ini document: + Dictionary representing an ini or simple key/value pair document: { - ini document converted to a dictionary - see configparser standard library documentation for more details + ini or key/value document converted to a dictionary - see configparser standard + library documentation for more details. + + Note: Values starting and ending with quotation marks will have the marks removed. + If you would like to keep the quotation marks, use the -r or raw=True argument. } ## parse diff --git a/docs/parsers/ping.md b/docs/parsers/ping.md new file mode 100644 index 00000000..59e2e50a --- /dev/null +++ b/docs/parsers/ping.md @@ -0,0 +1,171 @@ +# jc.parsers.ping +jc - JSON CLI output utility ping Parser + +Usage: + + specify --ping as the first argument if the piped input is coming from ping + + Note: Use the ping -c (count) option, otherwise data will not be piped to jc. + +Compatibility: + + 'linux', 'darwin', 'freebsd' + +Examples: + + $ ping -c 3 -p ff cnn.com | jc --ping -p + { + "destination_ip": "151.101.1.67", + "data_bytes": 56, + "pattern": "0xff", + "destination": "cnn.com", + "packets_transmitted": 3, + "packets_received": 3, + "packet_loss_percent": 0.0, + "duplicates": 0, + "round_trip_ms_min": 28.015, + "round_trip_ms_avg": 32.848, + "round_trip_ms_max": 39.376, + "round_trip_ms_stddev": 4.79, + "responses": [ + { + "type": "reply", + "bytes": 64, + "response_ip": "151.101.1.67", + "icmp_seq": 0, + "ttl": 59, + "time_ms": 28.015, + "duplicate": false + }, + { + "type": "reply", + "bytes": 64, + "response_ip": "151.101.1.67", + "icmp_seq": 1, + "ttl": 59, + "time_ms": 39.376, + "duplicate": false + }, + { + "type": "reply", + "bytes": 64, + "response_ip": "151.101.1.67", + "icmp_seq": 2, + "ttl": 59, + "time_ms": 31.153, + "duplicate": false + } + ] + } + + + $ ping -c 3 -p ff cnn.com | jc --ping -p -r + { + "destination_ip": "151.101.129.67", + "data_bytes": "56", + "pattern": "0xff", + "destination": "cnn.com", + "packets_transmitted": "3", + "packets_received": "3", + "packet_loss_percent": "0.0", + "duplicates": "0", + "round_trip_ms_min": "25.078", + "round_trip_ms_avg": "29.543", + "round_trip_ms_max": "32.553", + "round_trip_ms_stddev": "3.221", + "responses": [ + { + "type": "reply", + "bytes": "64", + "response_ip": "151.101.129.67", + "icmp_seq": "0", + "ttl": "59", + "time_ms": "25.078", + "duplicate": false + }, + { + "type": "reply", + "bytes": "64", + "response_ip": "151.101.129.67", + "icmp_seq": "1", + "ttl": "59", + "time_ms": "30.999", + "duplicate": false + }, + { + "type": "reply", + "bytes": "64", + "response_ip": "151.101.129.67", + "icmp_seq": "2", + "ttl": "59", + "time_ms": "32.553", + "duplicate": false + } + ] + } + +## info +```python +info(self, /, *args, **kwargs) +``` + +## process +```python +process(proc_data) +``` + +Final processing to conform to the schema. + +Parameters: + + proc_data: (dictionary) raw structured data to process + +Returns: + + Dictionary. Structured data with the following schema: + + { + "source_ip": string, + "destination_ip": string, + "data_bytes": integer, + "pattern": string, (null if not set) + "destination": string, + "packets_transmitted": integer, + "packets_received": integer, + "packet_loss_percent": float, + "duplicates": integer, + "round_trip_ms_min": float, + "round_trip_ms_avg": float, + "round_trip_ms_max": float, + "round_trip_ms_stddev": float, + "responses": [ + { + "type": string, ('reply' or 'timeout') + "timestamp": float, + "bytes": integer, + "response_ip": string, + "icmp_seq": integer, + "ttl": integer, + "time_ms": float, + "duplicate": boolean + } + ] + } + +## parse +```python +parse(data, raw=False, quiet=False) +``` + +Main text parsing function + +Parameters: + + data: (string) text data to parse + raw: (boolean) output preprocessed JSON if True + quiet: (boolean) suppress warning messages if True + +Returns: + + Dictionary. Raw or processed structured data. + diff --git a/docs/parsers/tracepath.md b/docs/parsers/tracepath.md new file mode 100644 index 00000000..16bffe7d --- /dev/null +++ b/docs/parsers/tracepath.md @@ -0,0 +1,158 @@ +# jc.parsers.tracepath +jc - JSON CLI output utility tracepath Parser + +Usage: + + specify --tracepath as the first argument if the piped input is coming from tracepath + +Compatibility: + + 'linux' + +Examples: + + $ tracepath6 3ffe:2400:0:109::2 | jc --tracepath -p + { + "pmtu": 1480, + "forward_hops": 2, + "return_hops": 2, + "hops": [ + { + "ttl": 1, + "guess": true, + "host": "[LOCALHOST]", + "reply_ms": null, + "pmtu": 1500, + "asymmetric_difference": null, + "reached": false + }, + { + "ttl": 1, + "guess": false, + "host": "dust.inr.ac.ru", + "reply_ms": 0.411, + "pmtu": null, + "asymmetric_difference": null, + "reached": false + }, + { + "ttl": 2, + "guess": false, + "host": "dust.inr.ac.ru", + "reply_ms": 0.39, + "pmtu": 1480, + "asymmetric_difference": 1, + "reached": false + }, + { + "ttl": 2, + "guess": false, + "host": "3ffe:2400:0:109::2", + "reply_ms": 463.514, + "pmtu": null, + "asymmetric_difference": null, + "reached": true + } + ] + } + + $ tracepath6 3ffe:2400:0:109::2 | jc --tracepath -p -r + { + "pmtu": "1480", + "forward_hops": "2", + "return_hops": "2", + "hops": [ + { + "ttl": "1", + "guess": true, + "host": "[LOCALHOST]", + "reply_ms": null, + "pmtu": "1500", + "asymmetric_difference": null, + "reached": false + }, + { + "ttl": "1", + "guess": false, + "host": "dust.inr.ac.ru", + "reply_ms": "0.411", + "pmtu": null, + "asymmetric_difference": null, + "reached": false + }, + { + "ttl": "2", + "guess": false, + "host": "dust.inr.ac.ru", + "reply_ms": "0.390", + "pmtu": "1480", + "asymmetric_difference": "1", + "reached": false + }, + { + "ttl": "2", + "guess": false, + "host": "3ffe:2400:0:109::2", + "reply_ms": "463.514", + "pmtu": null, + "asymmetric_difference": null, + "reached": true + } + ] + } + + +## info +```python +info(self, /, *args, **kwargs) +``` + +## process +```python +process(proc_data) +``` + +Final processing to conform to the schema. + +Parameters: + + proc_data: (dictionary) raw structured data to process + +Returns: + + Dictionary. Structured data with the following schema: + + { + "pmtu": integer, + "forward_hops": integer, + "return_hops": integer, + "hops": [ + { + "ttl": integer, + "guess": boolean, + "host": string, + "reply_ms": float, + "pmtu": integer, + "asymmetric_difference": integer, + "reached": boolean + } + ] + } + +## parse +```python +parse(data, raw=False, quiet=False) +``` + +Main text parsing function + +Parameters: + + data: (string) text data to parse + raw: (boolean) output preprocessed JSON if True + quiet: (boolean) suppress warning messages if True + +Returns: + + Dictionary. Raw or processed structured data. + diff --git a/docs/parsers/traceroute.md b/docs/parsers/traceroute.md new file mode 100644 index 00000000..4c6a2f5b --- /dev/null +++ b/docs/parsers/traceroute.md @@ -0,0 +1,147 @@ +# jc.parsers.traceroute +jc - JSON CLI output utility traceroute Parser + +Usage: + + specify --traceroute as the first argument if the piped input is coming from traceroute + + Note: on OSX and FreeBSD be sure to redirect STDERR to STDOUT since the header line is sent to STDERR + e.g. $ traceroute 8.8.8.8 2>&1 | jc --traceroute + +Compatibility: + + 'linux', 'darwin', 'freebsd' + +Examples: + + $ traceroute google.com | jc --traceroute -p + { + "destination_ip": "216.58.194.46", + "destination_name": "google.com", + "hops": [ + { + "hop": 1, + "probes": [ + { + "annotation": null, + "asn": null, + "ip": "216.230.231.141", + "name": "216-230-231-141.static.houston.tx.oplink.net", + "rtt": 198.574 + }, + { + "annotation": null, + "asn": null, + "ip": "216.230.231.141", + "name": "216-230-231-141.static.houston.tx.oplink.net", + "rtt": null + }, + { + "annotation": null, + "asn": null, + "ip": "216.230.231.141", + "name": "216-230-231-141.static.houston.tx.oplink.net", + "rtt": 198.65 + } + ] + }, + ... + ] + } + + $ traceroute google.com | jc --traceroute -p -r + { + "destination_ip": "216.58.194.46", + "destination_name": "google.com", + "hops": [ + { + "hop": "1", + "probes": [ + { + "annotation": null, + "asn": null, + "ip": "216.230.231.141", + "name": "216-230-231-141.static.houston.tx.oplink.net", + "rtt": "198.574" + }, + { + "annotation": null, + "asn": null, + "ip": "216.230.231.141", + "name": "216-230-231-141.static.houston.tx.oplink.net", + "rtt": null + }, + { + "annotation": null, + "asn": null, + "ip": "216.230.231.141", + "name": "216-230-231-141.static.houston.tx.oplink.net", + "rtt": "198.650" + } + ] + }, + ... + ] + } + +## info +```python +info(self, /, *args, **kwargs) +``` + +## Hop +```python +Hop(self, idx) +``` + +## process +```python +process(proc_data) +``` + +Final processing to conform to the schema. + +Parameters: + + proc_data: (dictionary) raw structured data to process + +Returns: + + Dictionary. Structured data with the following schema: + + { + "destination_ip": string, + "destination_name": string, + "hops": [ + { + "hop": integer, + "probes": [ + { + "annotation": string, + "asn": integer, + "ip": string, + "name": string, + "rtt": float + } + ] + } + ] + } + +## parse +```python +parse(data, raw=False, quiet=False) +``` + +Main text parsing function + +Parameters: + + data: (string) text data to parse + raw: (boolean) output preprocessed JSON if True + quiet: (boolean) suppress warning messages if True + +Returns: + + Dictionary. Raw or processed structured data. + diff --git a/jc/cli.py b/jc/cli.py index aedc17c4..a68ddeb1 100644 --- a/jc/cli.py +++ b/jc/cli.py @@ -21,8 +21,8 @@ import jc.appdirs as appdirs class info(): - version = '1.12.1' - description = 'JSON conversion tool for CLI output' + version = '1.13.0' + description = 'JSON CLI output utility' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -63,6 +63,7 @@ parsers = [ 'netstat', 'ntpq', 'passwd', + 'ping', 'pip-list', 'pip-show', 'ps', @@ -76,6 +77,8 @@ parsers = [ 'systemctl-ls', 'systemctl-luf', 'timedatectl', + 'tracepath', + 'traceroute', 'uname', 'uptime', 'w', diff --git a/jc/parsers/ini.py b/jc/parsers/ini.py index fc162d49..0ff13746 100644 --- a/jc/parsers/ini.py +++ b/jc/parsers/ini.py @@ -2,7 +2,9 @@ Usage: - specify --ini as the first argument if the piped input is coming from an INI file + Specify --ini as the first argument if the piped input is coming from an INI file or any + simple key/value pair file. Delimiter can be '=' or ':'. Missing values are supported. + Comment prefix can be '#' or ';'. Comments must be on their own line. Compatibility: @@ -47,8 +49,8 @@ import configparser class info(): - version = '1.1' - description = 'INI file parser' + version = '1.2' + description = 'INI file parser. Also parses files/output containing simple key/value pairs' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' details = 'Using configparser from the standard library' @@ -70,15 +72,33 @@ def process(proc_data): Returns: - Dictionary representing an ini document: + Dictionary representing an ini or simple key/value pair document: { - ini document converted to a dictionary - see configparser standard library documentation for more details + ini or key/value document converted to a dictionary - see configparser standard + library documentation for more details. + + Note: Values starting and ending with quotation marks will have the marks removed. + If you would like to keep the quotation marks, use the -r or raw=True argument. } """ + # remove quotation marks from beginning and end of values + for heading in proc_data: + # standard ini files with headers + if isinstance(proc_data[heading], dict): + for key, value in proc_data[heading].items(): + if value is not None and value.startswith('"') and value.endswith('"'): + proc_data[heading][key] = value.lstrip('"').rstrip('"') + elif value is None: + proc_data[heading][key] = '' + + # simple key/value files with no headers + else: + if proc_data[heading] is not None and proc_data[heading].startswith('"') and proc_data[heading].endswith('"'): + proc_data[heading] = proc_data[heading].lstrip('"').rstrip('"') + elif proc_data[heading] is None: + proc_data[heading] = '' - # No further processing return proc_data @@ -103,9 +123,17 @@ def parse(data, raw=False, quiet=False): if jc.utils.has_data(data): - ini = configparser.ConfigParser() - ini.read_string(data) - raw_output = {s: dict(ini.items(s)) for s in ini.sections()} + ini = configparser.ConfigParser(allow_no_value=True, interpolation=None) + try: + ini.read_string(data) + raw_output = {s: dict(ini.items(s)) for s in ini.sections()} + + except configparser.MissingSectionHeaderError: + data = '[data]\n' + data + ini.read_string(data) + output_dict = {s: dict(ini.items(s)) for s in ini.sections()} + for key, value in output_dict['data'].items(): + raw_output[key] = value if raw: return raw_output diff --git a/jc/parsers/ping.py b/jc/parsers/ping.py new file mode 100644 index 00000000..11a02279 --- /dev/null +++ b/jc/parsers/ping.py @@ -0,0 +1,507 @@ +"""jc - JSON CLI output utility ping Parser + +Usage: + + specify --ping as the first argument if the piped input is coming from ping + + Note: Use the ping -c (count) option, otherwise data will not be piped to jc. + +Compatibility: + + 'linux', 'darwin', 'freebsd' + +Examples: + + $ ping -c 3 -p ff cnn.com | jc --ping -p + { + "destination_ip": "151.101.1.67", + "data_bytes": 56, + "pattern": "0xff", + "destination": "cnn.com", + "packets_transmitted": 3, + "packets_received": 3, + "packet_loss_percent": 0.0, + "duplicates": 0, + "round_trip_ms_min": 28.015, + "round_trip_ms_avg": 32.848, + "round_trip_ms_max": 39.376, + "round_trip_ms_stddev": 4.79, + "responses": [ + { + "type": "reply", + "bytes": 64, + "response_ip": "151.101.1.67", + "icmp_seq": 0, + "ttl": 59, + "time_ms": 28.015, + "duplicate": false + }, + { + "type": "reply", + "bytes": 64, + "response_ip": "151.101.1.67", + "icmp_seq": 1, + "ttl": 59, + "time_ms": 39.376, + "duplicate": false + }, + { + "type": "reply", + "bytes": 64, + "response_ip": "151.101.1.67", + "icmp_seq": 2, + "ttl": 59, + "time_ms": 31.153, + "duplicate": false + } + ] + } + + + $ ping -c 3 -p ff cnn.com | jc --ping -p -r + { + "destination_ip": "151.101.129.67", + "data_bytes": "56", + "pattern": "0xff", + "destination": "cnn.com", + "packets_transmitted": "3", + "packets_received": "3", + "packet_loss_percent": "0.0", + "duplicates": "0", + "round_trip_ms_min": "25.078", + "round_trip_ms_avg": "29.543", + "round_trip_ms_max": "32.553", + "round_trip_ms_stddev": "3.221", + "responses": [ + { + "type": "reply", + "bytes": "64", + "response_ip": "151.101.129.67", + "icmp_seq": "0", + "ttl": "59", + "time_ms": "25.078", + "duplicate": false + }, + { + "type": "reply", + "bytes": "64", + "response_ip": "151.101.129.67", + "icmp_seq": "1", + "ttl": "59", + "time_ms": "30.999", + "duplicate": false + }, + { + "type": "reply", + "bytes": "64", + "response_ip": "151.101.129.67", + "icmp_seq": "2", + "ttl": "59", + "time_ms": "32.553", + "duplicate": false + } + ] + } +""" +import string +import jc.utils + + +class info(): + version = '1.0' + description = 'ping command parser' + author = 'Kelly Brazil' + author_email = 'kellyjonbrazil@gmail.com' + + # compatible options: linux, darwin, cygwin, win32, aix, freebsd + compatible = ['linux', 'darwin', 'freebsd'] + magic_commands = ['ping', 'ping6'] + + +__version__ = info.version + + +def process(proc_data): + """ + Final processing to conform to the schema. + + Parameters: + + proc_data: (dictionary) raw structured data to process + + Returns: + + Dictionary. Structured data with the following schema: + + { + "source_ip": string, + "destination_ip": string, + "data_bytes": integer, + "pattern": string, (null if not set) + "destination": string, + "packets_transmitted": integer, + "packets_received": integer, + "packet_loss_percent": float, + "duplicates": integer, + "round_trip_ms_min": float, + "round_trip_ms_avg": float, + "round_trip_ms_max": float, + "round_trip_ms_stddev": float, + "responses": [ + { + "type": string, ('reply' or 'timeout') + "timestamp": float, + "bytes": integer, + "response_ip": string, + "icmp_seq": integer, + "ttl": integer, + "time_ms": float, + "duplicate": boolean + } + ] + } + """ + int_list = ['data_bytes', 'packets_transmitted', 'packets_received', 'bytes', 'icmp_seq', 'ttl', 'duplicates'] + float_list = ['packet_loss_percent', 'round_trip_ms_min', 'round_trip_ms_avg', 'round_trip_ms_max', + 'round_trip_ms_stddev', 'timestamp', 'time_ms'] + + for key in proc_data.keys(): + for item in int_list: + if item == key: + try: + proc_data[key] = int(proc_data[key]) + except (ValueError, TypeError): + proc_data[key] = None + + for item in float_list: + if item == key: + try: + proc_data[key] = float(proc_data[key]) + except (ValueError, TypeError): + proc_data[key] = None + + if key == 'responses': + for entry in proc_data['responses']: + for k in entry.keys(): + if k in int_list: + try: + entry[k] = int(entry[k]) + except (ValueError, TypeError): + entry[k] = None + if k in float_list: + try: + entry[k] = float(entry[k]) + except (ValueError, TypeError): + entry[k] = None + + return proc_data + + +def linux_parse(data): + raw_output = {} + ping_responses = [] + pattern = None + footer = False + + linedata = data.splitlines() + + # check for PATTERN + if linedata[0].startswith('PATTERN: '): + pattern = linedata.pop(0).split(': ')[1] + + while not linedata[0].startswith('PING '): + linedata.pop(0) + + ipv4 = True if 'bytes of data' in linedata[0] else False + + if ipv4 and linedata[0][5] not in string.digits: + hostname = True + elif ipv4 and linedata[0][5] in string.digits: + hostname = False + elif not ipv4 and ' (' in linedata[0]: + hostname = True + else: + hostname = False + + for line in filter(None, linedata): + if line.startswith('PING '): + if ipv4 and not hostname: + dst_ip, dta_byts = (2, 3) + elif ipv4 and hostname: + dst_ip, dta_byts = (2, 3) + elif not ipv4 and not hostname: + dst_ip, dta_byts = (2, 3) + else: + dst_ip, dta_byts = (3, 4) + + line = line.replace('(', ' ').replace(')', ' ') + raw_output.update( + { + 'destination_ip': line.split()[dst_ip].lstrip('(').rstrip(')'), + 'data_bytes': line.split()[dta_byts], + 'pattern': pattern + } + ) + continue + + if line.startswith('---'): + footer = True + raw_output['destination'] = line.split()[1] + continue + + if footer: + if 'packets transmitted' in line: + if ' duplicates,' in line: + raw_output.update( + { + 'packets_transmitted': line.split()[0], + 'packets_received': line.split()[3], + 'packet_loss_percent': line.split()[7].rstrip('%'), + 'duplicates': line.split()[5].lstrip('+'), + 'time_ms': line.split()[11].replace('ms', '') + } + ) + continue + else: + raw_output.update( + { + 'packets_transmitted': line.split()[0], + 'packets_received': line.split()[3], + 'packet_loss_percent': line.split()[5].rstrip('%'), + 'duplicates': '0', + 'time_ms': line.split()[9].replace('ms', '') + } + ) + continue + + else: + split_line = line.split(' = ')[1] + split_line = split_line.split('/') + raw_output.update( + { + 'round_trip_ms_min': split_line[0], + 'round_trip_ms_avg': split_line[1], + 'round_trip_ms_max': split_line[2], + 'round_trip_ms_stddev': split_line[3].split()[0] + } + ) + + # ping response lines + else: + # request timeout + if 'no answer yet for icmp_seq=' in line: + timestamp = False + isequence = 5 + + # if timestamp option is specified, then shift icmp sequence field right by one + if line[0] == '[': + timestamp = True + isequence = 6 + + response = { + 'type': 'timeout', + 'timestamp': line.split()[0].lstrip('[').rstrip(']') if timestamp else None, + 'icmp_seq': line.replace('=', ' ').split()[isequence] + } + ping_responses.append(response) + continue + + # normal responses + else: + + line = line.replace('(', ' ').replace(')', ' ').replace('=', ' ') + + # positions of items depend on whether ipv4/ipv6 and/or ip/hostname is used + if ipv4 and not hostname: + bts, rip, iseq, t2l, tms = (0, 3, 5, 7, 9) + elif ipv4 and hostname: + bts, rip, iseq, t2l, tms = (0, 4, 7, 9, 11) + elif not ipv4 and not hostname: + bts, rip, iseq, t2l, tms = (0, 3, 5, 7, 9) + elif not ipv4 and hostname: + bts, rip, iseq, t2l, tms = (0, 4, 7, 9, 11) + + # if timestamp option is specified, then shift everything right by one + timestamp = False + if line[0] == '[': + timestamp = True + bts, rip, iseq, t2l, tms = (bts + 1, rip + 1, iseq + 1, t2l + 1, tms + 1) + + response = { + 'type': 'reply', + 'timestamp': line.split()[0].lstrip('[').rstrip(']') if timestamp else None, + 'bytes': line.split()[bts], + 'response_ip': line.split()[rip].rstrip(':'), + 'icmp_seq': line.split()[iseq], + 'ttl': line.split()[t2l], + 'time_ms': line.split()[tms], + 'duplicate': True if 'DUP!' in line else False + } + + ping_responses.append(response) + continue + + raw_output['responses'] = ping_responses + + return raw_output + + +def bsd_parse(data): + raw_output = {} + ping_responses = [] + pattern = None + footer = False + + linedata = data.splitlines() + + # check for PATTERN + if linedata[0].startswith('PATTERN: '): + pattern = linedata.pop(0).split(': ')[1] + + for line in filter(None, linedata): + if line.startswith('PING '): + raw_output.update( + { + 'destination_ip': line.split()[2].lstrip('(').rstrip(':').rstrip(')'), + 'data_bytes': line.split()[3], + 'pattern': pattern + } + ) + continue + + if line.startswith('PING6('): + line = line.replace('(', ' ').replace(')', ' ').replace('=', ' ') + raw_output.update( + { + 'source_ip': line.split()[4], + 'destination_ip': line.split()[6], + 'data_bytes': line.split()[1], + 'pattern': pattern + } + ) + continue + + if line.startswith('---'): + footer = True + raw_output['destination'] = line.split()[1] + continue + + if footer: + if 'packets transmitted' in line: + if ' duplicates,' in line: + raw_output.update( + { + 'packets_transmitted': line.split()[0], + 'packets_received': line.split()[3], + 'packet_loss_percent': line.split()[8].rstrip('%'), + 'duplicates': line.split()[6].lstrip('+'), + } + ) + continue + else: + raw_output.update( + { + 'packets_transmitted': line.split()[0], + 'packets_received': line.split()[3], + 'packet_loss_percent': line.split()[6].rstrip('%'), + 'duplicates': '0', + } + ) + continue + + else: + split_line = line.split(' = ')[1] + split_line = split_line.split('/') + raw_output.update( + { + 'round_trip_ms_min': split_line[0], + 'round_trip_ms_avg': split_line[1], + 'round_trip_ms_max': split_line[2], + 'round_trip_ms_stddev': split_line[3].replace(' ms', '') + } + ) + + # ping response lines + else: + # ipv4 lines + if ',' not in line: + + # request timeout + if line.startswith('Request timeout for '): + response = { + 'type': 'timeout', + 'icmp_seq': line.split()[4] + } + ping_responses.append(response) + continue + + # normal response + else: + line = line.replace(':', ' ').replace('=', ' ') + response = { + 'type': 'reply', + 'bytes': line.split()[0], + 'response_ip': line.split()[3], + 'icmp_seq': line.split()[5], + 'ttl': line.split()[7], + 'time_ms': line.split()[9] + } + ping_responses.append(response) + continue + + # ipv6 lines + else: + line = line.replace(',', ' ').replace('=', ' ') + response = { + 'type': 'reply', + 'bytes': line.split()[0], + 'response_ip': line.split()[3], + 'icmp_seq': line.split()[5], + 'ttl': line.split()[7], + 'time_ms': line.split()[9] + } + ping_responses.append(response) + continue + + # identify duplicates in responses + if ping_responses: + seq_list = [] + for reply in ping_responses: + seq_list.append(reply['icmp_seq']) + reply['duplicate'] = True if seq_list.count(reply['icmp_seq']) > 1 else False + + raw_output['responses'] = ping_responses + + return raw_output + + +def parse(data, raw=False, quiet=False): + """ + Main text parsing function + + Parameters: + + data: (string) text data to parse + raw: (boolean) output preprocessed JSON if True + quiet: (boolean) suppress warning messages if True + + Returns: + + Dictionary. Raw or processed structured data. + """ + if not quiet: + jc.utils.compatibility(__name__, info.compatible) + + raw_output = {} + + if jc.utils.has_data(data): + + if 'time' in data.splitlines()[-2]: + raw_output = linux_parse(data) + else: + raw_output = bsd_parse(data) + + if raw: + return raw_output + else: + return process(raw_output) diff --git a/jc/parsers/route.py b/jc/parsers/route.py index a8604a06..b14558b5 100644 --- a/jc/parsers/route.py +++ b/jc/parsers/route.py @@ -84,7 +84,7 @@ import jc.parsers.universal class info(): - version = '1.3' + version = '1.4' description = 'route command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -182,10 +182,16 @@ def parse(data, raw=False, quiet=False): jc.utils.compatibility(__name__, info.compatible) cleandata = data.splitlines()[1:] + raw_output = [] if jc.utils.has_data(data): + # fixup header row for ipv6 + if ' Next Hop ' in cleandata[0]: + cleandata[0] = cleandata[0].replace(' If', ' Iface') + cleandata[0] = cleandata[0].replace(' Next Hop ', ' Next_Hop ').replace(' Flag ', ' Flags ').replace(' Met ', ' Metric ') + cleandata[0] = cleandata[0].lower() raw_output = jc.parsers.universal.simple_table_parse(cleandata) diff --git a/jc/parsers/tracepath.py b/jc/parsers/tracepath.py new file mode 100644 index 00000000..f3ac5072 --- /dev/null +++ b/jc/parsers/tracepath.py @@ -0,0 +1,251 @@ +"""jc - JSON CLI output utility tracepath Parser + +Usage: + + specify --tracepath as the first argument if the piped input is coming from tracepath + +Compatibility: + + 'linux' + +Examples: + + $ tracepath6 3ffe:2400:0:109::2 | jc --tracepath -p + { + "pmtu": 1480, + "forward_hops": 2, + "return_hops": 2, + "hops": [ + { + "ttl": 1, + "guess": true, + "host": "[LOCALHOST]", + "reply_ms": null, + "pmtu": 1500, + "asymmetric_difference": null, + "reached": false + }, + { + "ttl": 1, + "guess": false, + "host": "dust.inr.ac.ru", + "reply_ms": 0.411, + "pmtu": null, + "asymmetric_difference": null, + "reached": false + }, + { + "ttl": 2, + "guess": false, + "host": "dust.inr.ac.ru", + "reply_ms": 0.39, + "pmtu": 1480, + "asymmetric_difference": 1, + "reached": false + }, + { + "ttl": 2, + "guess": false, + "host": "3ffe:2400:0:109::2", + "reply_ms": 463.514, + "pmtu": null, + "asymmetric_difference": null, + "reached": true + } + ] + } + + $ tracepath6 3ffe:2400:0:109::2 | jc --tracepath -p -r + { + "pmtu": "1480", + "forward_hops": "2", + "return_hops": "2", + "hops": [ + { + "ttl": "1", + "guess": true, + "host": "[LOCALHOST]", + "reply_ms": null, + "pmtu": "1500", + "asymmetric_difference": null, + "reached": false + }, + { + "ttl": "1", + "guess": false, + "host": "dust.inr.ac.ru", + "reply_ms": "0.411", + "pmtu": null, + "asymmetric_difference": null, + "reached": false + }, + { + "ttl": "2", + "guess": false, + "host": "dust.inr.ac.ru", + "reply_ms": "0.390", + "pmtu": "1480", + "asymmetric_difference": "1", + "reached": false + }, + { + "ttl": "2", + "guess": false, + "host": "3ffe:2400:0:109::2", + "reply_ms": "463.514", + "pmtu": null, + "asymmetric_difference": null, + "reached": true + } + ] + } + +""" +import re +import jc.utils + + +class info(): + version = '1.0' + description = 'tracepath command parser' + author = 'Kelly Brazil' + author_email = 'kellyjonbrazil@gmail.com' + + # compatible options: linux, darwin, cygwin, win32, aix, freebsd + compatible = ['linux'] + magic_commands = ['tracepath', 'tracepath6'] + + +__version__ = info.version + + +def process(proc_data): + """ + Final processing to conform to the schema. + + Parameters: + + proc_data: (dictionary) raw structured data to process + + Returns: + + Dictionary. Structured data with the following schema: + + { + "pmtu": integer, + "forward_hops": integer, + "return_hops": integer, + "hops": [ + { + "ttl": integer, + "guess": boolean, + "host": string, + "reply_ms": float, + "pmtu": integer, + "asymmetric_difference": integer, + "reached": boolean + } + ] + } + """ + int_list = ['pmtu', 'forward_hops', 'return_hops', 'ttl', 'asymmetric_difference'] + float_list = ['reply_ms'] + + for key, value in proc_data.items(): + for item in int_list: + if key in int_list: + try: + proc_data[key] = int(proc_data[key]) + except (ValueError, TypeError): + proc_data[key] = None + + for item in int_list: + if key in float_list: + try: + proc_data[key] = float(proc_data[key]) + except (ValueError, TypeError): + proc_data[key] = None + + if 'hops' in proc_data: + for entry in proc_data['hops']: + for key in int_list: + if key in entry: + try: + entry[key] = int(entry[key]) + except (ValueError, TypeError): + entry[key] = None + + for key in float_list: + if key in entry: + try: + entry[key] = float(entry[key]) + except (ValueError, TypeError): + entry[key] = None + + return proc_data + + +def parse(data, raw=False, quiet=False): + """ + Main text parsing function + + Parameters: + + data: (string) text data to parse + raw: (boolean) output preprocessed JSON if True + quiet: (boolean) suppress warning messages if True + + Returns: + + Dictionary. Raw or processed structured data. + """ + if not quiet: + jc.utils.compatibility(__name__, info.compatible) + + RE_TTL_HOST = re.compile(r'^\s?(?P\d+)(?P\??):\s+(?P(?:no reply|\S+))') # groups: ttl, ttl_guess, host + RE_PMTU = re.compile(r'\spmtu\s(?P[\d]+)') # group: pmtu + RE_REPLY_MS = re.compile(r'\s(?P\d*\.\d*)ms') # group: reply_ms + RE_ASYMM = re.compile(r'\sasymm\s+(?P[\d]+)') # group: asymm + RE_REACHED = re.compile(r'\sreached') + RE_SUMMARY = re.compile(r'\s+Resume:\s+pmtu\s+(?P\d+)(?:\s+hops\s+(?P\d+))?(?:\s+back\s+(?P\d+))?') # groups: pmtu, hops, back + + raw_output = {} + + if jc.utils.has_data(data): + hops = [] + + for line in filter(None, data.splitlines()): + # grab hop information + ttl_host = re.search(RE_TTL_HOST, line) + pmtu = re.search(RE_PMTU, line) + reply_ms = re.search(RE_REPLY_MS, line) + asymm = re.search(RE_ASYMM, line) + reached = re.search(RE_REACHED, line) + summary = re.search(RE_SUMMARY, line) + + if ttl_host: + hop = { + 'ttl': ttl_host.group('ttl'), + 'guess': bool(ttl_host.group('ttl_guess')), + 'host': ttl_host.group('host') if ttl_host.group('host') != 'no reply' else None, + 'reply_ms': reply_ms.group('reply_ms') if reply_ms else None, + 'pmtu': pmtu.group('pmtu') if pmtu else None, + 'asymmetric_difference': asymm.group('asymm') if asymm else None, + 'reached': bool(reached) + } + + hops.append(hop) + continue + + elif summary: + raw_output = { + 'pmtu': summary.group('pmtu') if summary.group('pmtu') else None, + 'forward_hops': summary.group('hops') if summary.group('hops') else None, + 'return_hops': summary.group('back') if summary.group('back') else None, + 'hops': hops + } + + if raw: + return raw_output + else: + return process(raw_output) diff --git a/jc/parsers/traceroute.py b/jc/parsers/traceroute.py new file mode 100644 index 00000000..ed4c89c9 --- /dev/null +++ b/jc/parsers/traceroute.py @@ -0,0 +1,422 @@ +"""jc - JSON CLI output utility traceroute Parser + +Usage: + + specify --traceroute as the first argument if the piped input is coming from traceroute + + Note: on OSX and FreeBSD be sure to redirect STDERR to STDOUT since the header line is sent to STDERR + e.g. $ traceroute 8.8.8.8 2>&1 | jc --traceroute + +Compatibility: + + 'linux', 'darwin', 'freebsd' + +Examples: + + $ traceroute google.com | jc --traceroute -p + { + "destination_ip": "216.58.194.46", + "destination_name": "google.com", + "hops": [ + { + "hop": 1, + "probes": [ + { + "annotation": null, + "asn": null, + "ip": "216.230.231.141", + "name": "216-230-231-141.static.houston.tx.oplink.net", + "rtt": 198.574 + }, + { + "annotation": null, + "asn": null, + "ip": "216.230.231.141", + "name": "216-230-231-141.static.houston.tx.oplink.net", + "rtt": null + }, + { + "annotation": null, + "asn": null, + "ip": "216.230.231.141", + "name": "216-230-231-141.static.houston.tx.oplink.net", + "rtt": 198.65 + } + ] + }, + ... + ] + } + + $ traceroute google.com | jc --traceroute -p -r + { + "destination_ip": "216.58.194.46", + "destination_name": "google.com", + "hops": [ + { + "hop": "1", + "probes": [ + { + "annotation": null, + "asn": null, + "ip": "216.230.231.141", + "name": "216-230-231-141.static.houston.tx.oplink.net", + "rtt": "198.574" + }, + { + "annotation": null, + "asn": null, + "ip": "216.230.231.141", + "name": "216-230-231-141.static.houston.tx.oplink.net", + "rtt": null + }, + { + "annotation": null, + "asn": null, + "ip": "216.230.231.141", + "name": "216-230-231-141.static.houston.tx.oplink.net", + "rtt": "198.650" + } + ] + }, + ... + ] + } +""" +import re +from decimal import Decimal +import jc.utils + + +class info(): + version = '1.0' + description = 'traceroute command parser' + author = 'Kelly Brazil' + author_email = 'kellyjonbrazil@gmail.com' + details = 'Using the trparse library by Luis Benitez at https://github.com/lbenitez000/trparse' + + # compatible options: linux, darwin, cygwin, win32, aix, freebsd + compatible = ['linux', 'darwin', 'freebsd'] + magic_commands = ['traceroute', 'traceroute6'] + + +__version__ = info.version + + +''' +Copyright (C) 2015 Luis Benitez + +Parses the output of a traceroute execution into an AST (Abstract Syntax Tree). + +The MIT License (MIT) + +Copyright (c) 2014 Luis Benitez + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +''' + +RE_HEADER = re.compile(r'(\S+)\s+\((\d+\.\d+\.\d+\.\d+|[0-9a-fA-F:]+)\)') +RE_PROBE_NAME_IP = re.compile(r'(\S+)\s+\((\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|[0-9a-fA-F:]+)\)+') +RE_PROBE_BSD_IPV6 = re.compile(r'\b(?:[A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}\b') +RE_HOP = re.compile(r'^\s*(\d+)?\s+(.+)$') +RE_PROBE_ASN = re.compile(r'\[AS(\d+)\]') +RE_PROBE_RTT_ANNOTATION = re.compile(r'(\d+\.?\d+)?\s+ms|(\s+\*\s+)\s*(!\S*)?') + + +class Traceroute(object): + def __init__(self, dest_name, dest_ip): + self.dest_name = dest_name + self.dest_ip = dest_ip + self.hops = [] + + def add_hop(self, hop): + self.hops.append(hop) + + def __str__(self): + text = "Traceroute for %s (%s)\n\n" % (self.dest_name, self.dest_ip) + for hop in self.hops: + text += str(hop) + return text + + +class Hop(object): + def __init__(self, idx): + self.idx = idx # Hop count, starting at 1 (usually) + self.probes = [] # Series of Probe instances + + def add_probe(self, probe): + """Adds a Probe instance to this hop's results.""" + if self.probes: + probe_last = self.probes[-1] + if not probe.ip: + probe.ip = probe_last.ip + probe.name = probe_last.name + self.probes.append(probe) + + def __str__(self): + text = "{:>3d} ".format(self.idx) + text_len = len(text) + for n, probe in enumerate(self.probes): + text_probe = str(probe) + if n: + text += (text_len * " ") + text_probe + else: + text += text_probe + text += "\n" + return text + + +class Probe(object): + def __init__(self, name=None, ip=None, asn=None, rtt=None, annotation=None): + self.name = name + self.ip = ip + self.asn = asn # Autonomous System number + self.rtt = rtt # RTT in ms + self.annotation = annotation # Annotation, such as !H, !N, !X, etc + + def __str__(self): + text = "" + if self.asn is not None: + text += "[AS{:d}] ".format(self.asn) + if self.rtt: + text += "{:s} ({:s}) {:1.3f} ms".format(self.name, self.ip, self.rtt) + else: + text = "*" + if self.annotation: + text += " {:s}".format(self.annotation) + text += "\n" + return text + + +def loads(data): + lines = data.splitlines() + + # Get headers + match_dest = RE_HEADER.search(lines[0]) + dest_name = match_dest.group(1) + dest_ip = match_dest.group(2) + + # The Traceroute node is the root of the tree + traceroute = Traceroute(dest_name, dest_ip) + + # Parse the remaining lines, they should be only hops/probes + for line in lines[1:]: + # Skip empty lines + if not line: + continue + + hop_match = RE_HOP.match(line) + + if hop_match.group(1): + hop_index = int(hop_match.group(1)) + else: + hop_index = None + + if hop_index is not None: + hop = Hop(hop_index) + traceroute.add_hop(hop) + + hop_string = hop_match.group(2) + + probe_asn_match = RE_PROBE_ASN.search(hop_string) + if probe_asn_match: + probe_asn = int(probe_asn_match.group(1)) + else: + probe_asn = None + + probe_name_ip_match = RE_PROBE_NAME_IP.search(hop_string) + probe_bsd_ipv6_match = RE_PROBE_BSD_IPV6.search(hop_string) + if probe_name_ip_match: + probe_name = probe_name_ip_match.group(1) + probe_ip = probe_name_ip_match.group(2) + elif probe_bsd_ipv6_match: + probe_name = None + probe_ip = probe_bsd_ipv6_match.group(0) + else: + probe_name = None + probe_ip = None + + probe_rtt_annotations = RE_PROBE_RTT_ANNOTATION.findall(hop_string) + + for probe_rtt_annotation in probe_rtt_annotations: + if probe_rtt_annotation[0]: + probe_rtt = Decimal(probe_rtt_annotation[0]) + elif probe_rtt_annotation[1]: + probe_rtt = None + else: + message = f"Expected probe RTT or *. Got: '{probe_rtt_annotation[0]}'" + raise ParseError(message) + + probe_annotation = probe_rtt_annotation[2] or None + + probe = Probe( + name=probe_name, + ip=probe_ip, + asn=probe_asn, + rtt=probe_rtt, + annotation=probe_annotation + ) + hop.add_probe(probe) + + return traceroute + + +class ParseError(Exception): + pass + + +######################################################################################## + +def process(proc_data): + """ + Final processing to conform to the schema. + + Parameters: + + proc_data: (dictionary) raw structured data to process + + Returns: + + Dictionary. Structured data with the following schema: + + { + "destination_ip": string, + "destination_name": string, + "hops": [ + { + "hop": integer, + "probes": [ + { + "annotation": string, + "asn": integer, + "ip": string, + "name": string, + "rtt": float + } + ] + } + ] + } + """ + int_list = ['hop', 'asn'] + float_list = ['rtt'] + + if 'hops' in proc_data: + for entry in proc_data['hops']: + for key in int_list: + if key in entry: + try: + entry[key] = int(entry[key]) + except (ValueError, TypeError): + entry[key] = None + + for key in float_list: + if key in entry: + try: + entry[key] = float(entry[key]) + except (ValueError, TypeError): + entry[key] = None + + if 'probes' in entry: + for item in entry['probes']: + for key in int_list: + if key in item: + try: + item[key] = int(item[key]) + except (ValueError, TypeError): + item[key] = None + + for key in float_list: + if key in item: + try: + item[key] = float(item[key]) + except (ValueError, TypeError): + item[key] = None + + return proc_data + + +def parse(data, raw=False, quiet=False): + """ + Main text parsing function + + Parameters: + + data: (string) text data to parse + raw: (boolean) output preprocessed JSON if True + quiet: (boolean) suppress warning messages if True + + Returns: + + Dictionary. Raw or processed structured data. + """ + if not quiet: + jc.utils.compatibility(__name__, info.compatible) + + raw_output = {} + + if jc.utils.has_data(data): + + # remove any warning lines + new_data = [] + for data_line in data.splitlines(): + if 'traceroute: Warning: ' not in data_line and 'traceroute6: Warning: ' not in data_line: + new_data.append(data_line) + else: + continue + data = '\n'.join(new_data) + + # check if header row exists, otherwise raise exception + if not data.splitlines()[0].startswith('traceroute to ') and not data.splitlines()[0].startswith('traceroute6 to '): + raise ParseError('Traceroute header line not found. Be sure to redirect STDERR to STDOUT on some operating systems.') + + tr = loads(data) + hops = tr.hops + hops_list = [] + + if hops: + for hop in hops: + hop_obj = {} + hop_obj['hop'] = str(hop.idx) + probe_list = [] + + if hop.probes: + for probe in hop.probes: + probe_obj = { + 'annotation': probe.annotation, + 'asn': None if probe.asn is None else str(probe.asn), + 'ip': probe.ip, + 'name': probe.name, + 'rtt': None if probe.rtt is None else str(probe.rtt) + } + probe_list.append(probe_obj) + + hop_obj['probes'] = probe_list + hops_list.append(hop_obj) + + raw_output = { + 'destination_ip': tr.dest_ip, + 'destination_name': tr.dest_name, + 'hops': hops_list + } + + if raw: + return raw_output + else: + return process(raw_output) diff --git a/jc/parsers/uname.py b/jc/parsers/uname.py index fe69ffd4..96014671 100644 --- a/jc/parsers/uname.py +++ b/jc/parsers/uname.py @@ -30,7 +30,7 @@ import jc.utils class info(): - version = '1.3' + version = '1.4' description = 'uname -a command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -43,6 +43,10 @@ class info(): __version__ = info.version +class ParseError(Exception): + pass + + def process(proc_data): """ Final processing to conform to the schema. @@ -94,6 +98,10 @@ def parse(data, raw=False, quiet=False): # check for OSX output if data.startswith('Darwin'): parsed_line = data.split() + + if len(parsed_line) < 5: + raise ParseError('Could not parse uname output. Make sure to use "uname -a".') + raw_output['machine'] = parsed_line.pop(-1) raw_output['kernel_name'] = parsed_line.pop(0) raw_output['node_name'] = parsed_line.pop(0) @@ -103,6 +111,10 @@ def parse(data, raw=False, quiet=False): # otherwise use linux parser else: parsed_line = data.split(maxsplit=3) + + if len(parsed_line) < 3: + raise ParseError('Could not parse uname output. Make sure to use "uname -a".') + raw_output['kernel_name'] = parsed_line.pop(0) raw_output['node_name'] = parsed_line.pop(0) raw_output['kernel_release'] = parsed_line.pop(0) diff --git a/man/jc.1 b/man/jc.1 index df9273d1..16f346f5 100644 --- a/man/jc.1 +++ b/man/jc.1 @@ -1,4 +1,4 @@ -.TH jc 1 2020-07-12 1.12.1 "JSON CLI output utility" +.TH jc 1 2020-07-12 1.13.0 "JSON CLI output utility" .SH NAME jc \- JSONifies the output of many CLI tools and file-types .SH SYNOPSIS @@ -101,7 +101,7 @@ ifconfig command parser .TP .B \fB--ini\fP -INI file parser +INI file parser. Also parses files/output containing simple key/value pairs .TP .B \fB--iptables\fP @@ -148,6 +148,10 @@ ntpq \fB-p\fP command parser /etc/passwd file parser .TP .B +\fB--ping\fP +ping command parser +.TP +.B \fB--pip-list\fP pip list command parser .TP @@ -200,6 +204,14 @@ systemctl list-unit-files command parser timedatectl status command parser .TP .B +\fB--tracepath\fP +tracepath command parser +.TP +.B +\fB--traceroute\fP +traceroute command parser +.TP +.B \fB--uname\fP uname \fB-a\fP command parser .TP diff --git a/setup.py b/setup.py index 1ee76b23..d23701b8 100755 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open('README.md', 'r') as f: setuptools.setup( name='jc', - version='1.12.1', + version='1.13.0', author='Kelly Brazil', author_email='kellyjonbrazil@gmail.com', description='Converts the output of popular command-line tools and file-types to JSON.', diff --git a/tests/fixtures/centos-7.7/ping-hostname-O-D-p-s.json b/tests/fixtures/centos-7.7/ping-hostname-O-D-p-s.json new file mode 100644 index 00000000..85be346d --- /dev/null +++ b/tests/fixtures/centos-7.7/ping-hostname-O-D-p-s.json @@ -0,0 +1 @@ +{"destination_ip": "151.101.189.67", "data_bytes": 1400, "pattern": "0xabcd", "destination": "turner-tls.map.fastly.net", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19146.0, "round_trip_ms_min": 28.96, "round_trip_ms_avg": 34.468, "round_trip_ms_max": 38.892, "round_trip_ms_stddev": 3.497, "responses": [{"type": "reply", "timestamp": 1594978465.914536, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 1, "ttl": 59, "time_ms": 31.4, "duplicate": false}, {"type": "reply", "timestamp": 1594978465.993009, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 2, "ttl": 59, "time_ms": 30.3, "duplicate": false}, {"type": "reply", "timestamp": 1594978467.010196, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 3, "ttl": 59, "time_ms": 32.0, "duplicate": false}, {"type": "reply", "timestamp": 1594978468.033743, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 4, "ttl": 59, "time_ms": 38.8, "duplicate": false}, {"type": "reply", "timestamp": 1594978469.051227, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 5, "ttl": 59, "time_ms": 38.0, "duplicate": false}, {"type": "reply", "timestamp": 1594978470.048764, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 6, "ttl": 59, "time_ms": 29.9, "duplicate": false}, {"type": "reply", "timestamp": 1594978471.051945, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 7, "ttl": 59, "time_ms": 28.9, "duplicate": false}, {"type": "reply", "timestamp": 1594978472.064206, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 8, "ttl": 59, "time_ms": 37.4, "duplicate": false}, {"type": "reply", "timestamp": 1594978473.062587, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 9, "ttl": 59, "time_ms": 31.5, "duplicate": false}, {"type": "reply", "timestamp": 1594978474.074343, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 10, "ttl": 59, "time_ms": 38.3, "duplicate": false}, {"type": "reply", "timestamp": 1594978475.079703, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 11, "ttl": 59, "time_ms": 38.8, "duplicate": false}, {"type": "reply", "timestamp": 1594978476.076383, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 12, "ttl": 59, "time_ms": 30.7, "duplicate": false}, {"type": "reply", "timestamp": 1594978477.084119, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 13, "ttl": 59, "time_ms": 30.7, "duplicate": false}, {"type": "reply", "timestamp": 1594978478.092207, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 14, "ttl": 59, "time_ms": 31.6, "duplicate": false}, {"type": "reply", "timestamp": 1594978479.104358, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 15, "ttl": 59, "time_ms": 37.7, "duplicate": false}, {"type": "reply", "timestamp": 1594978480.106907, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 16, "ttl": 59, "time_ms": 37.5, "duplicate": false}, {"type": "reply", "timestamp": 1594978481.11558, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 17, "ttl": 59, "time_ms": 37.3, "duplicate": false}, {"type": "reply", "timestamp": 1594978482.119872, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 18, "ttl": 59, "time_ms": 33.8, "duplicate": false}, {"type": "reply", "timestamp": 1594978483.131901, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 19, "ttl": 59, "time_ms": 37.0, "duplicate": false}, {"type": "reply", "timestamp": 1594978484.141117, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 20, "ttl": 59, "time_ms": 36.9, "duplicate": false}]} diff --git a/tests/fixtures/centos-7.7/ping-hostname-O-D-p-s.out b/tests/fixtures/centos-7.7/ping-hostname-O-D-p-s.out new file mode 100644 index 00000000..968ece83 --- /dev/null +++ b/tests/fixtures/centos-7.7/ping-hostname-O-D-p-s.out @@ -0,0 +1,26 @@ +PATTERN: 0xabcd +PING turner-tls.map.fastly.net (151.101.189.67) 1400(1428) bytes of data. +[1594978465.914536] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=1 ttl=59 time=31.4 ms +[1594978465.993009] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=2 ttl=59 time=30.3 ms +[1594978467.010196] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=3 ttl=59 time=32.0 ms +[1594978468.033743] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=4 ttl=59 time=38.8 ms +[1594978469.051227] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=5 ttl=59 time=38.0 ms +[1594978470.048764] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=6 ttl=59 time=29.9 ms +[1594978471.051945] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=7 ttl=59 time=28.9 ms +[1594978472.064206] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=8 ttl=59 time=37.4 ms +[1594978473.062587] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=9 ttl=59 time=31.5 ms +[1594978474.074343] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=10 ttl=59 time=38.3 ms +[1594978475.079703] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=11 ttl=59 time=38.8 ms +[1594978476.076383] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=12 ttl=59 time=30.7 ms +[1594978477.084119] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=13 ttl=59 time=30.7 ms +[1594978478.092207] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=14 ttl=59 time=31.6 ms +[1594978479.104358] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=15 ttl=59 time=37.7 ms +[1594978480.106907] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=16 ttl=59 time=37.5 ms +[1594978481.115580] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=17 ttl=59 time=37.3 ms +[1594978482.119872] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=18 ttl=59 time=33.8 ms +[1594978483.131901] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=19 ttl=59 time=37.0 ms +[1594978484.141117] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=20 ttl=59 time=36.9 ms + +--- turner-tls.map.fastly.net ping statistics --- +20 packets transmitted, 20 received, 0% packet loss, time 19146ms +rtt min/avg/max/mdev = 28.960/34.468/38.892/3.497 ms diff --git a/tests/fixtures/centos-7.7/ping-hostname-O-p.json b/tests/fixtures/centos-7.7/ping-hostname-O-p.json new file mode 100644 index 00000000..06bc9416 --- /dev/null +++ b/tests/fixtures/centos-7.7/ping-hostname-O-p.json @@ -0,0 +1 @@ +{"destination_ip": "151.101.129.67", "data_bytes": 56, "pattern": "0xabcd", "destination": "turner-tls.map.fastly.net", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19233.0, "round_trip_ms_min": 23.359, "round_trip_ms_avg": 28.495, "round_trip_ms_max": 33.979, "round_trip_ms_stddev": 4.081, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 1, "ttl": 59, "time_ms": 24.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 2, "ttl": 59, "time_ms": 23.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 3, "ttl": 59, "time_ms": 32.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 4, "ttl": 59, "time_ms": 32.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 5, "ttl": 59, "time_ms": 26.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 6, "ttl": 59, "time_ms": 24.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 7, "ttl": 59, "time_ms": 24.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 8, "ttl": 59, "time_ms": 33.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 9, "ttl": 59, "time_ms": 32.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 10, "ttl": 59, "time_ms": 31.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 11, "ttl": 59, "time_ms": 25.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 12, "ttl": 59, "time_ms": 33.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 13, "ttl": 59, "time_ms": 23.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 14, "ttl": 59, "time_ms": 23.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 15, "ttl": 59, "time_ms": 33.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 16, "ttl": 59, "time_ms": 24.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 17, "ttl": 59, "time_ms": 30.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 18, "ttl": 59, "time_ms": 24.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 19, "ttl": 59, "time_ms": 32.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 20, "ttl": 59, "time_ms": 31.0, "duplicate": false}]} diff --git a/tests/fixtures/centos-7.7/ping-hostname-O-p.out b/tests/fixtures/centos-7.7/ping-hostname-O-p.out new file mode 100644 index 00000000..ea26b2e3 --- /dev/null +++ b/tests/fixtures/centos-7.7/ping-hostname-O-p.out @@ -0,0 +1,26 @@ +PATTERN: 0xabcd +PING turner-tls.map.fastly.net (151.101.129.67) 56(84) bytes of data. +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=1 ttl=59 time=24.4 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=2 ttl=59 time=23.3 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=3 ttl=59 time=32.6 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=4 ttl=59 time=32.6 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=5 ttl=59 time=26.9 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=6 ttl=59 time=24.1 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=7 ttl=59 time=24.6 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=8 ttl=59 time=33.9 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=9 ttl=59 time=32.7 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=10 ttl=59 time=31.2 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=11 ttl=59 time=25.7 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=12 ttl=59 time=33.8 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=13 ttl=59 time=23.7 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=14 ttl=59 time=23.9 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=15 ttl=59 time=33.6 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=16 ttl=59 time=24.5 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=17 ttl=59 time=30.1 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=18 ttl=59 time=24.1 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=19 ttl=59 time=32.2 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=20 ttl=59 time=31.0 ms + +--- turner-tls.map.fastly.net ping statistics --- +20 packets transmitted, 20 received, 0% packet loss, time 19233ms +rtt min/avg/max/mdev = 23.359/28.495/33.979/4.081 ms diff --git a/tests/fixtures/centos-7.7/ping-hostname-O.json b/tests/fixtures/centos-7.7/ping-hostname-O.json new file mode 100644 index 00000000..f0d50844 --- /dev/null +++ b/tests/fixtures/centos-7.7/ping-hostname-O.json @@ -0,0 +1 @@ +{"destination_ip": "151.101.189.67", "data_bytes": 56, "pattern": null, "destination": "turner-tls.map.fastly.net", "packets_transmitted": 20, "packets_received": 19, "packet_loss_percent": 5.0, "duplicates": 0, "time_ms": 19125.0, "round_trip_ms_min": 27.656, "round_trip_ms_avg": 33.717, "round_trip_ms_max": 36.758, "round_trip_ms_stddev": 2.814, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 1, "ttl": 59, "time_ms": 29.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 2, "ttl": 59, "time_ms": 30.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 3, "ttl": 59, "time_ms": 35.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 4, "ttl": 59, "time_ms": 35.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 5, "ttl": 59, "time_ms": 34.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 6, "ttl": 59, "time_ms": 29.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 7, "ttl": 59, "time_ms": 27.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 8, "ttl": 59, "time_ms": 28.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 9, "ttl": 59, "time_ms": 35.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 10, "ttl": 59, "time_ms": 34.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 11, "ttl": 59, "time_ms": 35.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 12, "ttl": 59, "time_ms": 35.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 13, "ttl": 59, "time_ms": 34.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 14, "ttl": 59, "time_ms": 35.5, "duplicate": false}, {"type": "timeout", "timestamp": null, "icmp_seq": 15}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 16, "ttl": 59, "time_ms": 36.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 17, "ttl": 59, "time_ms": 34.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 18, "ttl": 59, "time_ms": 34.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 19, "ttl": 59, "time_ms": 36.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 20, "ttl": 59, "time_ms": 34.3, "duplicate": false}]} diff --git a/tests/fixtures/centos-7.7/ping-hostname-O.out b/tests/fixtures/centos-7.7/ping-hostname-O.out new file mode 100644 index 00000000..4eab9054 --- /dev/null +++ b/tests/fixtures/centos-7.7/ping-hostname-O.out @@ -0,0 +1,25 @@ +PING turner-tls.map.fastly.net (151.101.189.67) 56(84) bytes of data. +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=1 ttl=59 time=29.6 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=2 ttl=59 time=30.1 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=3 ttl=59 time=35.5 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=4 ttl=59 time=35.5 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=5 ttl=59 time=34.9 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=6 ttl=59 time=29.9 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=7 ttl=59 time=27.6 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=8 ttl=59 time=28.6 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=9 ttl=59 time=35.2 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=10 ttl=59 time=34.4 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=11 ttl=59 time=35.9 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=12 ttl=59 time=35.8 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=13 ttl=59 time=34.4 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=14 ttl=59 time=35.5 ms +no answer yet for icmp_seq=15 +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=16 ttl=59 time=36.6 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=17 ttl=59 time=34.6 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=18 ttl=59 time=34.6 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=19 ttl=59 time=36.7 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=20 ttl=59 time=34.3 ms + +--- turner-tls.map.fastly.net ping statistics --- +20 packets transmitted, 19 received, 5% packet loss, time 19125ms +rtt min/avg/max/mdev = 27.656/33.717/36.758/2.814 ms diff --git a/tests/fixtures/centos-7.7/ping-ip-O-D.json b/tests/fixtures/centos-7.7/ping-ip-O-D.json new file mode 100644 index 00000000..05207b96 --- /dev/null +++ b/tests/fixtures/centos-7.7/ping-ip-O-D.json @@ -0,0 +1 @@ +{"destination_ip": "127.0.0.1", "data_bytes": 56, "pattern": null, "destination": "127.0.0.1", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19081.0, "round_trip_ms_min": 0.041, "round_trip_ms_avg": 0.048, "round_trip_ms_max": 0.081, "round_trip_ms_stddev": 0.009, "responses": [{"type": "reply", "timestamp": 1595037214.261953, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.041, "duplicate": false}, {"type": "reply", "timestamp": 1595037215.264798, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.048, "duplicate": false}, {"type": "reply", "timestamp": 1595037216.272296, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 3, "ttl": 64, "time_ms": 0.047, "duplicate": false}, {"type": "reply", "timestamp": 1595037217.275851, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 4, "ttl": 64, "time_ms": 0.062, "duplicate": false}, {"type": "reply", "timestamp": 1595037218.284242, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 5, "ttl": 64, "time_ms": 0.045, "duplicate": false}, {"type": "reply", "timestamp": 1595037219.283712, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 6, "ttl": 64, "time_ms": 0.043, "duplicate": false}, {"type": "reply", "timestamp": 1595037220.290949, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 7, "ttl": 64, "time_ms": 0.046, "duplicate": false}, {"type": "reply", "timestamp": 1595037221.295962, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 8, "ttl": 64, "time_ms": 0.044, "duplicate": false}, {"type": "reply", "timestamp": 1595037222.30702, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 9, "ttl": 64, "time_ms": 0.048, "duplicate": false}, {"type": "reply", "timestamp": 1595037223.313919, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 10, "ttl": 64, "time_ms": 0.081, "duplicate": false}, {"type": "reply", "timestamp": 1595037224.313679, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 11, "ttl": 64, "time_ms": 0.043, "duplicate": false}, {"type": "reply", "timestamp": 1595037225.320748, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 12, "ttl": 64, "time_ms": 0.044, "duplicate": false}, {"type": "reply", "timestamp": 1595037226.324322, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 13, "ttl": 64, "time_ms": 0.045, "duplicate": false}, {"type": "reply", "timestamp": 1595037227.325835, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 14, "ttl": 64, "time_ms": 0.046, "duplicate": false}, {"type": "reply", "timestamp": 1595037228.327028, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 15, "ttl": 64, "time_ms": 0.046, "duplicate": false}, {"type": "reply", "timestamp": 1595037229.329891, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 16, "ttl": 64, "time_ms": 0.052, "duplicate": false}, {"type": "reply", "timestamp": 1595037230.333891, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 17, "ttl": 64, "time_ms": 0.044, "duplicate": false}, {"type": "reply", "timestamp": 1595037231.338137, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 18, "ttl": 64, "time_ms": 0.046, "duplicate": false}, {"type": "reply", "timestamp": 1595037232.340475, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 19, "ttl": 64, "time_ms": 0.048, "duplicate": false}, {"type": "reply", "timestamp": 1595037233.343058, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 20, "ttl": 64, "time_ms": 0.045, "duplicate": false}]} diff --git a/tests/fixtures/centos-7.7/ping-ip-O-D.out b/tests/fixtures/centos-7.7/ping-ip-O-D.out new file mode 100644 index 00000000..d09e205e --- /dev/null +++ b/tests/fixtures/centos-7.7/ping-ip-O-D.out @@ -0,0 +1,25 @@ +PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. +[1595037214.261953] 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.041 ms +[1595037215.264798] 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.048 ms +[1595037216.272296] 64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.047 ms +[1595037217.275851] 64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.062 ms +[1595037218.284242] 64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.045 ms +[1595037219.283712] 64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.043 ms +[1595037220.290949] 64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.046 ms +[1595037221.295962] 64 bytes from 127.0.0.1: icmp_seq=8 ttl=64 time=0.044 ms +[1595037222.307020] 64 bytes from 127.0.0.1: icmp_seq=9 ttl=64 time=0.048 ms +[1595037223.313919] 64 bytes from 127.0.0.1: icmp_seq=10 ttl=64 time=0.081 ms +[1595037224.313679] 64 bytes from 127.0.0.1: icmp_seq=11 ttl=64 time=0.043 ms +[1595037225.320748] 64 bytes from 127.0.0.1: icmp_seq=12 ttl=64 time=0.044 ms +[1595037226.324322] 64 bytes from 127.0.0.1: icmp_seq=13 ttl=64 time=0.045 ms +[1595037227.325835] 64 bytes from 127.0.0.1: icmp_seq=14 ttl=64 time=0.046 ms +[1595037228.327028] 64 bytes from 127.0.0.1: icmp_seq=15 ttl=64 time=0.046 ms +[1595037229.329891] 64 bytes from 127.0.0.1: icmp_seq=16 ttl=64 time=0.052 ms +[1595037230.333891] 64 bytes from 127.0.0.1: icmp_seq=17 ttl=64 time=0.044 ms +[1595037231.338137] 64 bytes from 127.0.0.1: icmp_seq=18 ttl=64 time=0.046 ms +[1595037232.340475] 64 bytes from 127.0.0.1: icmp_seq=19 ttl=64 time=0.048 ms +[1595037233.343058] 64 bytes from 127.0.0.1: icmp_seq=20 ttl=64 time=0.045 ms + +--- 127.0.0.1 ping statistics --- +20 packets transmitted, 20 received, 0% packet loss, time 19081ms +rtt min/avg/max/mdev = 0.041/0.048/0.081/0.009 ms diff --git a/tests/fixtures/centos-7.7/ping-ip-O.json b/tests/fixtures/centos-7.7/ping-ip-O.json new file mode 100644 index 00000000..1ebedce8 --- /dev/null +++ b/tests/fixtures/centos-7.7/ping-ip-O.json @@ -0,0 +1 @@ +{"destination_ip": "127.0.0.1", "data_bytes": 56, "pattern": null, "destination": "127.0.0.1", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19070.0, "round_trip_ms_min": 0.038, "round_trip_ms_avg": 0.047, "round_trip_ms_max": 0.08, "round_trip_ms_stddev": 0.011, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.038, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.043, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 3, "ttl": 64, "time_ms": 0.044, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 4, "ttl": 64, "time_ms": 0.052, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 5, "ttl": 64, "time_ms": 0.08, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 6, "ttl": 64, "time_ms": 0.043, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 7, "ttl": 64, "time_ms": 0.047, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 8, "ttl": 64, "time_ms": 0.04, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 9, "ttl": 64, "time_ms": 0.052, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 10, "ttl": 64, "time_ms": 0.044, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 11, "ttl": 64, "time_ms": 0.043, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 12, "ttl": 64, "time_ms": 0.043, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 13, "ttl": 64, "time_ms": 0.05, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 14, "ttl": 64, "time_ms": 0.045, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 15, "ttl": 64, "time_ms": 0.062, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 16, "ttl": 64, "time_ms": 0.046, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 17, "ttl": 64, "time_ms": 0.046, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 18, "ttl": 64, "time_ms": 0.045, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 19, "ttl": 64, "time_ms": 0.044, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 20, "ttl": 64, "time_ms": 0.044, "duplicate": false}]} diff --git a/tests/fixtures/centos-7.7/ping-ip-O.out b/tests/fixtures/centos-7.7/ping-ip-O.out new file mode 100644 index 00000000..18d63afd --- /dev/null +++ b/tests/fixtures/centos-7.7/ping-ip-O.out @@ -0,0 +1,25 @@ +PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. +64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.038 ms +64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.043 ms +64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.044 ms +64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.052 ms +64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.080 ms +64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.043 ms +64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.047 ms +64 bytes from 127.0.0.1: icmp_seq=8 ttl=64 time=0.040 ms +64 bytes from 127.0.0.1: icmp_seq=9 ttl=64 time=0.052 ms +64 bytes from 127.0.0.1: icmp_seq=10 ttl=64 time=0.044 ms +64 bytes from 127.0.0.1: icmp_seq=11 ttl=64 time=0.043 ms +64 bytes from 127.0.0.1: icmp_seq=12 ttl=64 time=0.043 ms +64 bytes from 127.0.0.1: icmp_seq=13 ttl=64 time=0.050 ms +64 bytes from 127.0.0.1: icmp_seq=14 ttl=64 time=0.045 ms +64 bytes from 127.0.0.1: icmp_seq=15 ttl=64 time=0.062 ms +64 bytes from 127.0.0.1: icmp_seq=16 ttl=64 time=0.046 ms +64 bytes from 127.0.0.1: icmp_seq=17 ttl=64 time=0.046 ms +64 bytes from 127.0.0.1: icmp_seq=18 ttl=64 time=0.045 ms +64 bytes from 127.0.0.1: icmp_seq=19 ttl=64 time=0.044 ms +64 bytes from 127.0.0.1: icmp_seq=20 ttl=64 time=0.044 ms + +--- 127.0.0.1 ping statistics --- +20 packets transmitted, 20 received, 0% packet loss, time 19070ms +rtt min/avg/max/mdev = 0.038/0.047/0.080/0.011 ms diff --git a/tests/fixtures/centos-7.7/ping-ip-dup.json b/tests/fixtures/centos-7.7/ping-ip-dup.json new file mode 100644 index 00000000..78113f45 --- /dev/null +++ b/tests/fixtures/centos-7.7/ping-ip-dup.json @@ -0,0 +1 @@ +{"destination_ip": "192.168.1.255", "data_bytes": 56, "pattern": null, "destination": "192.168.1.255", "packets_transmitted": 2, "packets_received": 2, "packet_loss_percent": 0.0, "duplicates": 19, "time_ms": 1013.0, "round_trip_ms_min": 0.586, "round_trip_ms_avg": 504.26, "round_trip_ms_max": 1276.448, "round_trip_ms_stddev": 417.208, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.221", "icmp_seq": 1, "ttl": 64, "time_ms": 0.586, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.88", "icmp_seq": 1, "ttl": 64, "time_ms": 382.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.78", "icmp_seq": 1, "ttl": 128, "time_ms": 382.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.217", "icmp_seq": 1, "ttl": 255, "time_ms": 387.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.186", "icmp_seq": 1, "ttl": 64, "time_ms": 389.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.89", "icmp_seq": 1, "ttl": 64, "time_ms": 389.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.75", "icmp_seq": 1, "ttl": 64, "time_ms": 584.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.221", "icmp_seq": 2, "ttl": 64, "time_ms": 0.861, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.78", "icmp_seq": 2, "ttl": 128, "time_ms": 4.17, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.88", "icmp_seq": 2, "ttl": 64, "time_ms": 4.19, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.89", "icmp_seq": 2, "ttl": 64, "time_ms": 12.7, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.81", "icmp_seq": 1, "ttl": 64, "time_ms": 1029.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.72", "icmp_seq": 1, "ttl": 64, "time_ms": 1276.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.251", "icmp_seq": 1, "ttl": 64, "time_ms": 1276.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.251", "icmp_seq": 2, "ttl": 64, "time_ms": 262.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.72", "icmp_seq": 2, "ttl": 64, "time_ms": 263.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.246", "icmp_seq": 2, "ttl": 255, "time_ms": 263.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.217", "icmp_seq": 2, "ttl": 255, "time_ms": 919.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.186", "icmp_seq": 2, "ttl": 64, "time_ms": 919.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.75", "icmp_seq": 2, "ttl": 64, "time_ms": 919.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.81", "icmp_seq": 2, "ttl": 64, "time_ms": 919.0, "duplicate": true}]} diff --git a/tests/fixtures/centos-7.7/ping-ip-dup.out b/tests/fixtures/centos-7.7/ping-ip-dup.out new file mode 100644 index 00000000..35dd734f --- /dev/null +++ b/tests/fixtures/centos-7.7/ping-ip-dup.out @@ -0,0 +1,27 @@ +WARNING: pinging broadcast address +PING 192.168.1.255 (192.168.1.255) 56(84) bytes of data. +64 bytes from 192.168.1.221: icmp_seq=1 ttl=64 time=0.586 ms +64 bytes from 192.168.1.88: icmp_seq=1 ttl=64 time=382 ms (DUP!) +64 bytes from 192.168.1.78: icmp_seq=1 ttl=128 time=382 ms (DUP!) +64 bytes from 192.168.1.217: icmp_seq=1 ttl=255 time=387 ms (DUP!) +64 bytes from 192.168.1.186: icmp_seq=1 ttl=64 time=389 ms (DUP!) +64 bytes from 192.168.1.89: icmp_seq=1 ttl=64 time=389 ms (DUP!) +64 bytes from 192.168.1.75: icmp_seq=1 ttl=64 time=584 ms (DUP!) +64 bytes from 192.168.1.221: icmp_seq=2 ttl=64 time=0.861 ms +64 bytes from 192.168.1.78: icmp_seq=2 ttl=128 time=4.17 ms (DUP!) +64 bytes from 192.168.1.88: icmp_seq=2 ttl=64 time=4.19 ms (DUP!) +64 bytes from 192.168.1.89: icmp_seq=2 ttl=64 time=12.7 ms (DUP!) +64 bytes from 192.168.1.81: icmp_seq=1 ttl=64 time=1029 ms (DUP!) +64 bytes from 192.168.1.72: icmp_seq=1 ttl=64 time=1276 ms (DUP!) +64 bytes from 192.168.1.251: icmp_seq=1 ttl=64 time=1276 ms (DUP!) +64 bytes from 192.168.1.251: icmp_seq=2 ttl=64 time=262 ms (DUP!) +64 bytes from 192.168.1.72: icmp_seq=2 ttl=64 time=263 ms (DUP!) +64 bytes from 192.168.1.246: icmp_seq=2 ttl=255 time=263 ms (DUP!) +64 bytes from 192.168.1.217: icmp_seq=2 ttl=255 time=919 ms (DUP!) +64 bytes from 192.168.1.186: icmp_seq=2 ttl=64 time=919 ms (DUP!) +64 bytes from 192.168.1.75: icmp_seq=2 ttl=64 time=919 ms (DUP!) +64 bytes from 192.168.1.81: icmp_seq=2 ttl=64 time=919 ms (DUP!) + +--- 192.168.1.255 ping statistics --- +2 packets transmitted, 2 received, +19 duplicates, 0% packet loss, time 1013ms +rtt min/avg/max/mdev = 0.586/504.260/1276.448/417.208 ms, pipe 2 diff --git a/tests/fixtures/centos-7.7/ping6-hostname-O-D-p-s.json b/tests/fixtures/centos-7.7/ping6-hostname-O-D-p-s.json new file mode 100644 index 00000000..fb31d412 --- /dev/null +++ b/tests/fixtures/centos-7.7/ping6-hostname-O-D-p-s.json @@ -0,0 +1 @@ +{"destination_ip": "2a04:4e42:2d::323", "data_bytes": 1400, "pattern": "0xabcd", "destination": "www.cnn.com", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19077.0, "round_trip_ms_min": 31.845, "round_trip_ms_avg": 39.274, "round_trip_ms_max": 43.243, "round_trip_ms_stddev": 3.522, "responses": [{"type": "reply", "timestamp": 1594978345.609669, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 1, "ttl": 59, "time_ms": 32.4, "duplicate": false}, {"type": "reply", "timestamp": 1594978346.58542, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 2, "ttl": 59, "time_ms": 39.9, "duplicate": false}, {"type": "reply", "timestamp": 1594978347.594128, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 3, "ttl": 59, "time_ms": 42.3, "duplicate": false}, {"type": "reply", "timestamp": 1594978348.595221, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 4, "ttl": 59, "time_ms": 40.2, "duplicate": false}, {"type": "reply", "timestamp": 1594978349.600372, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 5, "ttl": 59, "time_ms": 43.2, "duplicate": false}, {"type": "reply", "timestamp": 1594978350.590676, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 6, "ttl": 59, "time_ms": 31.8, "duplicate": false}, {"type": "reply", "timestamp": 1594978351.601527, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 7, "ttl": 59, "time_ms": 41.8, "duplicate": false}, {"type": "reply", "timestamp": 1594978352.604195, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 8, "ttl": 59, "time_ms": 41.7, "duplicate": false}, {"type": "reply", "timestamp": 1594978353.607212, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 9, "ttl": 59, "time_ms": 42.0, "duplicate": false}, {"type": "reply", "timestamp": 1594978354.610771, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 10, "ttl": 59, "time_ms": 40.7, "duplicate": false}, {"type": "reply", "timestamp": 1594978355.613729, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 11, "ttl": 59, "time_ms": 40.4, "duplicate": false}, {"type": "reply", "timestamp": 1594978356.611887, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 12, "ttl": 59, "time_ms": 32.6, "duplicate": false}, {"type": "reply", "timestamp": 1594978357.62481, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 13, "ttl": 59, "time_ms": 40.1, "duplicate": false}, {"type": "reply", "timestamp": 1594978358.629185, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 14, "ttl": 59, "time_ms": 42.0, "duplicate": false}, {"type": "reply", "timestamp": 1594978359.634854, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 15, "ttl": 59, "time_ms": 41.2, "duplicate": false}, {"type": "reply", "timestamp": 1594978360.638344, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 16, "ttl": 59, "time_ms": 40.6, "duplicate": false}, {"type": "reply", "timestamp": 1594978361.640968, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 17, "ttl": 59, "time_ms": 40.7, "duplicate": false}, {"type": "reply", "timestamp": 1594978362.645739, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 18, "ttl": 59, "time_ms": 39.9, "duplicate": false}, {"type": "reply", "timestamp": 1594978363.6467, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 19, "ttl": 59, "time_ms": 37.5, "duplicate": false}, {"type": "reply", "timestamp": 1594978364.650853, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 20, "ttl": 59, "time_ms": 33.6, "duplicate": false}]} diff --git a/tests/fixtures/centos-7.7/ping6-hostname-O-D-p-s.out b/tests/fixtures/centos-7.7/ping6-hostname-O-D-p-s.out new file mode 100644 index 00000000..5303338a --- /dev/null +++ b/tests/fixtures/centos-7.7/ping6-hostname-O-D-p-s.out @@ -0,0 +1,26 @@ +PATTERN: 0xabcd +PING www.cnn.com(2a04:4e42:2d::323 (2a04:4e42:2d::323)) 1400 data bytes +[1594978345.609669] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=1 ttl=59 time=32.4 ms +[1594978346.585420] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=2 ttl=59 time=39.9 ms +[1594978347.594128] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=3 ttl=59 time=42.3 ms +[1594978348.595221] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=4 ttl=59 time=40.2 ms +[1594978349.600372] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=5 ttl=59 time=43.2 ms +[1594978350.590676] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=6 ttl=59 time=31.8 ms +[1594978351.601527] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=7 ttl=59 time=41.8 ms +[1594978352.604195] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=8 ttl=59 time=41.7 ms +[1594978353.607212] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=9 ttl=59 time=42.0 ms +[1594978354.610771] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=10 ttl=59 time=40.7 ms +[1594978355.613729] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=11 ttl=59 time=40.4 ms +[1594978356.611887] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=12 ttl=59 time=32.6 ms +[1594978357.624810] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=13 ttl=59 time=40.1 ms +[1594978358.629185] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=14 ttl=59 time=42.0 ms +[1594978359.634854] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=15 ttl=59 time=41.2 ms +[1594978360.638344] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=16 ttl=59 time=40.6 ms +[1594978361.640968] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=17 ttl=59 time=40.7 ms +[1594978362.645739] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=18 ttl=59 time=39.9 ms +[1594978363.646700] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=19 ttl=59 time=37.5 ms +[1594978364.650853] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=20 ttl=59 time=33.6 ms + +--- www.cnn.com ping statistics --- +20 packets transmitted, 20 received, 0% packet loss, time 19077ms +rtt min/avg/max/mdev = 31.845/39.274/43.243/3.522 ms diff --git a/tests/fixtures/centos-7.7/ping6-hostname-O-p.json b/tests/fixtures/centos-7.7/ping6-hostname-O-p.json new file mode 100644 index 00000000..878f1044 --- /dev/null +++ b/tests/fixtures/centos-7.7/ping6-hostname-O-p.json @@ -0,0 +1 @@ +{"destination_ip": "2a04:4e42:2d::323", "data_bytes": 56, "pattern": "0xabcd", "destination": "www.cnn.com", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19164.0, "round_trip_ms_min": 30.757, "round_trip_ms_avg": 37.455, "round_trip_ms_max": 42.652, "round_trip_ms_stddev": 3.338, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 1, "ttl": 59, "time_ms": 30.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 2, "ttl": 59, "time_ms": 39.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 3, "ttl": 59, "time_ms": 32.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 4, "ttl": 59, "time_ms": 38.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 5, "ttl": 59, "time_ms": 38.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 6, "ttl": 59, "time_ms": 42.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 7, "ttl": 59, "time_ms": 30.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 8, "ttl": 59, "time_ms": 39.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 9, "ttl": 59, "time_ms": 39.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 10, "ttl": 59, "time_ms": 38.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 11, "ttl": 59, "time_ms": 38.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 12, "ttl": 59, "time_ms": 38.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 13, "ttl": 59, "time_ms": 39.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 14, "ttl": 59, "time_ms": 37.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 15, "ttl": 59, "time_ms": 33.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 16, "ttl": 59, "time_ms": 39.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 17, "ttl": 59, "time_ms": 38.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 18, "ttl": 59, "time_ms": 41.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 19, "ttl": 59, "time_ms": 32.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 20, "ttl": 59, "time_ms": 38.4, "duplicate": false}]} diff --git a/tests/fixtures/centos-7.7/ping6-hostname-O-p.out b/tests/fixtures/centos-7.7/ping6-hostname-O-p.out new file mode 100644 index 00000000..3fe6163a --- /dev/null +++ b/tests/fixtures/centos-7.7/ping6-hostname-O-p.out @@ -0,0 +1,26 @@ +PATTERN: 0xabcd +PING www.cnn.com(2a04:4e42:2d::323 (2a04:4e42:2d::323)) 56 data bytes +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=1 ttl=59 time=30.9 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=2 ttl=59 time=39.0 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=3 ttl=59 time=32.6 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=4 ttl=59 time=38.4 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=5 ttl=59 time=38.8 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=6 ttl=59 time=42.6 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=7 ttl=59 time=30.7 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=8 ttl=59 time=39.4 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=9 ttl=59 time=39.3 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=10 ttl=59 time=38.9 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=11 ttl=59 time=38.6 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=12 ttl=59 time=38.2 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=13 ttl=59 time=39.6 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=14 ttl=59 time=37.4 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=15 ttl=59 time=33.7 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=16 ttl=59 time=39.4 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=17 ttl=59 time=38.9 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=18 ttl=59 time=41.3 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=19 ttl=59 time=32.2 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=20 ttl=59 time=38.4 ms + +--- www.cnn.com ping statistics --- +20 packets transmitted, 20 received, 0% packet loss, time 19164ms +rtt min/avg/max/mdev = 30.757/37.455/42.652/3.338 ms diff --git a/tests/fixtures/centos-7.7/ping6-ip-O-D-p.json b/tests/fixtures/centos-7.7/ping6-ip-O-D-p.json new file mode 100644 index 00000000..4722bc35 --- /dev/null +++ b/tests/fixtures/centos-7.7/ping6-ip-O-D-p.json @@ -0,0 +1 @@ +{"destination_ip": "2a04:4e42:600::323", "data_bytes": 56, "pattern": "0xabcd", "destination": "2a04:4e42:600::323", "packets_transmitted": 20, "packets_received": 19, "packet_loss_percent": 5.0, "duplicates": 0, "time_ms": 19074.0, "round_trip_ms_min": 28.15, "round_trip_ms_avg": 33.534, "round_trip_ms_max": 39.843, "round_trip_ms_stddev": 3.489, "responses": [{"type": "reply", "timestamp": 1594976827.240914, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 1, "ttl": 59, "time_ms": 28.7, "duplicate": false}, {"type": "reply", "timestamp": 1594976828.25493, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 2, "ttl": 59, "time_ms": 37.2, "duplicate": false}, {"type": "reply", "timestamp": 1594976829.252877, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 3, "ttl": 59, "time_ms": 29.7, "duplicate": false}, {"type": "reply", "timestamp": 1594976830.262654, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 4, "ttl": 59, "time_ms": 37.7, "duplicate": false}, {"type": "reply", "timestamp": 1594976831.265626, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 5, "ttl": 59, "time_ms": 34.8, "duplicate": false}, {"type": "reply", "timestamp": 1594976832.269834, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 6, "ttl": 59, "time_ms": 35.6, "duplicate": false}, {"type": "reply", "timestamp": 1594976833.268059, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 7, "ttl": 59, "time_ms": 28.4, "duplicate": false}, {"type": "reply", "timestamp": 1594976834.274292, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 8, "ttl": 59, "time_ms": 28.1, "duplicate": false}, {"type": "reply", "timestamp": 1594976835.287123, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 9, "ttl": 59, "time_ms": 34.9, "duplicate": false}, {"type": "reply", "timestamp": 1594976836.287707, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 10, "ttl": 59, "time_ms": 34.4, "duplicate": false}, {"type": "reply", "timestamp": 1594976837.290589, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 11, "ttl": 59, "time_ms": 35.2, "duplicate": false}, {"type": "reply", "timestamp": 1594976838.293514, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 12, "ttl": 59, "time_ms": 35.4, "duplicate": false}, {"type": "reply", "timestamp": 1594976839.290914, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 13, "ttl": 59, "time_ms": 29.8, "duplicate": false}, {"type": "reply", "timestamp": 1594976840.292897, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 14, "ttl": 59, "time_ms": 28.5, "duplicate": false}, {"type": "timeout", "timestamp": 1594976842.269238, "icmp_seq": 15}, {"type": "reply", "timestamp": 1594976842.30145, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 16, "ttl": 59, "time_ms": 31.8, "duplicate": false}, {"type": "reply", "timestamp": 1594976843.312998, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 17, "ttl": 59, "time_ms": 39.8, "duplicate": false}, {"type": "reply", "timestamp": 1594976844.314228, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 18, "ttl": 59, "time_ms": 35.7, "duplicate": false}, {"type": "reply", "timestamp": 1594976845.315518, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 19, "ttl": 59, "time_ms": 35.1, "duplicate": false}, {"type": "reply", "timestamp": 1594976846.321706, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 20, "ttl": 59, "time_ms": 35.4, "duplicate": false}]} diff --git a/tests/fixtures/centos-7.7/ping6-ip-O-D-p.out b/tests/fixtures/centos-7.7/ping6-ip-O-D-p.out new file mode 100644 index 00000000..89f7f619 --- /dev/null +++ b/tests/fixtures/centos-7.7/ping6-ip-O-D-p.out @@ -0,0 +1,26 @@ +PATTERN: 0xabcd +PING 2a04:4e42:600::323(2a04:4e42:600::323) 56 data bytes +[1594976827.240914] 64 bytes from 2a04:4e42:600::323: icmp_seq=1 ttl=59 time=28.7 ms +[1594976828.254930] 64 bytes from 2a04:4e42:600::323: icmp_seq=2 ttl=59 time=37.2 ms +[1594976829.252877] 64 bytes from 2a04:4e42:600::323: icmp_seq=3 ttl=59 time=29.7 ms +[1594976830.262654] 64 bytes from 2a04:4e42:600::323: icmp_seq=4 ttl=59 time=37.7 ms +[1594976831.265626] 64 bytes from 2a04:4e42:600::323: icmp_seq=5 ttl=59 time=34.8 ms +[1594976832.269834] 64 bytes from 2a04:4e42:600::323: icmp_seq=6 ttl=59 time=35.6 ms +[1594976833.268059] 64 bytes from 2a04:4e42:600::323: icmp_seq=7 ttl=59 time=28.4 ms +[1594976834.274292] 64 bytes from 2a04:4e42:600::323: icmp_seq=8 ttl=59 time=28.1 ms +[1594976835.287123] 64 bytes from 2a04:4e42:600::323: icmp_seq=9 ttl=59 time=34.9 ms +[1594976836.287707] 64 bytes from 2a04:4e42:600::323: icmp_seq=10 ttl=59 time=34.4 ms +[1594976837.290589] 64 bytes from 2a04:4e42:600::323: icmp_seq=11 ttl=59 time=35.2 ms +[1594976838.293514] 64 bytes from 2a04:4e42:600::323: icmp_seq=12 ttl=59 time=35.4 ms +[1594976839.290914] 64 bytes from 2a04:4e42:600::323: icmp_seq=13 ttl=59 time=29.8 ms +[1594976840.292897] 64 bytes from 2a04:4e42:600::323: icmp_seq=14 ttl=59 time=28.5 ms +[1594976842.269238] no answer yet for icmp_seq=15 +[1594976842.301450] 64 bytes from 2a04:4e42:600::323: icmp_seq=16 ttl=59 time=31.8 ms +[1594976843.312998] 64 bytes from 2a04:4e42:600::323: icmp_seq=17 ttl=59 time=39.8 ms +[1594976844.314228] 64 bytes from 2a04:4e42:600::323: icmp_seq=18 ttl=59 time=35.7 ms +[1594976845.315518] 64 bytes from 2a04:4e42:600::323: icmp_seq=19 ttl=59 time=35.1 ms +[1594976846.321706] 64 bytes from 2a04:4e42:600::323: icmp_seq=20 ttl=59 time=35.4 ms + +--- 2a04:4e42:600::323 ping statistics --- +20 packets transmitted, 19 received, 5% packet loss, time 19074ms +rtt min/avg/max/mdev = 28.150/33.534/39.843/3.489 ms diff --git a/tests/fixtures/centos-7.7/ping6-ip-O-p.json b/tests/fixtures/centos-7.7/ping6-ip-O-p.json new file mode 100644 index 00000000..bb41dca9 --- /dev/null +++ b/tests/fixtures/centos-7.7/ping6-ip-O-p.json @@ -0,0 +1 @@ +{"destination_ip": "2a04:4e42:600::323", "data_bytes": 56, "pattern": "0xabcd", "destination": "2a04:4e42:600::323", "packets_transmitted": 20, "packets_received": 19, "packet_loss_percent": 5.0, "duplicates": 0, "time_ms": 19067.0, "round_trip_ms_min": 27.064, "round_trip_ms_avg": 33.626, "round_trip_ms_max": 38.146, "round_trip_ms_stddev": 3.803, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 1, "ttl": 59, "time_ms": 27.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 2, "ttl": 59, "time_ms": 28.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 3, "ttl": 59, "time_ms": 36.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 4, "ttl": 59, "time_ms": 28.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 5, "ttl": 59, "time_ms": 35.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 6, "ttl": 59, "time_ms": 34.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 7, "ttl": 59, "time_ms": 30.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 8, "ttl": 59, "time_ms": 28.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 9, "ttl": 59, "time_ms": 36.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 10, "ttl": 59, "time_ms": 36.3, "duplicate": false}, {"type": "timeout", "timestamp": null, "icmp_seq": 11}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 12, "ttl": 59, "time_ms": 37.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 13, "ttl": 59, "time_ms": 30.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 14, "ttl": 59, "time_ms": 36.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 15, "ttl": 59, "time_ms": 35.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 16, "ttl": 59, "time_ms": 36.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 17, "ttl": 59, "time_ms": 37.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 18, "ttl": 59, "time_ms": 36.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 19, "ttl": 59, "time_ms": 27.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 20, "ttl": 59, "time_ms": 38.1, "duplicate": false}]} diff --git a/tests/fixtures/centos-7.7/ping6-ip-O-p.out b/tests/fixtures/centos-7.7/ping6-ip-O-p.out new file mode 100644 index 00000000..934ff078 --- /dev/null +++ b/tests/fixtures/centos-7.7/ping6-ip-O-p.out @@ -0,0 +1,26 @@ +PATTERN: 0xabcd +PING 2a04:4e42:600::323(2a04:4e42:600::323) 56 data bytes +64 bytes from 2a04:4e42:600::323: icmp_seq=1 ttl=59 time=27.9 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=2 ttl=59 time=28.4 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=3 ttl=59 time=36.0 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=4 ttl=59 time=28.5 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=5 ttl=59 time=35.8 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=6 ttl=59 time=34.4 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=7 ttl=59 time=30.7 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=8 ttl=59 time=28.5 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=9 ttl=59 time=36.5 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=10 ttl=59 time=36.3 ms +no answer yet for icmp_seq=11 +64 bytes from 2a04:4e42:600::323: icmp_seq=12 ttl=59 time=37.4 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=13 ttl=59 time=30.7 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=14 ttl=59 time=36.5 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=15 ttl=59 time=35.4 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=16 ttl=59 time=36.3 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=17 ttl=59 time=37.5 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=18 ttl=59 time=36.2 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=19 ttl=59 time=27.0 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=20 ttl=59 time=38.1 ms + +--- 2a04:4e42:600::323 ping statistics --- +20 packets transmitted, 19 received, 5% packet loss, time 19067ms +rtt min/avg/max/mdev = 27.064/33.626/38.146/3.803 ms diff --git a/tests/fixtures/centos-7.7/ping6-ip-dup.json b/tests/fixtures/centos-7.7/ping6-ip-dup.json new file mode 100644 index 00000000..598c4d46 --- /dev/null +++ b/tests/fixtures/centos-7.7/ping6-ip-dup.json @@ -0,0 +1 @@ +{"destination_ip": "ff02::1%ens33", "data_bytes": 56, "pattern": null, "destination": "ff02::1%ens33", "packets_transmitted": 5, "packets_received": 5, "packet_loss_percent": 0.0, "duplicates": 4, "time_ms": 4017.0, "round_trip_ms_min": 0.245, "round_trip_ms_avg": 4.726, "round_trip_ms_max": 12.568, "round_trip_ms_stddev": 5.395, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "fe80::c48:5896:526d:81ba%ens33", "icmp_seq": 1, "ttl": 64, "time_ms": 0.245, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "fe80::feae:34ff:fea1:3a80%ens33", "icmp_seq": 1, "ttl": 64, "time_ms": 3.65, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "fe80::c48:5896:526d:81ba%ens33", "icmp_seq": 2, "ttl": 64, "time_ms": 0.329, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "fe80::feae:34ff:fea1:3a80%ens33", "icmp_seq": 2, "ttl": 64, "time_ms": 11.7, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "fe80::c48:5896:526d:81ba%ens33", "icmp_seq": 3, "ttl": 64, "time_ms": 0.592, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "fe80::feae:34ff:fea1:3a80%ens33", "icmp_seq": 3, "ttl": 64, "time_ms": 12.3, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "fe80::c48:5896:526d:81ba%ens33", "icmp_seq": 4, "ttl": 64, "time_ms": 0.51, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "fe80::feae:34ff:fea1:3a80%ens33", "icmp_seq": 4, "ttl": 64, "time_ms": 12.5, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "fe80::c48:5896:526d:81ba%ens33", "icmp_seq": 5, "ttl": 64, "time_ms": 0.538, "duplicate": false}]} diff --git a/tests/fixtures/centos-7.7/ping6-ip-dup.out b/tests/fixtures/centos-7.7/ping6-ip-dup.out new file mode 100644 index 00000000..932e0104 --- /dev/null +++ b/tests/fixtures/centos-7.7/ping6-ip-dup.out @@ -0,0 +1,14 @@ +PING ff02::1%ens33(ff02::1%ens33) 56 data bytes +64 bytes from fe80::c48:5896:526d:81ba%ens33: icmp_seq=1 ttl=64 time=0.245 ms +64 bytes from fe80::feae:34ff:fea1:3a80%ens33: icmp_seq=1 ttl=64 time=3.65 ms (DUP!) +64 bytes from fe80::c48:5896:526d:81ba%ens33: icmp_seq=2 ttl=64 time=0.329 ms +64 bytes from fe80::feae:34ff:fea1:3a80%ens33: icmp_seq=2 ttl=64 time=11.7 ms (DUP!) +64 bytes from fe80::c48:5896:526d:81ba%ens33: icmp_seq=3 ttl=64 time=0.592 ms +64 bytes from fe80::feae:34ff:fea1:3a80%ens33: icmp_seq=3 ttl=64 time=12.3 ms (DUP!) +64 bytes from fe80::c48:5896:526d:81ba%ens33: icmp_seq=4 ttl=64 time=0.510 ms +64 bytes from fe80::feae:34ff:fea1:3a80%ens33: icmp_seq=4 ttl=64 time=12.5 ms (DUP!) +64 bytes from fe80::c48:5896:526d:81ba%ens33: icmp_seq=5 ttl=64 time=0.538 ms + +--- ff02::1%ens33 ping statistics --- +5 packets transmitted, 5 received, +4 duplicates, 0% packet loss, time 4017ms +rtt min/avg/max/mdev = 0.245/4.726/12.568/5.395 ms diff --git a/tests/fixtures/centos-7.7/tracepath.json b/tests/fixtures/centos-7.7/tracepath.json new file mode 100644 index 00000000..dd689345 --- /dev/null +++ b/tests/fixtures/centos-7.7/tracepath.json @@ -0,0 +1 @@ +{"pmtu": 1500, "forward_hops": null, "return_hops": null, "hops": [{"ttl": 1, "guess": true, "host": "[LOCALHOST]", "reply_ms": null, "pmtu": 1500, "asymmetric_difference": null, "reached": false}, {"ttl": 1, "guess": false, "host": "dsldevice.attlocal.net", "reply_ms": 4.063, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 1, "guess": false, "host": "dsldevice.attlocal.net", "reply_ms": 6.368, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 2, "guess": false, "host": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "reply_ms": 24.092, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 3, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 4, "guess": false, "host": "12.242.117.16", "reply_ms": 161.527, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 5, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 6, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 3, "guess": false, "host": "71.148.149.0", "reply_ms": 12000.559, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 3, "guess": false, "host": "71.148.149.0", "reply_ms": 11967.523, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 3, "guess": false, "host": "71.148.149.0", "reply_ms": 11829.634, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 10, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 11, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 12, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 13, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 14, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 15, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 16, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 17, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 18, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 19, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 20, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 21, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 22, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 23, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 24, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 25, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 26, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 27, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 28, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 29, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 30, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}]} diff --git a/tests/fixtures/centos-7.7/tracepath.out b/tests/fixtures/centos-7.7/tracepath.out new file mode 100644 index 00000000..3491f7c3 --- /dev/null +++ b/tests/fixtures/centos-7.7/tracepath.out @@ -0,0 +1,34 @@ + 1?: [LOCALHOST] pmtu 1500 + 1: dsldevice.attlocal.net 4.063ms + 1: dsldevice.attlocal.net 6.368ms + 2: 76-220-24-1.lightspeed.sntcca.sbcglobal.net 24.092ms + 3: no reply + 4: 12.242.117.16 161.527ms + 5: no reply + 6: no reply + 3: 71.148.149.0 12000.559ms + 3: 71.148.149.0 11967.523ms + 3: 71.148.149.0 11829.634ms +10: no reply +11: no reply +12: no reply +13: no reply +14: no reply +15: no reply +16: no reply +17: no reply +18: no reply +19: no reply +20: no reply +21: no reply +22: no reply +23: no reply +24: no reply +25: no reply +26: no reply +27: no reply +28: no reply +29: no reply +30: no reply + Too many hops: pmtu 1500 + Resume: pmtu 1500 diff --git a/tests/fixtures/centos-7.7/tracepath6.json b/tests/fixtures/centos-7.7/tracepath6.json new file mode 100644 index 00000000..71a463ae --- /dev/null +++ b/tests/fixtures/centos-7.7/tracepath6.json @@ -0,0 +1 @@ +{"pmtu": 1480, "forward_hops": 2, "return_hops": 2, "hops": [{"ttl": 1, "guess": true, "host": "[LOCALHOST]", "reply_ms": null, "pmtu": 1500, "asymmetric_difference": null, "reached": false}, {"ttl": 1, "guess": false, "host": "dust.inr.ac.ru", "reply_ms": 0.411, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 2, "guess": false, "host": "dust.inr.ac.ru", "reply_ms": 0.39, "pmtu": 1480, "asymmetric_difference": 1, "reached": false}, {"ttl": 2, "guess": false, "host": "3ffe:2400:0:109::2", "reply_ms": 463.514, "pmtu": null, "asymmetric_difference": null, "reached": true}]} diff --git a/tests/fixtures/centos-7.7/tracepath6.out b/tests/fixtures/centos-7.7/tracepath6.out new file mode 100644 index 00000000..b3c22873 --- /dev/null +++ b/tests/fixtures/centos-7.7/tracepath6.out @@ -0,0 +1,5 @@ + 1?: [LOCALHOST] pmtu 1500 + 1: dust.inr.ac.ru 0.411ms + 2: dust.inr.ac.ru asymm 1 0.390ms pmtu 1480 + 2: 3ffe:2400:0:109::2 463.514ms reached + Resume: pmtu 1480 hops 2 back 2 diff --git a/tests/fixtures/centos-7.7/traceroute.json b/tests/fixtures/centos-7.7/traceroute.json new file mode 100644 index 00000000..1946407f --- /dev/null +++ b/tests/fixtures/centos-7.7/traceroute.json @@ -0,0 +1 @@ +{"destination_ip": "151.101.197.67", "destination_name": "www.cnn.com", "hops": [{"hop": 1, "probes": [{"annotation": null, "asn": null, "ip": "192.168.1.254", "name": "dsldevice.attlocal.net", "rtt": 4.024}, {"annotation": null, "asn": null, "ip": "192.168.1.254", "name": "dsldevice.attlocal.net", "rtt": 3.683}, {"annotation": null, "asn": null, "ip": "192.168.1.254", "name": "dsldevice.attlocal.net", "rtt": 3.706}]}, {"hop": 2, "probes": [{"annotation": null, "asn": null, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 24.038}, {"annotation": null, "asn": null, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 23.911}, {"annotation": null, "asn": null, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 23.724}]}, {"hop": 3, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 4, "probes": [{"annotation": null, "asn": null, "ip": "12.122.149.186", "name": "12.122.149.186", "rtt": 42.273}, {"annotation": null, "asn": null, "ip": "12.122.149.186", "name": "12.122.149.186", "rtt": 42.213}, {"annotation": null, "asn": null, "ip": "12.122.149.186", "name": "12.122.149.186", "rtt": 42.083}]}, {"hop": 5, "probes": [{"annotation": null, "asn": null, "ip": "12.122.2.77", "name": "12.122.2.77", "rtt": 36.789}, {"annotation": null, "asn": null, "ip": "12.122.2.77", "name": "12.122.2.77", "rtt": 43.691}, {"annotation": null, "asn": null, "ip": "12.122.2.77", "name": "12.122.2.77", "rtt": 36.597}]}, {"hop": 6, "probes": [{"annotation": null, "asn": null, "ip": "12.122.2.94", "name": "sd2ca21crs.ip.att.net", "rtt": 41.587}, {"annotation": null, "asn": null, "ip": "12.122.2.94", "name": "sd2ca21crs.ip.att.net", "rtt": 40.24}, {"annotation": null, "asn": null, "ip": "12.122.2.94", "name": "sd2ca21crs.ip.att.net", "rtt": 44.659}]}, {"hop": 7, "probes": [{"annotation": null, "asn": null, "ip": "12.123.215.161", "name": "12.123.215.161", "rtt": 37.858}, {"annotation": null, "asn": null, "ip": "12.123.215.161", "name": "12.123.215.161", "rtt": 37.321}, {"annotation": null, "asn": null, "ip": "12.123.215.161", "name": "12.123.215.161", "rtt": 37.092}]}, {"hop": 8, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 9, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 10, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 11, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 12, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 13, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 14, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 15, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 16, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 17, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 18, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 19, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 20, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 21, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 22, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 23, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 24, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 25, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 26, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 27, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 28, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 29, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 30, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}]} diff --git a/tests/fixtures/centos-7.7/traceroute.out b/tests/fixtures/centos-7.7/traceroute.out new file mode 100644 index 00000000..87a379b9 --- /dev/null +++ b/tests/fixtures/centos-7.7/traceroute.out @@ -0,0 +1,32 @@ +traceroute to www.cnn.com (151.101.197.67), 30 hops max, 60 byte packets + 1 dsldevice.attlocal.net (192.168.1.254) 4.024 ms 3.683 ms 3.706 ms + 2 76-220-24-1.lightspeed.sntcca.sbcglobal.net (76.220.24.1) 24.038 ms 23.911 ms 23.724 ms + 3 * * * + 4 12.122.149.186 (12.122.149.186) 42.273 ms 42.213 ms 42.083 ms + 5 12.122.2.77 (12.122.2.77) 36.789 ms 43.691 ms 36.597 ms + 6 sd2ca21crs.ip.att.net (12.122.2.94) 41.587 ms 40.240 ms 44.659 ms + 7 12.123.215.161 (12.123.215.161) 37.858 ms 37.321 ms 37.092 ms + 8 * * * + 9 * * * +10 * * * +11 * * * +12 * * * +13 * * * +14 * * * +15 * * * +16 * * * +17 * * * +18 * * * +19 * * * +20 * * * +21 * * * +22 * * * +23 * * * +24 * * * +25 * * * +26 * * * +27 * * * +28 * * * +29 * * * +30 * * * + diff --git a/tests/fixtures/create_fixtures.sh b/tests/fixtures/create_fixtures.sh index 3b79b265..ffca60b1 100644 --- a/tests/fixtures/create_fixtures.sh +++ b/tests/fixtures/create_fixtures.sh @@ -101,3 +101,31 @@ sudo lastb > lastb.out cat /etc/group > group.out sudo cat /etc/gshadow > gshadow.out + +# linux: +ping -4 www.cnn.com -c 20 -O > ping-hostname-O.out +ping -4 www.cnn.com -c 20 -O -p abcd > ping-hostname-O-p.out +ping -4 www.cnn.com -c 20 -O -D -p abcd -s 1400 > ping-hostname-O-D-p-s.out +ping 127.0.0.1 -c 20 -O > ping-ip-O.out +ping 127.0.0.1 -c 20 -O -D > ping-ip-O-D.out +ping6 2a04:4e42:600::323 -c 20 -O -p abcd > ping6-ip-O-p.out +ping6 2a04:4e42:600::323 -c 20 -O -D -p abcd > ping6-ip-O-D-p.out +ping6 www.cnn.com -c 20 -O -D -p abcd -s 1400 > ping6-hostname-O-D-p-s.out +ping6 www.cnn.com -c 20 -O -D -p abcd > ping6-hostname-O-D-p.out +ping6 www.cnn.com -c 20 -O -p abcd > ping6-hostname-O-p.out + +# osx/bsd: +ping -c 3 -s 40 127.0.0.1 > ping-ip-s.out +ping -c 3 -s 40 localhost > ping-hostname-s.out +ping -c 3 -p ff 127.0.0.1 > ping-ip-p.out +ping -c 3 127.0.0.1 > ping-ip.out +ping -c 3 -p ff cnn.com > ping-hostname-p.out +ping -c 3 cnn.com > ping-hostname.out +ping6 -c 3 -s 40 localhost > ping6-hostname-s.out +ping6 -c 3 -s 40 ::1 > ping6-ip-s.out +ping6 -c 3 -p ff ::1 > ping6-ip-p.out +ping6 -c 3 ::1 > ping6-ip.out +ping6 -c 3 -p ff localhost > ping6-hostname-p.out +ping6 -c 3 localhost > ping6-hostname.out + + diff --git a/tests/fixtures/fedora32/ping-hostname-O-D-p-s.json b/tests/fixtures/fedora32/ping-hostname-O-D-p-s.json new file mode 100644 index 00000000..76031357 --- /dev/null +++ b/tests/fixtures/fedora32/ping-hostname-O-D-p-s.json @@ -0,0 +1 @@ +{"destination_ip": "151.101.129.67", "data_bytes": 1400, "pattern": "0xabcd", "destination": "turner-tls.map.fastly.net", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19040.0, "round_trip_ms_min": 25.934, "round_trip_ms_avg": 43.176, "round_trip_ms_max": 149.271, "round_trip_ms_stddev": 26.937, "responses": [{"type": "reply", "timestamp": 1595191335.548399, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 1, "ttl": 59, "time_ms": 46.1, "duplicate": false}, {"type": "reply", "timestamp": 1595191336.134174, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 2, "ttl": 59, "time_ms": 61.5, "duplicate": false}, {"type": "reply", "timestamp": 1595191337.101575, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 3, "ttl": 59, "time_ms": 26.3, "duplicate": false}, {"type": "reply", "timestamp": 1595191338.108023, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 4, "ttl": 59, "time_ms": 30.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191339.229213, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 5, "ttl": 59, "time_ms": 149.0, "duplicate": false}, {"type": "reply", "timestamp": 1595191340.114026, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 6, "ttl": 59, "time_ms": 32.4, "duplicate": false}, {"type": "reply", "timestamp": 1595191341.122628, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 7, "ttl": 59, "time_ms": 37.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191342.110785, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 8, "ttl": 59, "time_ms": 26.0, "duplicate": false}, {"type": "reply", "timestamp": 1595191343.118652, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 9, "ttl": 59, "time_ms": 32.3, "duplicate": false}, {"type": "reply", "timestamp": 1595191344.1303, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 10, "ttl": 59, "time_ms": 43.4, "duplicate": false}, {"type": "reply", "timestamp": 1595191345.162284, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 11, "ttl": 59, "time_ms": 71.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191346.123086, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 12, "ttl": 59, "time_ms": 31.1, "duplicate": false}, {"type": "reply", "timestamp": 1595191347.127689, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 13, "ttl": 59, "time_ms": 33.6, "duplicate": false}, {"type": "reply", "timestamp": 1595191348.142817, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 14, "ttl": 59, "time_ms": 45.6, "duplicate": false}, {"type": "reply", "timestamp": 1595191349.125383, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 15, "ttl": 59, "time_ms": 25.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191350.136294, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 16, "ttl": 59, "time_ms": 34.0, "duplicate": false}, {"type": "reply", "timestamp": 1595191351.135889, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 17, "ttl": 59, "time_ms": 31.2, "duplicate": false}, {"type": "reply", "timestamp": 1595191352.134199, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 18, "ttl": 59, "time_ms": 26.2, "duplicate": false}, {"type": "reply", "timestamp": 1595191353.147391, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 19, "ttl": 59, "time_ms": 38.5, "duplicate": false}, {"type": "reply", "timestamp": 1595191354.15064, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 20, "ttl": 59, "time_ms": 39.5, "duplicate": false}]} diff --git a/tests/fixtures/fedora32/ping-hostname-O-D-p-s.out b/tests/fixtures/fedora32/ping-hostname-O-D-p-s.out new file mode 100644 index 00000000..2f241864 --- /dev/null +++ b/tests/fixtures/fedora32/ping-hostname-O-D-p-s.out @@ -0,0 +1,26 @@ +PATTERN: 0xabcd +PING turner-tls.map.fastly.net (151.101.129.67) 1400(1428) bytes of data. +[1595191335.548399] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=1 ttl=59 time=46.1 ms +[1595191336.134174] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=2 ttl=59 time=61.5 ms +[1595191337.101575] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=3 ttl=59 time=26.3 ms +[1595191338.108023] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=4 ttl=59 time=30.9 ms +[1595191339.229213] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=5 ttl=59 time=149 ms +[1595191340.114026] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=6 ttl=59 time=32.4 ms +[1595191341.122628] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=7 ttl=59 time=37.9 ms +[1595191342.110785] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=8 ttl=59 time=26.0 ms +[1595191343.118652] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=9 ttl=59 time=32.3 ms +[1595191344.130300] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=10 ttl=59 time=43.4 ms +[1595191345.162284] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=11 ttl=59 time=71.9 ms +[1595191346.123086] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=12 ttl=59 time=31.1 ms +[1595191347.127689] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=13 ttl=59 time=33.6 ms +[1595191348.142817] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=14 ttl=59 time=45.6 ms +[1595191349.125383] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=15 ttl=59 time=25.9 ms +[1595191350.136294] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=16 ttl=59 time=34.0 ms +[1595191351.135889] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=17 ttl=59 time=31.2 ms +[1595191352.134199] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=18 ttl=59 time=26.2 ms +[1595191353.147391] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=19 ttl=59 time=38.5 ms +[1595191354.150640] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=20 ttl=59 time=39.5 ms + +--- turner-tls.map.fastly.net ping statistics --- +20 packets transmitted, 20 received, 0% packet loss, time 19040ms +rtt min/avg/max/mdev = 25.934/43.176/149.271/26.937 ms diff --git a/tests/fixtures/fedora32/ping-hostname-O-p.json b/tests/fixtures/fedora32/ping-hostname-O-p.json new file mode 100644 index 00000000..dc0d440c --- /dev/null +++ b/tests/fixtures/fedora32/ping-hostname-O-p.json @@ -0,0 +1 @@ +{"destination_ip": "151.101.197.67", "data_bytes": 56, "pattern": "0xabcd", "destination": "turner-tls.map.fastly.net", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19026.0, "round_trip_ms_min": 37.406, "round_trip_ms_avg": 44.894, "round_trip_ms_max": 57.881, "round_trip_ms_stddev": 6.101, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 1, "ttl": 56, "time_ms": 38.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 2, "ttl": 56, "time_ms": 38.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 3, "ttl": 56, "time_ms": 39.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 4, "ttl": 56, "time_ms": 49.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 5, "ttl": 56, "time_ms": 47.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 6, "ttl": 56, "time_ms": 48.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 7, "ttl": 56, "time_ms": 53.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 8, "ttl": 56, "time_ms": 47.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 9, "ttl": 56, "time_ms": 47.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 10, "ttl": 56, "time_ms": 51.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 11, "ttl": 56, "time_ms": 55.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 12, "ttl": 56, "time_ms": 40.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 13, "ttl": 56, "time_ms": 39.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 14, "ttl": 56, "time_ms": 40.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 15, "ttl": 56, "time_ms": 41.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 16, "ttl": 56, "time_ms": 57.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 17, "ttl": 56, "time_ms": 45.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 18, "ttl": 56, "time_ms": 39.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 19, "ttl": 56, "time_ms": 37.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 20, "ttl": 56, "time_ms": 40.4, "duplicate": false}]} diff --git a/tests/fixtures/fedora32/ping-hostname-O-p.out b/tests/fixtures/fedora32/ping-hostname-O-p.out new file mode 100644 index 00000000..75e0c991 --- /dev/null +++ b/tests/fixtures/fedora32/ping-hostname-O-p.out @@ -0,0 +1,26 @@ +PATTERN: 0xabcd +PING turner-tls.map.fastly.net (151.101.197.67) 56(84) bytes of data. +64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=1 ttl=56 time=38.2 ms +64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=2 ttl=56 time=38.5 ms +64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=3 ttl=56 time=39.3 ms +64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=4 ttl=56 time=49.2 ms +64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=5 ttl=56 time=47.4 ms +64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=6 ttl=56 time=48.2 ms +64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=7 ttl=56 time=53.4 ms +64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=8 ttl=56 time=47.1 ms +64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=9 ttl=56 time=47.3 ms +64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=10 ttl=56 time=51.8 ms +64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=11 ttl=56 time=55.1 ms +64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=12 ttl=56 time=40.6 ms +64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=13 ttl=56 time=39.5 ms +64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=14 ttl=56 time=40.1 ms +64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=15 ttl=56 time=41.4 ms +64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=16 ttl=56 time=57.9 ms +64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=17 ttl=56 time=45.7 ms +64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=18 ttl=56 time=39.3 ms +64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=19 ttl=56 time=37.4 ms +64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=20 ttl=56 time=40.4 ms + +--- turner-tls.map.fastly.net ping statistics --- +20 packets transmitted, 20 received, 0% packet loss, time 19026ms +rtt min/avg/max/mdev = 37.406/44.894/57.881/6.101 ms diff --git a/tests/fixtures/fedora32/ping-hostname-O.json b/tests/fixtures/fedora32/ping-hostname-O.json new file mode 100644 index 00000000..eb399251 --- /dev/null +++ b/tests/fixtures/fedora32/ping-hostname-O.json @@ -0,0 +1 @@ +{"destination_ip": "151.101.129.67", "data_bytes": 56, "pattern": null, "destination": "turner-tls.map.fastly.net", "packets_transmitted": 20, "packets_received": 19, "packet_loss_percent": 5.0, "duplicates": 0, "time_ms": 19075.0, "round_trip_ms_min": 24.317, "round_trip_ms_avg": 61.577, "round_trip_ms_max": 274.537, "round_trip_ms_stddev": 69.94, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 1, "ttl": 59, "time_ms": 27.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 2, "ttl": 59, "time_ms": 31.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 3, "ttl": 59, "time_ms": 25.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 4, "ttl": 59, "time_ms": 65.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 5, "ttl": 59, "time_ms": 32.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 6, "ttl": 59, "time_ms": 32.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 7, "ttl": 59, "time_ms": 156.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 8, "ttl": 59, "time_ms": 216.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 9, "ttl": 59, "time_ms": 275.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 10, "ttl": 59, "time_ms": 25.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 11, "ttl": 59, "time_ms": 29.5, "duplicate": false}, {"type": "timeout", "timestamp": null, "icmp_seq": 12}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 13, "ttl": 59, "time_ms": 25.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 14, "ttl": 59, "time_ms": 33.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 15, "ttl": 59, "time_ms": 24.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 16, "ttl": 59, "time_ms": 35.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 17, "ttl": 59, "time_ms": 24.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 18, "ttl": 59, "time_ms": 34.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 19, "ttl": 59, "time_ms": 30.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 20, "ttl": 59, "time_ms": 45.8, "duplicate": false}]} diff --git a/tests/fixtures/fedora32/ping-hostname-O.out b/tests/fixtures/fedora32/ping-hostname-O.out new file mode 100644 index 00000000..1c2e12a4 --- /dev/null +++ b/tests/fixtures/fedora32/ping-hostname-O.out @@ -0,0 +1,25 @@ +PING turner-tls.map.fastly.net (151.101.129.67) 56(84) bytes of data. +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=1 ttl=59 time=27.5 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=2 ttl=59 time=31.5 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=3 ttl=59 time=25.5 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=4 ttl=59 time=65.1 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=5 ttl=59 time=32.4 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=6 ttl=59 time=32.2 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=7 ttl=59 time=156 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=8 ttl=59 time=216 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=9 ttl=59 time=275 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=10 ttl=59 time=25.7 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=11 ttl=59 time=29.5 ms +no answer yet for icmp_seq=12 +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=13 ttl=59 time=25.9 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=14 ttl=59 time=33.0 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=15 ttl=59 time=24.3 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=16 ttl=59 time=35.8 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=17 ttl=59 time=24.8 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=18 ttl=59 time=34.0 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=19 ttl=59 time=30.7 ms +64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=20 ttl=59 time=45.8 ms + +--- turner-tls.map.fastly.net ping statistics --- +20 packets transmitted, 19 received, 5% packet loss, time 19075ms +rtt min/avg/max/mdev = 24.317/61.577/274.537/69.940 ms diff --git a/tests/fixtures/fedora32/ping-ip-O-D.json b/tests/fixtures/fedora32/ping-ip-O-D.json new file mode 100644 index 00000000..28891b19 --- /dev/null +++ b/tests/fixtures/fedora32/ping-ip-O-D.json @@ -0,0 +1 @@ +{"destination_ip": "127.0.0.1", "data_bytes": 56, "pattern": null, "destination": "127.0.0.1", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19450.0, "round_trip_ms_min": 0.043, "round_trip_ms_avg": 0.086, "round_trip_ms_max": 0.135, "round_trip_ms_stddev": 0.016, "responses": [{"type": "reply", "timestamp": 1595191373.643436, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.043, "duplicate": false}, {"type": "reply", "timestamp": 1595191374.662543, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.083, "duplicate": false}, {"type": "reply", "timestamp": 1595191375.685291, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 3, "ttl": 64, "time_ms": 0.091, "duplicate": false}, {"type": "reply", "timestamp": 1595191376.709678, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 4, "ttl": 64, "time_ms": 0.092, "duplicate": false}, {"type": "reply", "timestamp": 1595191377.734105, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 5, "ttl": 64, "time_ms": 0.09, "duplicate": false}, {"type": "reply", "timestamp": 1595191378.758107, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 6, "ttl": 64, "time_ms": 0.089, "duplicate": false}, {"type": "reply", "timestamp": 1595191379.781215, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 7, "ttl": 64, "time_ms": 0.087, "duplicate": false}, {"type": "reply", "timestamp": 1595191380.80601, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 8, "ttl": 64, "time_ms": 0.092, "duplicate": false}, {"type": "reply", "timestamp": 1595191381.829806, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 9, "ttl": 64, "time_ms": 0.088, "duplicate": false}, {"type": "reply", "timestamp": 1595191382.853166, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 10, "ttl": 64, "time_ms": 0.135, "duplicate": false}, {"type": "reply", "timestamp": 1595191383.876966, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 11, "ttl": 64, "time_ms": 0.101, "duplicate": false}, {"type": "reply", "timestamp": 1595191384.900636, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 12, "ttl": 64, "time_ms": 0.084, "duplicate": false}, {"type": "reply", "timestamp": 1595191385.925055, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 13, "ttl": 64, "time_ms": 0.071, "duplicate": false}, {"type": "reply", "timestamp": 1595191386.94986, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 14, "ttl": 64, "time_ms": 0.087, "duplicate": false}, {"type": "reply", "timestamp": 1595191387.973041, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 15, "ttl": 64, "time_ms": 0.087, "duplicate": false}, {"type": "reply", "timestamp": 1595191388.997049, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 16, "ttl": 64, "time_ms": 0.073, "duplicate": false}, {"type": "reply", "timestamp": 1595191390.021265, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 17, "ttl": 64, "time_ms": 0.074, "duplicate": false}, {"type": "reply", "timestamp": 1595191391.044904, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 18, "ttl": 64, "time_ms": 0.089, "duplicate": false}, {"type": "reply", "timestamp": 1595191392.069285, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 19, "ttl": 64, "time_ms": 0.09, "duplicate": false}, {"type": "reply", "timestamp": 1595191393.093307, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 20, "ttl": 64, "time_ms": 0.084, "duplicate": false}]} diff --git a/tests/fixtures/fedora32/ping-ip-O-D.out b/tests/fixtures/fedora32/ping-ip-O-D.out new file mode 100644 index 00000000..fdbd3b05 --- /dev/null +++ b/tests/fixtures/fedora32/ping-ip-O-D.out @@ -0,0 +1,25 @@ +PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. +[1595191373.643436] 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.043 ms +[1595191374.662543] 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.083 ms +[1595191375.685291] 64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.091 ms +[1595191376.709678] 64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.092 ms +[1595191377.734105] 64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.090 ms +[1595191378.758107] 64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.089 ms +[1595191379.781215] 64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.087 ms +[1595191380.806010] 64 bytes from 127.0.0.1: icmp_seq=8 ttl=64 time=0.092 ms +[1595191381.829806] 64 bytes from 127.0.0.1: icmp_seq=9 ttl=64 time=0.088 ms +[1595191382.853166] 64 bytes from 127.0.0.1: icmp_seq=10 ttl=64 time=0.135 ms +[1595191383.876966] 64 bytes from 127.0.0.1: icmp_seq=11 ttl=64 time=0.101 ms +[1595191384.900636] 64 bytes from 127.0.0.1: icmp_seq=12 ttl=64 time=0.084 ms +[1595191385.925055] 64 bytes from 127.0.0.1: icmp_seq=13 ttl=64 time=0.071 ms +[1595191386.949860] 64 bytes from 127.0.0.1: icmp_seq=14 ttl=64 time=0.087 ms +[1595191387.973041] 64 bytes from 127.0.0.1: icmp_seq=15 ttl=64 time=0.087 ms +[1595191388.997049] 64 bytes from 127.0.0.1: icmp_seq=16 ttl=64 time=0.073 ms +[1595191390.021265] 64 bytes from 127.0.0.1: icmp_seq=17 ttl=64 time=0.074 ms +[1595191391.044904] 64 bytes from 127.0.0.1: icmp_seq=18 ttl=64 time=0.089 ms +[1595191392.069285] 64 bytes from 127.0.0.1: icmp_seq=19 ttl=64 time=0.090 ms +[1595191393.093307] 64 bytes from 127.0.0.1: icmp_seq=20 ttl=64 time=0.084 ms + +--- 127.0.0.1 ping statistics --- +20 packets transmitted, 20 received, 0% packet loss, time 19450ms +rtt min/avg/max/mdev = 0.043/0.086/0.135/0.016 ms diff --git a/tests/fixtures/fedora32/ping-ip-O.json b/tests/fixtures/fedora32/ping-ip-O.json new file mode 100644 index 00000000..54998228 --- /dev/null +++ b/tests/fixtures/fedora32/ping-ip-O.json @@ -0,0 +1 @@ +{"destination_ip": "127.0.0.1", "data_bytes": 56, "pattern": null, "destination": "127.0.0.1", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19480.0, "round_trip_ms_min": 0.043, "round_trip_ms_avg": 0.093, "round_trip_ms_max": 0.16, "round_trip_ms_stddev": 0.025, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.043, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.07, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 3, "ttl": 64, "time_ms": 0.09, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 4, "ttl": 64, "time_ms": 0.093, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 5, "ttl": 64, "time_ms": 0.078, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 6, "ttl": 64, "time_ms": 0.16, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 7, "ttl": 64, "time_ms": 0.089, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 8, "ttl": 64, "time_ms": 0.155, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 9, "ttl": 64, "time_ms": 0.084, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 10, "ttl": 64, "time_ms": 0.111, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 11, "ttl": 64, "time_ms": 0.079, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 12, "ttl": 64, "time_ms": 0.103, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 13, "ttl": 64, "time_ms": 0.105, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 14, "ttl": 64, "time_ms": 0.087, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 15, "ttl": 64, "time_ms": 0.081, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 16, "ttl": 64, "time_ms": 0.089, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 17, "ttl": 64, "time_ms": 0.09, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 18, "ttl": 64, "time_ms": 0.089, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 19, "ttl": 64, "time_ms": 0.09, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 20, "ttl": 64, "time_ms": 0.092, "duplicate": false}]} diff --git a/tests/fixtures/fedora32/ping-ip-O.out b/tests/fixtures/fedora32/ping-ip-O.out new file mode 100644 index 00000000..8b8c4d98 --- /dev/null +++ b/tests/fixtures/fedora32/ping-ip-O.out @@ -0,0 +1,25 @@ +PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. +64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.043 ms +64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.070 ms +64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.090 ms +64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.093 ms +64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.078 ms +64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.160 ms +64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.089 ms +64 bytes from 127.0.0.1: icmp_seq=8 ttl=64 time=0.155 ms +64 bytes from 127.0.0.1: icmp_seq=9 ttl=64 time=0.084 ms +64 bytes from 127.0.0.1: icmp_seq=10 ttl=64 time=0.111 ms +64 bytes from 127.0.0.1: icmp_seq=11 ttl=64 time=0.079 ms +64 bytes from 127.0.0.1: icmp_seq=12 ttl=64 time=0.103 ms +64 bytes from 127.0.0.1: icmp_seq=13 ttl=64 time=0.105 ms +64 bytes from 127.0.0.1: icmp_seq=14 ttl=64 time=0.087 ms +64 bytes from 127.0.0.1: icmp_seq=15 ttl=64 time=0.081 ms +64 bytes from 127.0.0.1: icmp_seq=16 ttl=64 time=0.089 ms +64 bytes from 127.0.0.1: icmp_seq=17 ttl=64 time=0.090 ms +64 bytes from 127.0.0.1: icmp_seq=18 ttl=64 time=0.089 ms +64 bytes from 127.0.0.1: icmp_seq=19 ttl=64 time=0.090 ms +64 bytes from 127.0.0.1: icmp_seq=20 ttl=64 time=0.092 ms + +--- 127.0.0.1 ping statistics --- +20 packets transmitted, 20 received, 0% packet loss, time 19480ms +rtt min/avg/max/mdev = 0.043/0.093/0.160/0.025 ms diff --git a/tests/fixtures/fedora32/ping6-hostname-O-D-p-s.json b/tests/fixtures/fedora32/ping6-hostname-O-D-p-s.json new file mode 100644 index 00000000..8fb6c980 --- /dev/null +++ b/tests/fixtures/fedora32/ping6-hostname-O-D-p-s.json @@ -0,0 +1 @@ +{"destination_ip": "2a04:4e42:200::323", "data_bytes": 1400, "pattern": "0xabcd", "destination": "www.cnn.com", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19042.0, "round_trip_ms_min": 30.757, "round_trip_ms_avg": 37.536, "round_trip_ms_max": 59.021, "round_trip_ms_stddev": 5.967, "responses": [{"type": "reply", "timestamp": 1595191433.391154, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 1, "ttl": 59, "time_ms": 34.6, "duplicate": false}, {"type": "reply", "timestamp": 1595191434.063086, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 2, "ttl": 59, "time_ms": 37.2, "duplicate": false}, {"type": "reply", "timestamp": 1595191435.071905, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 3, "ttl": 59, "time_ms": 44.3, "duplicate": false}, {"type": "reply", "timestamp": 1595191436.067128, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 4, "ttl": 59, "time_ms": 37.3, "duplicate": false}, {"type": "reply", "timestamp": 1595191437.06455, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 5, "ttl": 59, "time_ms": 32.2, "duplicate": false}, {"type": "reply", "timestamp": 1595191438.06541, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 6, "ttl": 59, "time_ms": 30.8, "duplicate": false}, {"type": "reply", "timestamp": 1595191439.076718, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 7, "ttl": 59, "time_ms": 40.6, "duplicate": false}, {"type": "reply", "timestamp": 1595191440.076357, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 8, "ttl": 59, "time_ms": 38.2, "duplicate": false}, {"type": "reply", "timestamp": 1595191441.079078, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 9, "ttl": 59, "time_ms": 39.0, "duplicate": false}, {"type": "reply", "timestamp": 1595191442.077537, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 10, "ttl": 59, "time_ms": 34.3, "duplicate": false}, {"type": "reply", "timestamp": 1595191443.104345, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 11, "ttl": 59, "time_ms": 59.0, "duplicate": false}, {"type": "reply", "timestamp": 1595191444.083741, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 12, "ttl": 59, "time_ms": 36.8, "duplicate": false}, {"type": "reply", "timestamp": 1595191445.086748, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 13, "ttl": 59, "time_ms": 37.6, "duplicate": false}, {"type": "reply", "timestamp": 1595191446.088958, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 14, "ttl": 59, "time_ms": 37.3, "duplicate": false}, {"type": "reply", "timestamp": 1595191447.086122, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 15, "ttl": 59, "time_ms": 30.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191448.088312, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 16, "ttl": 59, "time_ms": 30.8, "duplicate": false}, {"type": "reply", "timestamp": 1595191449.098353, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 17, "ttl": 59, "time_ms": 38.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191450.09959, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 18, "ttl": 59, "time_ms": 38.1, "duplicate": false}, {"type": "reply", "timestamp": 1595191451.10105, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 19, "ttl": 59, "time_ms": 37.8, "duplicate": false}, {"type": "reply", "timestamp": 1595191452.100239, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 20, "ttl": 59, "time_ms": 35.0, "duplicate": false}]} diff --git a/tests/fixtures/fedora32/ping6-hostname-O-D-p-s.out b/tests/fixtures/fedora32/ping6-hostname-O-D-p-s.out new file mode 100644 index 00000000..1d905dc2 --- /dev/null +++ b/tests/fixtures/fedora32/ping6-hostname-O-D-p-s.out @@ -0,0 +1,26 @@ +PATTERN: 0xabcd +PING www.cnn.com(2a04:4e42:200::323 (2a04:4e42:200::323)) 1400 data bytes +[1595191433.391154] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=1 ttl=59 time=34.6 ms +[1595191434.063086] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=2 ttl=59 time=37.2 ms +[1595191435.071905] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=3 ttl=59 time=44.3 ms +[1595191436.067128] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=4 ttl=59 time=37.3 ms +[1595191437.064550] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=5 ttl=59 time=32.2 ms +[1595191438.065410] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=6 ttl=59 time=30.8 ms +[1595191439.076718] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=7 ttl=59 time=40.6 ms +[1595191440.076357] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=8 ttl=59 time=38.2 ms +[1595191441.079078] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=9 ttl=59 time=39.0 ms +[1595191442.077537] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=10 ttl=59 time=34.3 ms +[1595191443.104345] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=11 ttl=59 time=59.0 ms +[1595191444.083741] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=12 ttl=59 time=36.8 ms +[1595191445.086748] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=13 ttl=59 time=37.6 ms +[1595191446.088958] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=14 ttl=59 time=37.3 ms +[1595191447.086122] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=15 ttl=59 time=30.9 ms +[1595191448.088312] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=16 ttl=59 time=30.8 ms +[1595191449.098353] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=17 ttl=59 time=38.9 ms +[1595191450.099590] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=18 ttl=59 time=38.1 ms +[1595191451.101050] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=19 ttl=59 time=37.8 ms +[1595191452.100239] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=20 ttl=59 time=35.0 ms + +--- www.cnn.com ping statistics --- +20 packets transmitted, 20 received, 0% packet loss, time 19042ms +rtt min/avg/max/mdev = 30.757/37.536/59.021/5.967 ms diff --git a/tests/fixtures/fedora32/ping6-hostname-O-D-p.json b/tests/fixtures/fedora32/ping6-hostname-O-D-p.json new file mode 100644 index 00000000..6f00ccea --- /dev/null +++ b/tests/fixtures/fedora32/ping6-hostname-O-D-p.json @@ -0,0 +1 @@ +{"destination_ip": "2a04:4e42:2e::323", "data_bytes": 56, "pattern": "0xabcd", "destination": "www.cnn.com", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19043.0, "round_trip_ms_min": 38.533, "round_trip_ms_avg": 44.877, "round_trip_ms_max": 51.366, "round_trip_ms_stddev": 3.83, "responses": [{"type": "reply", "timestamp": 1595191452.2553, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 1, "ttl": 56, "time_ms": 39.1, "duplicate": false}, {"type": "reply", "timestamp": 1595191453.229184, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 2, "ttl": 56, "time_ms": 47.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191454.229065, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 3, "ttl": 56, "time_ms": 46.4, "duplicate": false}, {"type": "reply", "timestamp": 1595191455.230571, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 4, "ttl": 56, "time_ms": 45.1, "duplicate": false}, {"type": "reply", "timestamp": 1595191456.233811, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 5, "ttl": 56, "time_ms": 45.7, "duplicate": false}, {"type": "reply", "timestamp": 1595191457.228052, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 6, "ttl": 56, "time_ms": 38.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191458.228764, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 7, "ttl": 56, "time_ms": 39.0, "duplicate": false}, {"type": "reply", "timestamp": 1595191459.243633, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 8, "ttl": 56, "time_ms": 51.4, "duplicate": false}, {"type": "reply", "timestamp": 1595191460.243509, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 9, "ttl": 56, "time_ms": 49.1, "duplicate": false}, {"type": "reply", "timestamp": 1595191461.242713, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 10, "ttl": 56, "time_ms": 46.6, "duplicate": false}, {"type": "reply", "timestamp": 1595191462.246016, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 11, "ttl": 56, "time_ms": 47.1, "duplicate": false}, {"type": "reply", "timestamp": 1595191463.240552, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 12, "ttl": 56, "time_ms": 38.6, "duplicate": false}, {"type": "reply", "timestamp": 1595191464.248594, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 13, "ttl": 56, "time_ms": 44.3, "duplicate": false}, {"type": "reply", "timestamp": 1595191465.254128, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 14, "ttl": 56, "time_ms": 48.8, "duplicate": false}, {"type": "reply", "timestamp": 1595191466.253777, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 15, "ttl": 56, "time_ms": 45.2, "duplicate": false}, {"type": "reply", "timestamp": 1595191467.259039, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 16, "ttl": 56, "time_ms": 47.3, "duplicate": false}, {"type": "reply", "timestamp": 1595191468.252991, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 17, "ttl": 56, "time_ms": 38.5, "duplicate": false}, {"type": "reply", "timestamp": 1595191469.263167, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 18, "ttl": 56, "time_ms": 47.0, "duplicate": false}, {"type": "reply", "timestamp": 1595191470.264838, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 19, "ttl": 56, "time_ms": 46.3, "duplicate": false}, {"type": "reply", "timestamp": 1595191471.266951, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 20, "ttl": 56, "time_ms": 45.4, "duplicate": false}]} diff --git a/tests/fixtures/fedora32/ping6-hostname-O-D-p.out b/tests/fixtures/fedora32/ping6-hostname-O-D-p.out new file mode 100644 index 00000000..533e6f74 --- /dev/null +++ b/tests/fixtures/fedora32/ping6-hostname-O-D-p.out @@ -0,0 +1,26 @@ +PATTERN: 0xabcd +PING www.cnn.com(2a04:4e42:2e::323 (2a04:4e42:2e::323)) 56 data bytes +[1595191452.255300] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=1 ttl=56 time=39.1 ms +[1595191453.229184] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=2 ttl=56 time=47.9 ms +[1595191454.229065] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=3 ttl=56 time=46.4 ms +[1595191455.230571] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=4 ttl=56 time=45.1 ms +[1595191456.233811] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=5 ttl=56 time=45.7 ms +[1595191457.228052] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=6 ttl=56 time=38.9 ms +[1595191458.228764] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=7 ttl=56 time=39.0 ms +[1595191459.243633] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=8 ttl=56 time=51.4 ms +[1595191460.243509] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=9 ttl=56 time=49.1 ms +[1595191461.242713] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=10 ttl=56 time=46.6 ms +[1595191462.246016] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=11 ttl=56 time=47.1 ms +[1595191463.240552] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=12 ttl=56 time=38.6 ms +[1595191464.248594] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=13 ttl=56 time=44.3 ms +[1595191465.254128] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=14 ttl=56 time=48.8 ms +[1595191466.253777] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=15 ttl=56 time=45.2 ms +[1595191467.259039] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=16 ttl=56 time=47.3 ms +[1595191468.252991] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=17 ttl=56 time=38.5 ms +[1595191469.263167] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=18 ttl=56 time=47.0 ms +[1595191470.264838] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=19 ttl=56 time=46.3 ms +[1595191471.266951] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=20 ttl=56 time=45.4 ms + +--- www.cnn.com ping statistics --- +20 packets transmitted, 20 received, 0% packet loss, time 19043ms +rtt min/avg/max/mdev = 38.533/44.877/51.366/3.830 ms diff --git a/tests/fixtures/fedora32/ping6-hostname-O-p.json b/tests/fixtures/fedora32/ping6-hostname-O-p.json new file mode 100644 index 00000000..f379c7a3 --- /dev/null +++ b/tests/fixtures/fedora32/ping6-hostname-O-p.json @@ -0,0 +1 @@ +{"destination_ip": "2a04:4e42:400::323", "data_bytes": 56, "pattern": "0xabcd", "destination": "www.cnn.com", "packets_transmitted": 20, "packets_received": 19, "packet_loss_percent": 5.0, "duplicates": 0, "time_ms": 19049.0, "round_trip_ms_min": 23.598, "round_trip_ms_avg": 65.877, "round_trip_ms_max": 281.064, "round_trip_ms_stddev": 72.64, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 1, "ttl": 59, "time_ms": 24.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 2, "ttl": 59, "time_ms": 30.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 3, "ttl": 59, "time_ms": 23.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 4, "ttl": 59, "time_ms": 35.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 5, "ttl": 59, "time_ms": 32.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 6, "ttl": 59, "time_ms": 32.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 7, "ttl": 59, "time_ms": 26.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 8, "ttl": 59, "time_ms": 31.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 9, "ttl": 59, "time_ms": 33.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 10, "ttl": 59, "time_ms": 32.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 11, "ttl": 59, "time_ms": 31.0, "duplicate": false}, {"type": "timeout", "timestamp": null, "icmp_seq": 12}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 13, "ttl": 59, "time_ms": 31.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 14, "ttl": 59, "time_ms": 112.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 15, "ttl": 59, "time_ms": 162.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 16, "ttl": 59, "time_ms": 223.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 17, "ttl": 59, "time_ms": 281.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 18, "ttl": 59, "time_ms": 33.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 19, "ttl": 59, "time_ms": 32.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 20, "ttl": 59, "time_ms": 42.3, "duplicate": false}]} diff --git a/tests/fixtures/fedora32/ping6-hostname-O-p.out b/tests/fixtures/fedora32/ping6-hostname-O-p.out new file mode 100644 index 00000000..7790a546 --- /dev/null +++ b/tests/fixtures/fedora32/ping6-hostname-O-p.out @@ -0,0 +1,26 @@ +PATTERN: 0xabcd +PING www.cnn.com(2a04:4e42:400::323 (2a04:4e42:400::323)) 56 data bytes +64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=1 ttl=59 time=24.0 ms +64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=2 ttl=59 time=30.5 ms +64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=3 ttl=59 time=23.6 ms +64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=4 ttl=59 time=35.8 ms +64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=5 ttl=59 time=32.3 ms +64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=6 ttl=59 time=32.4 ms +64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=7 ttl=59 time=26.5 ms +64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=8 ttl=59 time=31.1 ms +64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=9 ttl=59 time=33.9 ms +64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=10 ttl=59 time=32.5 ms +64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=11 ttl=59 time=31.0 ms +no answer yet for icmp_seq=12 +64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=13 ttl=59 time=31.9 ms +64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=14 ttl=59 time=112 ms +64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=15 ttl=59 time=162 ms +64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=16 ttl=59 time=223 ms +64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=17 ttl=59 time=281 ms +64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=18 ttl=59 time=33.4 ms +64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=19 ttl=59 time=32.7 ms +64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=20 ttl=59 time=42.3 ms + +--- www.cnn.com ping statistics --- +20 packets transmitted, 19 received, 5% packet loss, time 19049ms +rtt min/avg/max/mdev = 23.598/65.877/281.064/72.640 ms diff --git a/tests/fixtures/fedora32/ping6-ip-O-D-p.json b/tests/fixtures/fedora32/ping6-ip-O-D-p.json new file mode 100644 index 00000000..afe1c1a4 --- /dev/null +++ b/tests/fixtures/fedora32/ping6-ip-O-D-p.json @@ -0,0 +1 @@ +{"destination_ip": "2a04:4e42:600::323", "data_bytes": 56, "pattern": "0xabcd", "destination": "2a04:4e42:600::323", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19042.0, "round_trip_ms_min": 27.88, "round_trip_ms_avg": 45.072, "round_trip_ms_max": 148.38, "round_trip_ms_stddev": 27.078, "responses": [{"type": "reply", "timestamp": 1595191413.333769, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 1, "ttl": 59, "time_ms": 34.6, "duplicate": false}, {"type": "reply", "timestamp": 1595191414.342973, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 2, "ttl": 59, "time_ms": 41.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191415.332214, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 3, "ttl": 59, "time_ms": 28.8, "duplicate": false}, {"type": "reply", "timestamp": 1595191416.342603, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 4, "ttl": 59, "time_ms": 36.8, "duplicate": false}, {"type": "reply", "timestamp": 1595191417.344996, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 5, "ttl": 59, "time_ms": 37.6, "duplicate": false}, {"type": "reply", "timestamp": 1595191418.348619, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 6, "ttl": 59, "time_ms": 37.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191419.357154, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 7, "ttl": 59, "time_ms": 44.4, "duplicate": false}, {"type": "reply", "timestamp": 1595191420.350087, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 8, "ttl": 59, "time_ms": 35.1, "duplicate": false}, {"type": "reply", "timestamp": 1595191421.346691, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 9, "ttl": 59, "time_ms": 29.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191422.355843, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 10, "ttl": 59, "time_ms": 37.4, "duplicate": false}, {"type": "reply", "timestamp": 1595191423.397934, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 11, "ttl": 59, "time_ms": 76.7, "duplicate": false}, {"type": "reply", "timestamp": 1595191424.470798, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 12, "ttl": 59, "time_ms": 148.0, "duplicate": false}, {"type": "reply", "timestamp": 1595191425.358652, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 13, "ttl": 59, "time_ms": 33.6, "duplicate": false}, {"type": "reply", "timestamp": 1595191426.404587, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 14, "ttl": 59, "time_ms": 77.2, "duplicate": false}, {"type": "reply", "timestamp": 1595191427.359785, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 15, "ttl": 59, "time_ms": 29.7, "duplicate": false}, {"type": "reply", "timestamp": 1595191428.367539, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 16, "ttl": 59, "time_ms": 34.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191429.372551, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 17, "ttl": 59, "time_ms": 37.2, "duplicate": false}, {"type": "reply", "timestamp": 1595191430.364571, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 18, "ttl": 59, "time_ms": 27.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191431.375232, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 19, "ttl": 59, "time_ms": 37.1, "duplicate": false}, {"type": "reply", "timestamp": 1595191432.375802, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 20, "ttl": 59, "time_ms": 34.3, "duplicate": false}]} diff --git a/tests/fixtures/fedora32/ping6-ip-O-D-p.out b/tests/fixtures/fedora32/ping6-ip-O-D-p.out new file mode 100644 index 00000000..df7978d1 --- /dev/null +++ b/tests/fixtures/fedora32/ping6-ip-O-D-p.out @@ -0,0 +1,26 @@ +PATTERN: 0xabcd +PING 2a04:4e42:600::323(2a04:4e42:600::323) 56 data bytes +[1595191413.333769] 64 bytes from 2a04:4e42:600::323: icmp_seq=1 ttl=59 time=34.6 ms +[1595191414.342973] 64 bytes from 2a04:4e42:600::323: icmp_seq=2 ttl=59 time=41.9 ms +[1595191415.332214] 64 bytes from 2a04:4e42:600::323: icmp_seq=3 ttl=59 time=28.8 ms +[1595191416.342603] 64 bytes from 2a04:4e42:600::323: icmp_seq=4 ttl=59 time=36.8 ms +[1595191417.344996] 64 bytes from 2a04:4e42:600::323: icmp_seq=5 ttl=59 time=37.6 ms +[1595191418.348619] 64 bytes from 2a04:4e42:600::323: icmp_seq=6 ttl=59 time=37.9 ms +[1595191419.357154] 64 bytes from 2a04:4e42:600::323: icmp_seq=7 ttl=59 time=44.4 ms +[1595191420.350087] 64 bytes from 2a04:4e42:600::323: icmp_seq=8 ttl=59 time=35.1 ms +[1595191421.346691] 64 bytes from 2a04:4e42:600::323: icmp_seq=9 ttl=59 time=29.9 ms +[1595191422.355843] 64 bytes from 2a04:4e42:600::323: icmp_seq=10 ttl=59 time=37.4 ms +[1595191423.397934] 64 bytes from 2a04:4e42:600::323: icmp_seq=11 ttl=59 time=76.7 ms +[1595191424.470798] 64 bytes from 2a04:4e42:600::323: icmp_seq=12 ttl=59 time=148 ms +[1595191425.358652] 64 bytes from 2a04:4e42:600::323: icmp_seq=13 ttl=59 time=33.6 ms +[1595191426.404587] 64 bytes from 2a04:4e42:600::323: icmp_seq=14 ttl=59 time=77.2 ms +[1595191427.359785] 64 bytes from 2a04:4e42:600::323: icmp_seq=15 ttl=59 time=29.7 ms +[1595191428.367539] 64 bytes from 2a04:4e42:600::323: icmp_seq=16 ttl=59 time=34.9 ms +[1595191429.372551] 64 bytes from 2a04:4e42:600::323: icmp_seq=17 ttl=59 time=37.2 ms +[1595191430.364571] 64 bytes from 2a04:4e42:600::323: icmp_seq=18 ttl=59 time=27.9 ms +[1595191431.375232] 64 bytes from 2a04:4e42:600::323: icmp_seq=19 ttl=59 time=37.1 ms +[1595191432.375802] 64 bytes from 2a04:4e42:600::323: icmp_seq=20 ttl=59 time=34.3 ms + +--- 2a04:4e42:600::323 ping statistics --- +20 packets transmitted, 20 received, 0% packet loss, time 19042ms +rtt min/avg/max/mdev = 27.880/45.072/148.380/27.078 ms diff --git a/tests/fixtures/fedora32/ping6-ip-O-p.json b/tests/fixtures/fedora32/ping6-ip-O-p.json new file mode 100644 index 00000000..80ad4766 --- /dev/null +++ b/tests/fixtures/fedora32/ping6-ip-O-p.json @@ -0,0 +1 @@ +{"destination_ip": "2a04:4e42:600::323", "data_bytes": 56, "pattern": "0xabcd", "destination": "2a04:4e42:600::323", "packets_transmitted": 20, "packets_received": 17, "packet_loss_percent": 15.0, "duplicates": 0, "time_ms": 19193.0, "round_trip_ms_min": 26.566, "round_trip_ms_avg": 33.623, "round_trip_ms_max": 43.945, "round_trip_ms_stddev": 5.029, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 1, "ttl": 59, "time_ms": 34.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 2, "ttl": 59, "time_ms": 36.6, "duplicate": false}, {"type": "timeout", "timestamp": null, "icmp_seq": 3}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 4, "ttl": 59, "time_ms": 28.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 5, "ttl": 59, "time_ms": 36.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 6, "ttl": 59, "time_ms": 28.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 7, "ttl": 59, "time_ms": 39.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 8, "ttl": 59, "time_ms": 28.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 9, "ttl": 59, "time_ms": 28.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 10, "ttl": 59, "time_ms": 36.5, "duplicate": false}, {"type": "timeout", "timestamp": null, "icmp_seq": 11}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 12, "ttl": 59, "time_ms": 33.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 13, "ttl": 59, "time_ms": 28.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 14, "ttl": 59, "time_ms": 27.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 15, "ttl": 59, "time_ms": 36.0, "duplicate": false}, {"type": "timeout", "timestamp": null, "icmp_seq": 16}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 17, "ttl": 59, "time_ms": 26.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 18, "ttl": 59, "time_ms": 38.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 19, "ttl": 59, "time_ms": 43.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 20, "ttl": 59, "time_ms": 37.9, "duplicate": false}]} diff --git a/tests/fixtures/fedora32/ping6-ip-O-p.out b/tests/fixtures/fedora32/ping6-ip-O-p.out new file mode 100644 index 00000000..3cdd632d --- /dev/null +++ b/tests/fixtures/fedora32/ping6-ip-O-p.out @@ -0,0 +1,26 @@ +PATTERN: 0xabcd +PING 2a04:4e42:600::323(2a04:4e42:600::323) 56 data bytes +64 bytes from 2a04:4e42:600::323: icmp_seq=1 ttl=59 time=34.9 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=2 ttl=59 time=36.6 ms +no answer yet for icmp_seq=3 +64 bytes from 2a04:4e42:600::323: icmp_seq=4 ttl=59 time=28.9 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=5 ttl=59 time=36.8 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=6 ttl=59 time=28.9 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=7 ttl=59 time=39.5 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=8 ttl=59 time=28.2 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=9 ttl=59 time=28.9 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=10 ttl=59 time=36.5 ms +no answer yet for icmp_seq=11 +64 bytes from 2a04:4e42:600::323: icmp_seq=12 ttl=59 time=33.9 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=13 ttl=59 time=28.1 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=14 ttl=59 time=27.6 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=15 ttl=59 time=36.0 ms +no answer yet for icmp_seq=16 +64 bytes from 2a04:4e42:600::323: icmp_seq=17 ttl=59 time=26.6 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=18 ttl=59 time=38.5 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=19 ttl=59 time=43.9 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=20 ttl=59 time=37.9 ms + +--- 2a04:4e42:600::323 ping statistics --- +20 packets transmitted, 17 received, 15% packet loss, time 19193ms +rtt min/avg/max/mdev = 26.566/33.623/43.945/5.029 ms diff --git a/tests/fixtures/freebsd12/ping-hostname-p.json b/tests/fixtures/freebsd12/ping-hostname-p.json new file mode 100644 index 00000000..613a5662 --- /dev/null +++ b/tests/fixtures/freebsd12/ping-hostname-p.json @@ -0,0 +1 @@ +{"destination_ip": "151.101.1.67", "data_bytes": 56, "pattern": "0xff", "destination": "cnn.com", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 28.389, "round_trip_ms_avg": 31.745, "round_trip_ms_max": 34.505, "round_trip_ms_stddev": 2.532, "responses": [{"type": "reply", "bytes": 64, "response_ip": "151.101.1.67", "icmp_seq": 0, "ttl": 59, "time_ms": 32.34, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "151.101.1.67", "icmp_seq": 1, "ttl": 59, "time_ms": 34.505, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "151.101.1.67", "icmp_seq": 2, "ttl": 59, "time_ms": 28.389, "duplicate": false}]} diff --git a/tests/fixtures/freebsd12/ping-hostname-p.out b/tests/fixtures/freebsd12/ping-hostname-p.out new file mode 100644 index 00000000..a6d2e5ff --- /dev/null +++ b/tests/fixtures/freebsd12/ping-hostname-p.out @@ -0,0 +1,9 @@ +PATTERN: 0xff +PING cnn.com (151.101.1.67): 56 data bytes +64 bytes from 151.101.1.67: icmp_seq=0 ttl=59 time=32.340 ms +64 bytes from 151.101.1.67: icmp_seq=1 ttl=59 time=34.505 ms +64 bytes from 151.101.1.67: icmp_seq=2 ttl=59 time=28.389 ms + +--- cnn.com ping statistics --- +3 packets transmitted, 3 packets received, 0.0% packet loss +round-trip min/avg/max/stddev = 28.389/31.745/34.505/2.532 ms diff --git a/tests/fixtures/freebsd12/ping-hostname-s.json b/tests/fixtures/freebsd12/ping-hostname-s.json new file mode 100644 index 00000000..d1d4c792 --- /dev/null +++ b/tests/fixtures/freebsd12/ping-hostname-s.json @@ -0,0 +1 @@ +{"destination_ip": "127.0.0.1", "data_bytes": 40, "pattern": null, "destination": "localhost", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.022, "round_trip_ms_avg": 0.03, "round_trip_ms_max": 0.038, "round_trip_ms_stddev": 0.006, "responses": [{"type": "reply", "bytes": 48, "response_ip": "127.0.0.1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.022, "duplicate": false}, {"type": "reply", "bytes": 48, "response_ip": "127.0.0.1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.038, "duplicate": false}, {"type": "reply", "bytes": 48, "response_ip": "127.0.0.1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.03, "duplicate": false}]} diff --git a/tests/fixtures/freebsd12/ping-hostname-s.out b/tests/fixtures/freebsd12/ping-hostname-s.out new file mode 100644 index 00000000..deadd8a2 --- /dev/null +++ b/tests/fixtures/freebsd12/ping-hostname-s.out @@ -0,0 +1,8 @@ +PING localhost (127.0.0.1): 40 data bytes +48 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.022 ms +48 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.038 ms +48 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.030 ms + +--- localhost ping statistics --- +3 packets transmitted, 3 packets received, 0.0% packet loss +round-trip min/avg/max/stddev = 0.022/0.030/0.038/0.006 ms diff --git a/tests/fixtures/freebsd12/ping-hostname.json b/tests/fixtures/freebsd12/ping-hostname.json new file mode 100644 index 00000000..4aa3e97d --- /dev/null +++ b/tests/fixtures/freebsd12/ping-hostname.json @@ -0,0 +1 @@ +{"destination_ip": "151.101.65.67", "data_bytes": 56, "pattern": null, "destination": "cnn.com", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 27.01, "round_trip_ms_avg": 33.831, "round_trip_ms_max": 42.506, "round_trip_ms_stddev": 6.461, "responses": [{"type": "reply", "bytes": 64, "response_ip": "151.101.65.67", "icmp_seq": 0, "ttl": 59, "time_ms": 27.01, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "151.101.65.67", "icmp_seq": 1, "ttl": 59, "time_ms": 31.978, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "151.101.65.67", "icmp_seq": 2, "ttl": 59, "time_ms": 42.506, "duplicate": false}]} diff --git a/tests/fixtures/freebsd12/ping-hostname.out b/tests/fixtures/freebsd12/ping-hostname.out new file mode 100644 index 00000000..5f7fdfd3 --- /dev/null +++ b/tests/fixtures/freebsd12/ping-hostname.out @@ -0,0 +1,8 @@ +PING cnn.com (151.101.65.67): 56 data bytes +64 bytes from 151.101.65.67: icmp_seq=0 ttl=59 time=27.010 ms +64 bytes from 151.101.65.67: icmp_seq=1 ttl=59 time=31.978 ms +64 bytes from 151.101.65.67: icmp_seq=2 ttl=59 time=42.506 ms + +--- cnn.com ping statistics --- +3 packets transmitted, 3 packets received, 0.0% packet loss +round-trip min/avg/max/stddev = 27.010/33.831/42.506/6.461 ms diff --git a/tests/fixtures/freebsd12/ping-ip-p.json b/tests/fixtures/freebsd12/ping-ip-p.json new file mode 100644 index 00000000..61aac4c1 --- /dev/null +++ b/tests/fixtures/freebsd12/ping-ip-p.json @@ -0,0 +1 @@ +{"destination_ip": "127.0.0.1", "data_bytes": 56, "pattern": "0xff", "destination": "127.0.0.1", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.034, "round_trip_ms_avg": 0.037, "round_trip_ms_max": 0.042, "round_trip_ms_stddev": 0.003, "responses": [{"type": "reply", "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.036, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.042, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.034, "duplicate": false}]} diff --git a/tests/fixtures/freebsd12/ping-ip-p.out b/tests/fixtures/freebsd12/ping-ip-p.out new file mode 100644 index 00000000..bae3b83f --- /dev/null +++ b/tests/fixtures/freebsd12/ping-ip-p.out @@ -0,0 +1,9 @@ +PATTERN: 0xff +PING 127.0.0.1 (127.0.0.1): 56 data bytes +64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.036 ms +64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.042 ms +64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.034 ms + +--- 127.0.0.1 ping statistics --- +3 packets transmitted, 3 packets received, 0.0% packet loss +round-trip min/avg/max/stddev = 0.034/0.037/0.042/0.003 ms diff --git a/tests/fixtures/freebsd12/ping-ip-s.json b/tests/fixtures/freebsd12/ping-ip-s.json new file mode 100644 index 00000000..4c35a188 --- /dev/null +++ b/tests/fixtures/freebsd12/ping-ip-s.json @@ -0,0 +1 @@ +{"destination_ip": "127.0.0.1", "data_bytes": 40, "pattern": null, "destination": "127.0.0.1", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.024, "round_trip_ms_avg": 0.032, "round_trip_ms_max": 0.036, "round_trip_ms_stddev": 0.006, "responses": [{"type": "reply", "bytes": 48, "response_ip": "127.0.0.1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.024, "duplicate": false}, {"type": "reply", "bytes": 48, "response_ip": "127.0.0.1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.036, "duplicate": false}, {"type": "reply", "bytes": 48, "response_ip": "127.0.0.1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.036, "duplicate": false}]} diff --git a/tests/fixtures/freebsd12/ping-ip-s.out b/tests/fixtures/freebsd12/ping-ip-s.out new file mode 100644 index 00000000..e0cbf2be --- /dev/null +++ b/tests/fixtures/freebsd12/ping-ip-s.out @@ -0,0 +1,8 @@ +PING 127.0.0.1 (127.0.0.1): 40 data bytes +48 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.024 ms +48 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.036 ms +48 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.036 ms + +--- 127.0.0.1 ping statistics --- +3 packets transmitted, 3 packets received, 0.0% packet loss +round-trip min/avg/max/stddev = 0.024/0.032/0.036/0.006 ms diff --git a/tests/fixtures/freebsd12/ping-ip.json b/tests/fixtures/freebsd12/ping-ip.json new file mode 100644 index 00000000..2e07de82 --- /dev/null +++ b/tests/fixtures/freebsd12/ping-ip.json @@ -0,0 +1 @@ +{"destination_ip": "127.0.0.1", "data_bytes": 56, "pattern": null, "destination": "127.0.0.1", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.022, "round_trip_ms_avg": 0.033, "round_trip_ms_max": 0.041, "round_trip_ms_stddev": 0.008, "responses": [{"type": "reply", "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.022, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.036, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.041, "duplicate": false}]} diff --git a/tests/fixtures/freebsd12/ping-ip.out b/tests/fixtures/freebsd12/ping-ip.out new file mode 100644 index 00000000..6774afa5 --- /dev/null +++ b/tests/fixtures/freebsd12/ping-ip.out @@ -0,0 +1,8 @@ +PING 127.0.0.1 (127.0.0.1): 56 data bytes +64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.022 ms +64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.036 ms +64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.041 ms + +--- 127.0.0.1 ping statistics --- +3 packets transmitted, 3 packets received, 0.0% packet loss +round-trip min/avg/max/stddev = 0.022/0.033/0.041/0.008 ms diff --git a/tests/fixtures/freebsd12/ping6-hostname-p.json b/tests/fixtures/freebsd12/ping6-hostname-p.json new file mode 100644 index 00000000..dd805cb1 --- /dev/null +++ b/tests/fixtures/freebsd12/ping6-hostname-p.json @@ -0,0 +1 @@ +{"source_ip": "::1", "destination_ip": "::1", "data_bytes": 56, "pattern": "0xff", "destination": "localhost", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.036, "round_trip_ms_avg": 0.045, "round_trip_ms_max": 0.051, "round_trip_ms_stddev": 0.007, "responses": [{"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.036, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.051, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.048, "duplicate": false}]} diff --git a/tests/fixtures/freebsd12/ping6-hostname-p.out b/tests/fixtures/freebsd12/ping6-hostname-p.out new file mode 100644 index 00000000..4585c8e1 --- /dev/null +++ b/tests/fixtures/freebsd12/ping6-hostname-p.out @@ -0,0 +1,9 @@ +PATTERN: 0xff +PING6(56=40+8+8 bytes) ::1 --> ::1 +16 bytes from ::1, icmp_seq=0 hlim=64 time=0.036 ms +16 bytes from ::1, icmp_seq=1 hlim=64 time=0.051 ms +16 bytes from ::1, icmp_seq=2 hlim=64 time=0.048 ms + +--- localhost ping6 statistics --- +3 packets transmitted, 3 packets received, 0.0% packet loss +round-trip min/avg/max/std-dev = 0.036/0.045/0.051/0.007 ms diff --git a/tests/fixtures/freebsd12/ping6-hostname-s.json b/tests/fixtures/freebsd12/ping6-hostname-s.json new file mode 100644 index 00000000..f801ab89 --- /dev/null +++ b/tests/fixtures/freebsd12/ping6-hostname-s.json @@ -0,0 +1 @@ +{"source_ip": "::1", "destination_ip": "::1", "data_bytes": 88, "pattern": null, "destination": "localhost", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.035, "round_trip_ms_avg": 0.056, "round_trip_ms_max": 0.082, "round_trip_ms_stddev": 0.019, "responses": [{"type": "reply", "bytes": 48, "response_ip": "::1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.035, "duplicate": false}, {"type": "reply", "bytes": 48, "response_ip": "::1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.082, "duplicate": false}, {"type": "reply", "bytes": 48, "response_ip": "::1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.051, "duplicate": false}]} diff --git a/tests/fixtures/freebsd12/ping6-hostname-s.out b/tests/fixtures/freebsd12/ping6-hostname-s.out new file mode 100644 index 00000000..a0b979d7 --- /dev/null +++ b/tests/fixtures/freebsd12/ping6-hostname-s.out @@ -0,0 +1,8 @@ +PING6(88=40+8+40 bytes) ::1 --> ::1 +48 bytes from ::1, icmp_seq=0 hlim=64 time=0.035 ms +48 bytes from ::1, icmp_seq=1 hlim=64 time=0.082 ms +48 bytes from ::1, icmp_seq=2 hlim=64 time=0.051 ms + +--- localhost ping6 statistics --- +3 packets transmitted, 3 packets received, 0.0% packet loss +round-trip min/avg/max/std-dev = 0.035/0.056/0.082/0.019 ms diff --git a/tests/fixtures/freebsd12/ping6-hostname.json b/tests/fixtures/freebsd12/ping6-hostname.json new file mode 100644 index 00000000..3d23bc01 --- /dev/null +++ b/tests/fixtures/freebsd12/ping6-hostname.json @@ -0,0 +1 @@ +{"source_ip": "::1", "destination_ip": "::1", "data_bytes": 56, "pattern": null, "destination": "localhost", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.036, "round_trip_ms_avg": 0.042, "round_trip_ms_max": 0.048, "round_trip_ms_stddev": 0.005, "responses": [{"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.036, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.041, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.048, "duplicate": false}]} diff --git a/tests/fixtures/freebsd12/ping6-hostname.out b/tests/fixtures/freebsd12/ping6-hostname.out new file mode 100644 index 00000000..083270f3 --- /dev/null +++ b/tests/fixtures/freebsd12/ping6-hostname.out @@ -0,0 +1,8 @@ +PING6(56=40+8+8 bytes) ::1 --> ::1 +16 bytes from ::1, icmp_seq=0 hlim=64 time=0.036 ms +16 bytes from ::1, icmp_seq=1 hlim=64 time=0.041 ms +16 bytes from ::1, icmp_seq=2 hlim=64 time=0.048 ms + +--- localhost ping6 statistics --- +3 packets transmitted, 3 packets received, 0.0% packet loss +round-trip min/avg/max/std-dev = 0.036/0.042/0.048/0.005 ms diff --git a/tests/fixtures/freebsd12/ping6-ip-p.json b/tests/fixtures/freebsd12/ping6-ip-p.json new file mode 100644 index 00000000..e5c28f12 --- /dev/null +++ b/tests/fixtures/freebsd12/ping6-ip-p.json @@ -0,0 +1 @@ +{"source_ip": "::1", "destination_ip": "::1", "data_bytes": 56, "pattern": "0xff", "destination": "::1", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.036, "round_trip_ms_avg": 0.045, "round_trip_ms_max": 0.054, "round_trip_ms_stddev": 0.007, "responses": [{"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.036, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.054, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.045, "duplicate": false}]} diff --git a/tests/fixtures/freebsd12/ping6-ip-p.out b/tests/fixtures/freebsd12/ping6-ip-p.out new file mode 100644 index 00000000..1eedeb51 --- /dev/null +++ b/tests/fixtures/freebsd12/ping6-ip-p.out @@ -0,0 +1,9 @@ +PATTERN: 0xff +PING6(56=40+8+8 bytes) ::1 --> ::1 +16 bytes from ::1, icmp_seq=0 hlim=64 time=0.036 ms +16 bytes from ::1, icmp_seq=1 hlim=64 time=0.054 ms +16 bytes from ::1, icmp_seq=2 hlim=64 time=0.045 ms + +--- ::1 ping6 statistics --- +3 packets transmitted, 3 packets received, 0.0% packet loss +round-trip min/avg/max/std-dev = 0.036/0.045/0.054/0.007 ms diff --git a/tests/fixtures/freebsd12/ping6-ip-s.json b/tests/fixtures/freebsd12/ping6-ip-s.json new file mode 100644 index 00000000..622f5e06 --- /dev/null +++ b/tests/fixtures/freebsd12/ping6-ip-s.json @@ -0,0 +1 @@ +{"source_ip": "::1", "destination_ip": "::1", "data_bytes": 88, "pattern": null, "destination": "::1", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.036, "round_trip_ms_avg": 0.058, "round_trip_ms_max": 0.088, "round_trip_ms_stddev": 0.022, "responses": [{"type": "reply", "bytes": 48, "response_ip": "::1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.036, "duplicate": false}, {"type": "reply", "bytes": 48, "response_ip": "::1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.088, "duplicate": false}, {"type": "reply", "bytes": 48, "response_ip": "::1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.049, "duplicate": false}]} diff --git a/tests/fixtures/freebsd12/ping6-ip-s.out b/tests/fixtures/freebsd12/ping6-ip-s.out new file mode 100644 index 00000000..45a9bc2b --- /dev/null +++ b/tests/fixtures/freebsd12/ping6-ip-s.out @@ -0,0 +1,8 @@ +PING6(88=40+8+40 bytes) ::1 --> ::1 +48 bytes from ::1, icmp_seq=0 hlim=64 time=0.036 ms +48 bytes from ::1, icmp_seq=1 hlim=64 time=0.088 ms +48 bytes from ::1, icmp_seq=2 hlim=64 time=0.049 ms + +--- ::1 ping6 statistics --- +3 packets transmitted, 3 packets received, 0.0% packet loss +round-trip min/avg/max/std-dev = 0.036/0.058/0.088/0.022 ms diff --git a/tests/fixtures/freebsd12/ping6-ip.json b/tests/fixtures/freebsd12/ping6-ip.json new file mode 100644 index 00000000..29917e2d --- /dev/null +++ b/tests/fixtures/freebsd12/ping6-ip.json @@ -0,0 +1 @@ +{"source_ip": "::1", "destination_ip": "::1", "data_bytes": 56, "pattern": null, "destination": "::1", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.034, "round_trip_ms_avg": 0.044, "round_trip_ms_max": 0.053, "round_trip_ms_stddev": 0.008, "responses": [{"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.034, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.053, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.045, "duplicate": false}]} diff --git a/tests/fixtures/freebsd12/ping6-ip.out b/tests/fixtures/freebsd12/ping6-ip.out new file mode 100644 index 00000000..3649379d --- /dev/null +++ b/tests/fixtures/freebsd12/ping6-ip.out @@ -0,0 +1,8 @@ +PING6(56=40+8+8 bytes) ::1 --> ::1 +16 bytes from ::1, icmp_seq=0 hlim=64 time=0.034 ms +16 bytes from ::1, icmp_seq=1 hlim=64 time=0.053 ms +16 bytes from ::1, icmp_seq=2 hlim=64 time=0.045 ms + +--- ::1 ping6 statistics --- +3 packets transmitted, 3 packets received, 0.0% packet loss +round-trip min/avg/max/std-dev = 0.034/0.044/0.053/0.008 ms diff --git a/tests/fixtures/freebsd12/traceroute.json b/tests/fixtures/freebsd12/traceroute.json new file mode 100644 index 00000000..f776d28d --- /dev/null +++ b/tests/fixtures/freebsd12/traceroute.json @@ -0,0 +1 @@ +{"destination_ip": "8.8.8.8", "destination_name": "8.8.8.8", "hops": [{"hop": 1, "probes": [{"annotation": null, "asn": null, "ip": "192.168.1.254", "name": "dsldevice.attlocal.net", "rtt": 3.263}, {"annotation": null, "asn": null, "ip": "192.168.1.254", "name": "dsldevice.attlocal.net", "rtt": 4.146}, {"annotation": null, "asn": null, "ip": "192.168.1.254", "name": "dsldevice.attlocal.net", "rtt": 4.273}]}, {"hop": 2, "probes": [{"annotation": null, "asn": null, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 20.839}, {"annotation": null, "asn": null, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 23.434}, {"annotation": null, "asn": null, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 22.032}]}, {"hop": 3, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 4, "probes": [{"annotation": null, "asn": null, "ip": "12.122.149.186", "name": "12.122.149.186", "rtt": 33.17}, {"annotation": null, "asn": null, "ip": "12.122.149.186", "name": "12.122.149.186", "rtt": 26.593}, {"annotation": null, "asn": null, "ip": "12.122.149.186", "name": "12.122.149.186", "rtt": 32.851}]}, {"hop": 5, "probes": [{"annotation": null, "asn": null, "ip": "12.122.3.70", "name": "sffca22crs.ip.att.net", "rtt": 26.045}, {"annotation": null, "asn": null, "ip": "12.122.3.70", "name": "sffca22crs.ip.att.net", "rtt": 29.235}, {"annotation": null, "asn": null, "ip": "12.122.3.70", "name": "sffca22crs.ip.att.net", "rtt": 28.28}]}, {"hop": 6, "probes": [{"annotation": null, "asn": null, "ip": "12.122.163.61", "name": "12.122.163.61", "rtt": 25.3}, {"annotation": null, "asn": null, "ip": "12.122.163.61", "name": "12.122.163.61", "rtt": 24.156}, {"annotation": null, "asn": null, "ip": "12.122.163.61", "name": "12.122.163.61", "rtt": 24.849}]}, {"hop": 7, "probes": [{"annotation": null, "asn": null, "ip": "12.255.10.226", "name": "12.255.10.226", "rtt": 25.375}, {"annotation": null, "asn": null, "ip": "12.255.10.224", "name": "12.255.10.224", "rtt": 24.011}, {"annotation": null, "asn": null, "ip": "12.255.10.224", "name": "12.255.10.224", "rtt": 25.322}]}, {"hop": 8, "probes": [{"annotation": null, "asn": null, "ip": "108.170.243.1", "name": "108.170.243.1", "rtt": 29.376}]}, {"hop": 9, "probes": [{"annotation": null, "asn": null, "ip": "8.8.8.8", "name": "dns.google", "rtt": 23.228}, {"annotation": null, "asn": null, "ip": "209.85.252.251", "name": "209.85.252.251", "rtt": 24.548}, {"annotation": null, "asn": null, "ip": "108.170.237.23", "name": "108.170.237.23", "rtt": 24.332}]}]} diff --git a/tests/fixtures/freebsd12/traceroute.out b/tests/fixtures/freebsd12/traceroute.out new file mode 100644 index 00000000..725f7013 --- /dev/null +++ b/tests/fixtures/freebsd12/traceroute.out @@ -0,0 +1,14 @@ +traceroute to 8.8.8.8 (8.8.8.8), 64 hops max, 40 byte packets + 1 dsldevice.attlocal.net (192.168.1.254) 3.263 ms 4.146 ms 4.273 ms + 2 76-220-24-1.lightspeed.sntcca.sbcglobal.net (76.220.24.1) 20.839 ms 23.434 ms 22.032 ms + 3 * * * + 4 12.122.149.186 (12.122.149.186) 33.170 ms 26.593 ms 32.851 ms + 5 sffca22crs.ip.att.net (12.122.3.70) 26.045 ms 29.235 ms 28.280 ms + 6 12.122.163.61 (12.122.163.61) 25.300 ms 24.156 ms 24.849 ms + 7 12.255.10.226 (12.255.10.226) 25.375 ms + 12.255.10.224 (12.255.10.224) 24.011 ms 25.322 ms + 8 * 108.170.243.1 (108.170.243.1) 29.376 ms * + 9 dns.google (8.8.8.8) 23.228 ms + 209.85.252.251 (209.85.252.251) 24.548 ms + 108.170.237.23 (108.170.237.23) 24.332 ms + diff --git a/tests/fixtures/freebsd12/traceroute6.json b/tests/fixtures/freebsd12/traceroute6.json new file mode 100644 index 00000000..f8864ad2 --- /dev/null +++ b/tests/fixtures/freebsd12/traceroute6.json @@ -0,0 +1 @@ +{"destination_ip": "2a04:4e42::323", "destination_name": "turner-tls.map.fastly.net", "hops": [{"hop": 1, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 2, "probes": [{"annotation": null, "asn": null, "ip": "2001:506:6000:11b:71:156:212:143", "name": null, "rtt": 27.603}, {"annotation": null, "asn": null, "ip": "2001:506:6000:11b:71:156:212:143", "name": null, "rtt": 28.659}, {"annotation": null, "asn": null, "ip": "2001:506:6000:11b:71:156:212:143", "name": null, "rtt": 33.235}]}, {"hop": 3, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 4, "probes": [{"annotation": null, "asn": null, "ip": "2001:1890:ff:ff08:12:242:117:16", "name": null, "rtt": 36.731}, {"annotation": null, "asn": null, "ip": "2001:1890:ff:ff08:12:242:117:16", "name": null, "rtt": 28.875}, {"annotation": null, "asn": null, "ip": "2001:1890:ff:ff08:12:242:117:16", "name": null, "rtt": 28.959}]}, {"hop": 5, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 6, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 7, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 8, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 9, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 10, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 11, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 12, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 13, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 14, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 15, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 16, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 17, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 18, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 19, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 20, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 21, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 22, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 23, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 24, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 25, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 26, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 27, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 28, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 29, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 30, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 31, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}]} diff --git a/tests/fixtures/freebsd12/traceroute6.out b/tests/fixtures/freebsd12/traceroute6.out new file mode 100644 index 00000000..eb4709fa --- /dev/null +++ b/tests/fixtures/freebsd12/traceroute6.out @@ -0,0 +1,34 @@ +traceroute6: Warning: turner-tls.map.fastly.net has multiple addresses; using 2a04:4e42::323 +traceroute6 to turner-tls.map.fastly.net (2a04:4e42::323) from 2600:1700:bab0:d40:250:56ff:fe26:c5b4, 64 hops max, 20 byte packets + 1 * * * + 2 2001:506:6000:11b:71:156:212:143 27.603 ms 28.659 ms 33.235 ms + 3 * * * + 4 2001:1890:ff:ff08:12:242:117:16 36.731 ms 28.875 ms 28.959 ms + 5 * * * + 6 * * * + 7 * * * + 8 * * * + 9 * * * +10 * * * +11 * * * +12 * * * +13 * * * +14 * * * +15 * * * +16 * * * +17 * * * +18 * * * +19 * * * +20 * * * +21 * * * +22 * * * +23 * * * +24 * * * +25 * * * +26 * * * +27 * * * +28 * * * +29 * * * +30 * * * +31 * * * + diff --git a/tests/fixtures/generic/keyvalue-ifcfg.json b/tests/fixtures/generic/keyvalue-ifcfg.json new file mode 100644 index 00000000..3d399e7e --- /dev/null +++ b/tests/fixtures/generic/keyvalue-ifcfg.json @@ -0,0 +1 @@ +{"type": "Ethernet", "proxy_method": "none", "browser_only": "no", "bootproto": "dhcp", "defroute": "yes", "ipv4_failure_fatal": "no", "ipv6init": "yes", "ipv6_autoconf": "yes", "ipv6_defroute": "yes", "ipv6_failure_fatal": "no", "ipv6_addr_gen_mode": "stable-privacy", "name": "ens33", "uuid": "d92ece08-9e02-47d5-b2d2-92c80e155744", "device": "ens33", "onboot": "yes", "value_with_spaces": "this value includes spaces", "value_with_quotes_inside": "this value \"has quotation marks\" inside", "value_with_quotes_inside2": "\"this value\" has quotations at the beginning but not the end", "value_with_quotes_inside3": "this value has quotation marks \"at the end\""} diff --git a/tests/fixtures/generic/keyvalue-ifcfg.txt b/tests/fixtures/generic/keyvalue-ifcfg.txt new file mode 100644 index 00000000..8c3ae1e7 --- /dev/null +++ b/tests/fixtures/generic/keyvalue-ifcfg.txt @@ -0,0 +1,19 @@ +TYPE="Ethernet" +PROXY_METHOD="none" +BROWSER_ONLY="no" +BOOTPROTO="dhcp" +DEFROUTE="yes" +IPV4_FAILURE_FATAL="no" +IPV6INIT="yes" +IPV6_AUTOCONF="yes" +IPV6_DEFROUTE="yes" +IPV6_FAILURE_FATAL="no" +IPV6_ADDR_GEN_MODE="stable-privacy" +NAME="ens33" +UUID="d92ece08-9e02-47d5-b2d2-92c80e155744" +DEVICE="ens33" +ONBOOT="yes" +value_with_spaces: this value includes spaces +value_with_quotes_inside = this value "has quotation marks" inside +value_with_quotes_inside2 = "this value" has quotations at the beginning but not the end +value_with_quotes_inside3 : this value has quotation marks "at the end" diff --git a/tests/fixtures/generic/keyvalue.json b/tests/fixtures/generic/keyvalue.json new file mode 100644 index 00000000..5599f17c --- /dev/null +++ b/tests/fixtures/generic/keyvalue.json @@ -0,0 +1 @@ +{"value1": "hello", "value2": "true", "no_value": "", "value4": "3.14", "value5": "42"} diff --git a/tests/fixtures/generic/keyvalue.txt b/tests/fixtures/generic/keyvalue.txt new file mode 100644 index 00000000..666b913d --- /dev/null +++ b/tests/fixtures/generic/keyvalue.txt @@ -0,0 +1,5 @@ +value1 = hello +value2 = true +no_value +value4 = 3.14 +value5: 42 diff --git a/tests/fixtures/generic/traceroute1.json b/tests/fixtures/generic/traceroute1.json new file mode 100644 index 00000000..27b88891 --- /dev/null +++ b/tests/fixtures/generic/traceroute1.json @@ -0,0 +1 @@ +{"destination_ip": "173.207.22.152", "destination_name": "http://google.es", "hops": [{"hop": 1, "probes": [{"annotation": null, "asn": 1739, "ip": "131.240.100.12", "name": "131.240.100.12", "rtt": 0.676}, {"annotation": null, "asn": 1739, "ip": "131.240.100.12", "name": "131.240.100.12", "rtt": 0.763}, {"annotation": null, "asn": 1739, "ip": "131.240.100.12", "name": "131.240.100.12", "rtt": 0.91}]}, {"hop": 2, "probes": [{"annotation": null, "asn": 1739, "ip": "131.232.1.26", "name": "http://tut1-fw-vlan558.av.tut.fi", "rtt": 0.266}, {"annotation": null, "asn": 1739, "ip": "131.232.1.26", "name": "http://tut1-fw-vlan558.av.tut.fi", "rtt": 0.404}, {"annotation": null, "asn": 1739, "ip": "131.232.1.26", "name": "http://tut1-fw-vlan558.av.tut.fi", "rtt": 0.493}]}, {"hop": 3, "probes": [{"annotation": null, "asn": 1739, "ip": "131.232.1.20", "name": "http://surf-gw-vlan557.av.tut.fi", "rtt": 0.967}, {"annotation": null, "asn": 1739, "ip": "131.232.1.20", "name": "http://surf-gw-vlan557.av.tut.fi", "rtt": 0.961}, {"annotation": null, "asn": 1739, "ip": "131.232.1.20", "name": "http://surf-gw-vlan557.av.tut.fi", "rtt": 1.085}]}, {"hop": 4, "probes": [{"annotation": null, "asn": 1739, "ip": "130.230.1.237", "name": "http://funet-tut6-rtr-xe-0-0-0.cc.tut.fi", "rtt": 1.096}, {"annotation": null, "asn": 1739, "ip": "130.230.1.237", "name": "http://funet-tut6-rtr-xe-0-0-0.cc.tut.fi", "rtt": 1.086}, {"annotation": null, "asn": 1739, "ip": "130.230.1.237", "name": "http://funet-tut6-rtr-xe-0-0-0.cc.tut.fi", "rtt": 1.049}]}, {"hop": 5, "probes": [{"annotation": null, "asn": 1741, "ip": "86.50.255.220", "name": "http://hameenlinna2-et-0-0-0-1.ip.funet.fi", "rtt": 3.81}, {"annotation": null, "asn": 1741, "ip": "86.50.255.220", "name": "http://hameenlinna2-et-0-0-0-1.ip.funet.fi", "rtt": 3.845}, {"annotation": null, "asn": 1741, "ip": "86.50.255.220", "name": "http://hameenlinna2-et-0-0-0-1.ip.funet.fi", "rtt": 3.82}]}, {"hop": 6, "probes": [{"annotation": null, "asn": 1741, "ip": "86.50.255.224", "name": "http://hameenlinna1-et-0-0-1-1.ip.funet.fi", "rtt": 29.055}, {"annotation": null, "asn": 1741, "ip": "86.50.255.224", "name": "http://hameenlinna1-et-0-0-1-1.ip.funet.fi", "rtt": 29.013}, {"annotation": null, "asn": 1741, "ip": "86.50.255.224", "name": "http://hameenlinna1-et-0-0-1-1.ip.funet.fi", "rtt": 28.977}]}, {"hop": 7, "probes": [{"annotation": null, "asn": 1741, "ip": "86.50.255.223", "name": "http://espoo2-et-0-1-2-1.ip.funet.fi", "rtt": 3.468}, {"annotation": null, "asn": 1741, "ip": "86.50.255.223", "name": "http://espoo2-et-0-1-2-1.ip.funet.fi", "rtt": 8.007}, {"annotation": null, "asn": 1741, "ip": "86.50.255.223", "name": "http://espoo2-et-0-1-2-1.ip.funet.fi", "rtt": 7.89}]}, {"hop": 8, "probes": [{"annotation": null, "asn": 1741, "ip": "86.50.255.232", "name": "http://espoo1-et-0-1-7-1.ip.funet.fi", "rtt": 13.498}, {"annotation": null, "asn": 1741, "ip": "86.50.255.232", "name": "http://espoo1-et-0-1-7-1.ip.funet.fi", "rtt": 13.307}, {"annotation": null, "asn": 1741, "ip": "86.50.255.232", "name": "http://espoo1-et-0-1-7-1.ip.funet.fi", "rtt": 13.399}]}, {"hop": 9, "probes": [{"annotation": null, "asn": 2603, "ip": "109.105.102.168", "name": "http://fi-csc2.nordu.net", "rtt": 3.25}, {"annotation": null, "asn": 2603, "ip": "109.105.102.168", "name": "http://fi-csc2.nordu.net", "rtt": 3.268}, {"annotation": null, "asn": 2603, "ip": "109.105.102.168", "name": "http://fi-csc2.nordu.net", "rtt": 3.236}]}, {"hop": 10, "probes": [{"annotation": null, "asn": 2603, "ip": "109.105.97.93", "name": "http://se-fre.nordu.net", "rtt": 9.418}, {"annotation": null, "asn": 2603, "ip": "109.105.97.93", "name": "http://se-fre.nordu.net", "rtt": 9.41}, {"annotation": null, "asn": 2603, "ip": "109.105.97.93", "name": "http://se-fre.nordu.net", "rtt": 9.369}]}, {"hop": 11, "probes": [{"annotation": null, "asn": 2603, "ip": "109.105.97.27", "name": "http://se-kst2.nordu.net", "rtt": 9.617}, {"annotation": null, "asn": 2603, "ip": "109.105.97.27", "name": "http://se-kst2.nordu.net", "rtt": 9.594}, {"annotation": null, "asn": 2603, "ip": "109.105.97.27", "name": "http://se-kst2.nordu.net", "rtt": 9.603}]}, {"hop": 12, "probes": [{"annotation": null, "asn": 15169, "ip": "192.121.80.47", "name": "http://as15169-10g-sk1.sthix.net", "rtt": 10.01}, {"annotation": null, "asn": 15169, "ip": "192.121.80.47", "name": "http://as15169-10g-sk1.sthix.net", "rtt": 9.182}, {"annotation": null, "asn": 15169, "ip": "192.121.80.47", "name": "http://as15169-10g-sk1.sthix.net", "rtt": 44.983}]}, {"hop": 13, "probes": [{"annotation": null, "asn": 15169, "ip": "108.170.254.49", "name": "108.170.254.49", "rtt": 10.852}, {"annotation": null, "asn": 15169, "ip": "108.170.254.49", "name": "108.170.254.49", "rtt": 11.185}, {"annotation": null, "asn": 15169, "ip": "108.170.254.49", "name": "108.170.254.49", "rtt": 10.876}]}, {"hop": 14, "probes": [{"annotation": null, "asn": 15169, "ip": "209.85.242.11", "name": "209.85.242.11", "rtt": 10.192}, {"annotation": null, "asn": 15169, "ip": "209.85.242.11", "name": "209.85.242.11", "rtt": 10.471}, {"annotation": null, "asn": 15169, "ip": "209.85.242.11", "name": "209.85.242.11", "rtt": 10.502}]}, {"hop": 15, "probes": [{"annotation": null, "asn": 15169, "ip": "172.217.21.163", "name": "http://arn11s03-in-f3.1e100.net", "rtt": 9.652}, {"annotation": null, "asn": 15169, "ip": "172.217.21.163", "name": "http://arn11s03-in-f3.1e100.net", "rtt": 9.664}, {"annotation": null, "asn": 15169, "ip": "172.217.21.163", "name": "http://arn11s03-in-f3.1e100.net", "rtt": 9.777}]}]} diff --git a/tests/fixtures/generic/traceroute1.out b/tests/fixtures/generic/traceroute1.out new file mode 100644 index 00000000..c7f74803 --- /dev/null +++ b/tests/fixtures/generic/traceroute1.out @@ -0,0 +1,16 @@ +traceroute to http://google.es (173.207.22.152), 30 hops max, 60 byte packets + 1 131.240.100.12 (131.240.100.12) [AS1739] 0.676 ms !P 0.763 ms ! 0.910 ms !<500> + 2 http://tut1-fw-vlan558.av.tut.fi (131.232.1.26) [AS1739] 0.266 ms 0.404 ms 0.493 ms + 3 http://surf-gw-vlan557.av.tut.fi (131.232.1.20) [AS1739] 0.967 ms 0.961 ms 1.085 ms + 4 http://funet-tut6-rtr-xe-0-0-0.cc.tut.fi (130.230.1.237) [AS1739] 1.096 ms 1.086 ms 1.049 ms + 5 http://hameenlinna2-et-0-0-0-1.ip.funet.fi (86.50.255.220) [AS1741] 3.810 ms 3.845 ms 3.820 ms + 6 http://hameenlinna1-et-0-0-1-1.ip.funet.fi (86.50.255.224) [AS1741] 29.055 ms 29.013 ms 28.977 ms + 7 http://espoo2-et-0-1-2-1.ip.funet.fi (86.50.255.223) [AS1741] 3.468 ms 8.007 ms 7.890 ms + 8 http://espoo1-et-0-1-7-1.ip.funet.fi (86.50.255.232) [AS1741] 13.498 ms 13.307 ms 13.399 ms + 9 http://fi-csc2.nordu.net (109.105.102.168) [AS2603] 3.250 ms 3.268 ms 3.236 ms +10 http://se-fre.nordu.net (109.105.97.93) [AS2603] 9.418 ms 9.410 ms 9.369 ms +11 http://se-kst2.nordu.net (109.105.97.27) [AS2603] 9.617 ms 9.594 ms 9.603 ms +12 http://as15169-10g-sk1.sthix.net (192.121.80.47) [*] 10.010 ms 72.14.196.42 (72.14.196.42) [AS15169] 9.182 ms 44.983 ms +13 108.170.254.49 (108.170.254.49) [AS15169] 10.852 ms 108.170.254.33 (108.170.254.33) [AS15169] 11.185 ms 108.170.254.49 (108.170.254.49) [AS15169] 10.876 ms +14 209.85.242.11 (209.85.242.11) [AS15169] 10.192 ms 10.471 ms 10.502 ms +15 http://arn11s03-in-f3.1e100.net (172.217.21.163) [AS15169] 9.652 ms 9.664 ms 9.777 ms diff --git a/tests/fixtures/generic/traceroute2.json b/tests/fixtures/generic/traceroute2.json new file mode 100644 index 00000000..acd85297 --- /dev/null +++ b/tests/fixtures/generic/traceroute2.json @@ -0,0 +1 @@ +{"destination_ip": "216.58.194.46", "destination_name": "google.com", "hops": [{"hop": 1, "probes": [{"annotation": null, "asn": null, "ip": "216.230.231.141", "name": "216-230-231-141.static.houston.tx.oplink.net", "rtt": 198.574}, {"annotation": null, "asn": null, "ip": "216.230.231.141", "name": "216-230-231-141.static.houston.tx.oplink.net", "rtt": null}, {"annotation": null, "asn": null, "ip": "216.230.231.141", "name": "216-230-231-141.static.houston.tx.oplink.net", "rtt": 198.65}]}, {"hop": 2, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 3, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 4, "probes": [{"annotation": null, "asn": null, "ip": "72.14.242.34", "name": "72.14.242.34", "rtt": 4.932}, {"annotation": null, "asn": null, "ip": "72.14.242.34", "name": "72.14.242.34", "rtt": 4.945}, {"annotation": null, "asn": null, "ip": "72.14.242.34", "name": "72.14.242.34", "rtt": 4.951}]}, {"hop": 5, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 6, "probes": [{"annotation": null, "asn": null, "ip": "108.170.230.116", "name": "108.170.230.116", "rtt": 4.687}, {"annotation": null, "asn": null, "ip": "108.170.230.116", "name": "108.170.230.116", "rtt": 4.798}, {"annotation": null, "asn": null, "ip": "108.170.230.116", "name": "108.170.230.116", "rtt": 4.688}]}, {"hop": 7, "probes": [{"annotation": null, "asn": null, "ip": "108.170.252.130", "name": "108.170.252.130", "rtt": 4.825}, {"annotation": null, "asn": null, "ip": "108.170.252.130", "name": "108.170.252.130", "rtt": 4.844}, {"annotation": null, "asn": null, "ip": "108.170.252.130", "name": "108.170.252.130", "rtt": 4.797}]}, {"hop": 8, "probes": [{"annotation": null, "asn": null, "ip": "108.170.233.117", "name": "108.170.233.117", "rtt": 5.386}, {"annotation": null, "asn": null, "ip": "108.170.233.117", "name": "108.170.233.117", "rtt": 5.288}, {"annotation": null, "asn": null, "ip": "108.170.233.117", "name": "108.170.233.117", "rtt": 5.324}]}, {"hop": 9, "probes": [{"annotation": null, "asn": null, "ip": "216.239.63.250", "name": "216.239.63.250", "rtt": 5.305}, {"annotation": null, "asn": null, "ip": "216.239.63.250", "name": "216.239.63.250", "rtt": 5.369}, {"annotation": null, "asn": null, "ip": "216.239.63.250", "name": "216.239.63.250", "rtt": 5.406}]}, {"hop": 10, "probes": [{"annotation": null, "asn": null, "ip": "108.170.240.129", "name": "108.170.240.129", "rtt": 6.005}, {"annotation": null, "asn": null, "ip": "108.170.240.129", "name": "108.170.240.129", "rtt": 5.93}, {"annotation": null, "asn": null, "ip": "108.170.240.129", "name": "108.170.240.129", "rtt": 5.983}]}, {"hop": 11, "probes": [{"annotation": null, "asn": null, "ip": "209.85.242.53", "name": "209.85.242.53", "rtt": 4.973}, {"annotation": null, "asn": null, "ip": "209.85.242.53", "name": "209.85.242.53", "rtt": 4.973}, {"annotation": null, "asn": null, "ip": "209.85.242.53", "name": "209.85.242.53", "rtt": 4.979}]}, {"hop": 12, "probes": [{"annotation": null, "asn": null, "ip": "216.58.194.46", "name": "dfw25s12-in-f46.1e100.net", "rtt": 4.871}, {"annotation": null, "asn": null, "ip": "216.58.194.46", "name": "dfw25s12-in-f46.1e100.net", "rtt": 4.884}, {"annotation": null, "asn": null, "ip": "216.58.194.46", "name": "dfw25s12-in-f46.1e100.net", "rtt": 4.863}]}]} diff --git a/tests/fixtures/generic/traceroute2.out b/tests/fixtures/generic/traceroute2.out new file mode 100644 index 00000000..e40fe804 --- /dev/null +++ b/tests/fixtures/generic/traceroute2.out @@ -0,0 +1,13 @@ +traceroute to google.com (216.58.194.46), 30 hops max, 40 byte packets + 1 216-230-231-141.static.houston.tx.oplink.net (216.230.231.141) 198.574 ms * 198.650 ms + 2 * * * + 3 * * * + 4 72.14.242.34 (72.14.242.34) 4.932 ms 4.945 ms 4.951 ms + 5 * * * + 6 108.170.230.116 (108.170.230.116) 4.687 ms 4.798 ms 4.688 ms + 7 108.170.252.130 (108.170.252.130) 4.825 ms 4.844 ms 4.797 ms + 8 108.170.233.117 (108.170.233.117) 5.386 ms 5.288 ms 5.324 ms + 9 216.239.63.250 (216.239.63.250) 5.305 ms 5.369 ms 5.406 ms +10 108.170.240.129 (108.170.240.129) 6.005 ms 5.930 ms 5.983 ms +11 209.85.242.53 (209.85.242.53) 4.973 ms 4.973 ms 4.979 ms +12 dfw25s12-in-f46.1e100.net (216.58.194.46) 4.871 ms 4.884 ms 4.863 ms diff --git a/tests/fixtures/generic/traceroute3.json b/tests/fixtures/generic/traceroute3.json new file mode 100644 index 00000000..a7f26646 --- /dev/null +++ b/tests/fixtures/generic/traceroute3.json @@ -0,0 +1 @@ +{"destination_ip": "31.13.82.36", "destination_name": "facebook.com", "hops": [{"hop": 1, "probes": [{"annotation": null, "asn": null, "ip": "175.41.192.133", "name": "ec2-175-41-192-133.ap-northeast-1.compute.amazonaws.com", "rtt": 1.002}, {"annotation": null, "asn": null, "ip": "175.41.192.133", "name": "ec2-175-41-192-133.ap-northeast-1.compute.amazonaws.com", "rtt": null}, {"annotation": null, "asn": null, "ip": "175.41.192.133", "name": "ec2-175-41-192-133.ap-northeast-1.compute.amazonaws.com", "rtt": 1.006}]}, {"hop": 2, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 3, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 4, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 5, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 6, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 7, "probes": [{"annotation": null, "asn": null, "ip": "100.65.10.33", "name": "100.65.10.33", "rtt": 0.269}, {"annotation": null, "asn": null, "ip": "100.65.10.33", "name": "100.65.10.33", "rtt": 0.282}, {"annotation": null, "asn": null, "ip": "100.65.10.33", "name": "100.65.10.33", "rtt": 0.32}]}, {"hop": 8, "probes": [{"annotation": null, "asn": null, "ip": "54.239.52.186", "name": "54.239.52.186", "rtt": 1.411}, {"annotation": null, "asn": null, "ip": "54.239.52.186", "name": "54.239.52.186", "rtt": 1.431}, {"annotation": null, "asn": null, "ip": "54.239.52.186", "name": "54.239.52.186", "rtt": 1.433}]}, {"hop": 9, "probes": [{"annotation": null, "asn": null, "ip": "52.95.31.89", "name": "52.95.31.89", "rtt": 2.612}, {"annotation": null, "asn": null, "ip": "52.95.31.89", "name": "52.95.31.89", "rtt": 2.634}, {"annotation": null, "asn": null, "ip": "52.95.31.89", "name": "52.95.31.89", "rtt": 2.659}]}, {"hop": 10, "probes": [{"annotation": null, "asn": null, "ip": "52.95.31.56", "name": "52.95.31.56", "rtt": 1.017}, {"annotation": null, "asn": null, "ip": "52.95.31.56", "name": "52.95.31.56", "rtt": 1.028}, {"annotation": null, "asn": null, "ip": "52.95.31.56", "name": "52.95.31.56", "rtt": 1.048}]}, {"hop": 11, "probes": [{"annotation": null, "asn": null, "ip": "52.95.31.149", "name": "52.95.31.149", "rtt": 7.042}, {"annotation": null, "asn": null, "ip": "52.95.31.149", "name": "52.95.31.149", "rtt": 7.057}, {"annotation": null, "asn": null, "ip": "52.95.31.149", "name": "52.95.31.149", "rtt": 7.06}]}, {"hop": 12, "probes": [{"annotation": null, "asn": null, "ip": "54.239.53.66", "name": "54.239.53.66", "rtt": 7.828}, {"annotation": null, "asn": null, "ip": "54.239.53.66", "name": "54.239.53.66", "rtt": 7.81}, {"annotation": null, "asn": null, "ip": "54.239.53.66", "name": "54.239.53.66", "rtt": 7.997}]}, {"hop": 13, "probes": [{"annotation": null, "asn": null, "ip": "54.239.53.82", "name": "54.239.53.82", "rtt": 7.12}, {"annotation": null, "asn": null, "ip": "54.239.53.82", "name": "54.239.53.82", "rtt": 7.126}, {"annotation": null, "asn": null, "ip": "54.239.53.82", "name": "54.239.53.82", "rtt": 7.178}]}, {"hop": 14, "probes": [{"annotation": null, "asn": null, "ip": "63.222.51.9", "name": "63-222-51-9.static.pccwglobal.net", "rtt": 7.657}, {"annotation": null, "asn": null, "ip": "63.222.51.9", "name": "63-222-51-9.static.pccwglobal.net", "rtt": 7.611}, {"annotation": null, "asn": null, "ip": "63.222.51.9", "name": "63-222-51-9.static.pccwglobal.net", "rtt": 7.669}]}, {"hop": 15, "probes": [{"annotation": null, "asn": null, "ip": "63.218.250.169", "name": "HundredGE0-4-0-3.br02.tok02.pccwbtn.net", "rtt": 8.13}, {"annotation": null, "asn": null, "ip": "63.218.250.169", "name": "HundredGE0-4-0-3.br02.tok02.pccwbtn.net", "rtt": 8.368}, {"annotation": null, "asn": null, "ip": "63.218.250.169", "name": "HundredGE0-4-0-3.br02.tok02.pccwbtn.net", "rtt": 8.402}]}, {"hop": 16, "probes": [{"annotation": null, "asn": null, "ip": "63.218.251.118", "name": "63-218-251-118.static.pccwglobal.net", "rtt": 30.511}, {"annotation": null, "asn": null, "ip": "63.218.251.118", "name": "63-218-251-118.static.pccwglobal.net", "rtt": 20.379}, {"annotation": null, "asn": null, "ip": "63.218.251.118", "name": "63-218-251-118.static.pccwglobal.net", "rtt": 20.352}]}, {"hop": 17, "probes": [{"annotation": null, "asn": null, "ip": "157.240.40.9", "name": "po104.psw04.nrt1.tfbnw.net", "rtt": 8.341}, {"annotation": null, "asn": null, "ip": "157.240.40.9", "name": "po104.psw04.nrt1.tfbnw.net", "rtt": 8.303}, {"annotation": null, "asn": null, "ip": "157.240.40.9", "name": "po104.psw04.nrt1.tfbnw.net", "rtt": 8.312}]}, {"hop": 18, "probes": [{"annotation": null, "asn": null, "ip": "173.252.67.191", "name": "173.252.67.191", "rtt": 8.298}, {"annotation": null, "asn": null, "ip": "173.252.67.191", "name": "173.252.67.191", "rtt": 8.328}, {"annotation": null, "asn": null, "ip": "173.252.67.191", "name": "173.252.67.191", "rtt": 8.359}]}, {"hop": 19, "probes": [{"annotation": null, "asn": null, "ip": "31.13.82.36", "name": "edge-star-mini-shv-01-nrt1.facebook.com", "rtt": 8.214}, {"annotation": null, "asn": null, "ip": "31.13.82.36", "name": "edge-star-mini-shv-01-nrt1.facebook.com", "rtt": 8.198}, {"annotation": null, "asn": null, "ip": "31.13.82.36", "name": "edge-star-mini-shv-01-nrt1.facebook.com", "rtt": 8.192}]}]} diff --git a/tests/fixtures/generic/traceroute3.out b/tests/fixtures/generic/traceroute3.out new file mode 100644 index 00000000..41b61ed7 --- /dev/null +++ b/tests/fixtures/generic/traceroute3.out @@ -0,0 +1,20 @@ +traceroute to facebook.com (31.13.82.36), 30 hops max, 40 byte packets + 1 ec2-175-41-192-133.ap-northeast-1.compute.amazonaws.com (175.41.192.133) 1.002 ms * 1.006 ms + 2 * * * + 3 * * * + 4 * * * + 5 * * * + 6 * * * + 7 100.65.10.33 (100.65.10.33) 0.269 ms 0.282 ms 0.320 ms + 8 54.239.52.186 (54.239.52.186) 1.411 ms 1.431 ms 1.433 ms + 9 52.95.31.89 (52.95.31.89) 2.612 ms 2.634 ms 2.659 ms +10 52.95.31.56 (52.95.31.56) 1.017 ms 1.028 ms 1.048 ms +11 52.95.31.149 (52.95.31.149) 7.042 ms 7.057 ms 7.060 ms +12 54.239.53.66 (54.239.53.66) 7.828 ms 7.810 ms 7.997 ms +13 54.239.53.82 (54.239.53.82) 7.120 ms 7.126 ms 7.178 ms +14 63-222-51-9.static.pccwglobal.net (63.222.51.9) 7.657 ms 7.611 ms 7.669 ms +15 HundredGE0-4-0-3.br02.tok02.pccwbtn.net (63.218.250.169) 8.130 ms 8.368 ms 8.402 ms +16 63-218-251-118.static.pccwglobal.net (63.218.251.118) 30.511 ms 20.379 ms 20.352 ms +17 po104.psw04.nrt1.tfbnw.net (157.240.40.9) 8.341 ms 8.303 ms 8.312 ms +18 173.252.67.191 (173.252.67.191) 8.298 ms 8.328 ms 8.359 ms +19 edge-star-mini-shv-01-nrt1.facebook.com (31.13.82.36) 8.214 ms 8.198 ms 8.192 ms diff --git a/tests/fixtures/generic/traceroute4.json b/tests/fixtures/generic/traceroute4.json new file mode 100644 index 00000000..cb3324ed --- /dev/null +++ b/tests/fixtures/generic/traceroute4.json @@ -0,0 +1 @@ +{"destination_ip": "64.13.192.208", "destination_name": "example.com", "hops": [{"hop": 1, "probes": [{"annotation": null, "asn": null, "ip": "72.10.62.1", "name": "72.10.62.1", "rtt": 1.0}, {"annotation": null, "asn": null, "ip": "72.10.62.1", "name": "72.10.62.1", "rtt": 0.739}, {"annotation": null, "asn": null, "ip": "72.10.62.1", "name": "72.10.62.1", "rtt": 0.702}]}, {"hop": 2, "probes": [{"annotation": null, "asn": null, "ip": "10.101.248.1", "name": "10.101.248.1", "rtt": 0.683}, {"annotation": null, "asn": null, "ip": "10.101.248.1", "name": "10.101.248.1", "rtt": 0.385}, {"annotation": null, "asn": null, "ip": "10.101.248.1", "name": "10.101.248.1", "rtt": 0.315}]}, {"hop": 3, "probes": [{"annotation": null, "asn": null, "ip": "10.104.65.161", "name": "10.104.65.161", "rtt": 0.791}, {"annotation": null, "asn": null, "ip": "10.104.65.161", "name": "10.104.65.161", "rtt": 0.703}, {"annotation": null, "asn": null, "ip": "10.104.65.161", "name": "10.104.65.161", "rtt": 0.686}]}, {"hop": 4, "probes": [{"annotation": null, "asn": null, "ip": "10.104.0.1", "name": "10.104.0.1", "rtt": 1.43}, {"annotation": null, "asn": null, "ip": "10.104.0.1", "name": "10.104.0.1", "rtt": 1.31}, {"annotation": null, "asn": null, "ip": "10.104.0.1", "name": "10.104.0.1", "rtt": 1.063}]}, {"hop": 5, "probes": [{"annotation": null, "asn": null, "ip": "10.0.10.33", "name": "10.0.10.33", "rtt": 2.652}, {"annotation": null, "asn": null, "ip": "10.0.10.33", "name": "10.0.10.33", "rtt": 2.26}, {"annotation": null, "asn": null, "ip": "10.0.10.33", "name": "10.0.10.33", "rtt": 5.353}]}, {"hop": 6, "probes": [{"annotation": null, "asn": null, "ip": "64.13.192.208", "name": "www.example.com", "rtt": 3.384}, {"annotation": null, "asn": null, "ip": "64.13.192.208", "name": "www.example.com", "rtt": 8.001}, {"annotation": null, "asn": null, "ip": "64.13.192.208", "name": "www.example.com", "rtt": 2.439}]}]} diff --git a/tests/fixtures/generic/traceroute4.out b/tests/fixtures/generic/traceroute4.out new file mode 100644 index 00000000..3d898816 --- /dev/null +++ b/tests/fixtures/generic/traceroute4.out @@ -0,0 +1,7 @@ +traceroute to example.com (64.13.192.208), 64 hops max, 40 byte packets +1 72.10.62.1 (72.10.62.1) 1.000 ms 0.739 ms 0.702 ms +2 10.101.248.1 (10.101.248.1) 0.683 ms 0.385 ms 0.315 ms +3 10.104.65.161 (10.104.65.161) 0.791 ms 0.703 ms 0.686 ms +4 10.104.0.1 (10.104.0.1) 1.430 ms 1.310 ms 1.063 ms +5 10.0.10.33 (10.0.10.33) 2.652 ms 2.260 ms 5.353 ms +6 www.example.com (64.13.192.208) 3.384 ms 8.001 ms 2.439 ms diff --git a/tests/fixtures/generic/traceroute5.json b/tests/fixtures/generic/traceroute5.json new file mode 100644 index 00000000..d5d9b79c --- /dev/null +++ b/tests/fixtures/generic/traceroute5.json @@ -0,0 +1 @@ +{"destination_ip": "104.18.42.178", "destination_name": "10xhostings.com", "hops": [{"hop": 1, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 2, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": 0.894}, {"annotation": null, "asn": null, "ip": null, "name": null, "rtt": 0.89}, {"annotation": null, "asn": null, "ip": null, "name": null, "rtt": 0.876}]}, {"hop": 3, "probes": [{"annotation": null, "asn": null, "ip": "204.141.42.25", "name": "204.141.42.25", "rtt": 2.818}, {"annotation": null, "asn": null, "ip": "204.141.42.25", "name": "204.141.42.25", "rtt": 2.825}, {"annotation": null, "asn": null, "ip": "204.141.42.25", "name": "204.141.42.25", "rtt": 2.825}]}, {"hop": 4, "probes": [{"annotation": null, "asn": null, "ip": "204.141.42.9", "name": "204.141.42.9", "rtt": 1.014}, {"annotation": null, "asn": null, "ip": "204.141.42.9", "name": "204.141.42.9", "rtt": 1.017}, {"annotation": null, "asn": null, "ip": "204.141.42.9", "name": "204.141.42.9", "rtt": 1.082}]}, {"hop": 5, "probes": [{"annotation": null, "asn": null, "ip": "128.241.1.145", "name": "xe-0-0-46-2.a00.sttlwa01.us.bb.gin.ntt.net", "rtt": 30.105}, {"annotation": null, "asn": null, "ip": "128.241.1.145", "name": "xe-0-0-46-2.a00.sttlwa01.us.bb.gin.ntt.net", "rtt": 30.125}, {"annotation": null, "asn": null, "ip": "128.241.1.145", "name": "xe-0-0-46-2.a00.sttlwa01.us.bb.gin.ntt.net", "rtt": 30.125}]}, {"hop": 6, "probes": [{"annotation": null, "asn": null, "ip": "129.250.5.117", "name": "ae-9.r04.sttlwa01.us.bb.gin.ntt.net", "rtt": 32.346}, {"annotation": null, "asn": null, "ip": "129.250.5.117", "name": "ae-9.r04.sttlwa01.us.bb.gin.ntt.net", "rtt": 31.946}, {"annotation": null, "asn": null, "ip": "129.250.5.117", "name": "ae-9.r04.sttlwa01.us.bb.gin.ntt.net", "rtt": 31.96}]}, {"hop": 7, "probes": [{"annotation": null, "asn": null, "ip": "129.250.5.86", "name": "ae-0.a01.sttlwa01.us.bb.gin.ntt.net", "rtt": 32.836}, {"annotation": null, "asn": null, "ip": "129.250.5.86", "name": "ae-0.a01.sttlwa01.us.bb.gin.ntt.net", "rtt": 32.749}, {"annotation": null, "asn": null, "ip": "129.250.5.86", "name": "ae-0.a01.sttlwa01.us.bb.gin.ntt.net", "rtt": 32.743}]}, {"hop": 8, "probes": [{"annotation": null, "asn": null, "ip": "131.103.117.86", "name": "ae-0.cloudflare.sttlwa01.us.bb.gin.ntt.net", "rtt": 44.601}, {"annotation": null, "asn": null, "ip": "131.103.117.86", "name": "ae-0.cloudflare.sttlwa01.us.bb.gin.ntt.net", "rtt": 42.886}, {"annotation": null, "asn": null, "ip": "131.103.117.86", "name": "ae-0.cloudflare.sttlwa01.us.bb.gin.ntt.net", "rtt": 42.874}]}, {"hop": 9, "probes": [{"annotation": null, "asn": null, "ip": "104.18.42.178", "name": "104.18.42.178", "rtt": 29.614}, {"annotation": null, "asn": null, "ip": "104.18.42.178", "name": "104.18.42.178", "rtt": 29.69}, {"annotation": null, "asn": null, "ip": "104.18.42.178", "name": "104.18.42.178", "rtt": 30.461}]}]} diff --git a/tests/fixtures/generic/traceroute5.out b/tests/fixtures/generic/traceroute5.out new file mode 100644 index 00000000..18993166 --- /dev/null +++ b/tests/fixtures/generic/traceroute5.out @@ -0,0 +1,10 @@ +traceroute to 10xhostings.com (104.18.42.178), 30 hops max, 40 byte packets + 1 * * * + 2 Internal (Internal) 0.894 ms 0.890 ms 0.876 ms + 3 204.141.42.25 (204.141.42.25) 2.818 ms 2.825 ms 2.825 ms + 4 204.141.42.9 (204.141.42.9) 1.014 ms 1.017 ms 1.082 ms + 5 xe-0-0-46-2.a00.sttlwa01.us.bb.gin.ntt.net (128.241.1.145) 30.105 ms 30.125 ms 30.125 ms + 6 ae-9.r04.sttlwa01.us.bb.gin.ntt.net (129.250.5.117) 32.346 ms 31.946 ms 31.960 ms + 7 ae-0.a01.sttlwa01.us.bb.gin.ntt.net (129.250.5.86) 32.836 ms 32.749 ms 32.743 ms + 8 ae-0.cloudflare.sttlwa01.us.bb.gin.ntt.net (131.103.117.86) 44.601 ms 42.886 ms 42.874 ms + 9 104.18.42.178 (104.18.42.178) 29.614 ms 29.690 ms 30.461 ms diff --git a/tests/fixtures/generic/traceroute6.json b/tests/fixtures/generic/traceroute6.json new file mode 100644 index 00000000..acaf6e6b --- /dev/null +++ b/tests/fixtures/generic/traceroute6.json @@ -0,0 +1 @@ +{"destination_ip": "52.22.122.82", "destination_name": "alexa.com", "hops": [{"hop": 1, "probes": [{"annotation": null, "asn": null, "ip": "130.185.80.253", "name": "130.185.80.253", "rtt": 0.374}, {"annotation": null, "asn": null, "ip": "130.185.80.253", "name": "130.185.80.253", "rtt": null}, {"annotation": null, "asn": null, "ip": "130.185.80.253", "name": "130.185.80.253", "rtt": 0.474}]}, {"hop": 2, "probes": [{"annotation": null, "asn": null, "ip": "94.46.128.26", "name": "94.46.128.26", "rtt": 0.44}, {"annotation": null, "asn": null, "ip": "94.46.128.26", "name": "94.46.128.26", "rtt": 0.457}, {"annotation": null, "asn": null, "ip": "94.46.128.26", "name": "94.46.128.26", "rtt": 0.459}]}, {"hop": 3, "probes": [{"annotation": null, "asn": null, "ip": "80.231.158.49", "name": "ix-xe-1-3-0-0.tcore1.pv9-lisbon.as6453.net", "rtt": 0.436}, {"annotation": null, "asn": null, "ip": "80.231.158.49", "name": "ix-xe-1-3-0-0.tcore1.pv9-lisbon.as6453.net", "rtt": 0.436}, {"annotation": null, "asn": null, "ip": "80.231.158.49", "name": "ix-xe-1-3-0-0.tcore1.pv9-lisbon.as6453.net", "rtt": 0.446}]}, {"hop": 4, "probes": [{"annotation": null, "asn": null, "ip": "80.231.158.30", "name": "if-ae-1-3.tcore1.sv8-highbridge.as6453.net", "rtt": 100.3}, {"annotation": null, "asn": null, "ip": "80.231.158.30", "name": "if-ae-1-3.tcore1.sv8-highbridge.as6453.net", "rtt": 100.346}, {"annotation": null, "asn": null, "ip": "80.231.158.30", "name": "if-ae-1-3.tcore1.sv8-highbridge.as6453.net", "rtt": 100.362}]}, {"hop": 5, "probes": [{"annotation": null, "asn": null, "ip": "80.231.139.1", "name": "if-ae-2-2.tcore2.sv8-highbridge.as6453.net", "rtt": 100.737}, {"annotation": null, "asn": null, "ip": "80.231.139.1", "name": "if-ae-2-2.tcore2.sv8-highbridge.as6453.net", "rtt": 100.787}, {"annotation": null, "asn": null, "ip": "80.231.139.1", "name": "if-ae-2-2.tcore2.sv8-highbridge.as6453.net", "rtt": 100.863}]}, {"hop": 6, "probes": [{"annotation": null, "asn": null, "ip": "80.231.139.42", "name": "if-ae-11-2.tcore1.l78-london.as6453.net", "rtt": 94.576}, {"annotation": null, "asn": null, "ip": "80.231.139.42", "name": "if-ae-11-2.tcore1.l78-london.as6453.net", "rtt": 94.647}, {"annotation": null, "asn": null, "ip": "80.231.139.42", "name": "if-ae-11-2.tcore1.l78-london.as6453.net", "rtt": 94.631}]}, {"hop": 7, "probes": [{"annotation": null, "asn": null, "ip": "80.231.130.106", "name": "if-ae-66-2.tcore2.nto-new-york.as6453.net", "rtt": 104.775}, {"annotation": null, "asn": null, "ip": "80.231.130.106", "name": "if-ae-66-2.tcore2.nto-new-york.as6453.net", "rtt": 105.059}, {"annotation": null, "asn": null, "ip": "80.231.130.106", "name": "if-ae-66-2.tcore2.nto-new-york.as6453.net", "rtt": 105.146}]}, {"hop": 8, "probes": [{"annotation": null, "asn": null, "ip": "66.110.96.5", "name": "if-ae-12-2.tcore1.n75-new-york.as6453.net", "rtt": 100.043}, {"annotation": null, "asn": null, "ip": "66.110.96.5", "name": "if-ae-12-2.tcore1.n75-new-york.as6453.net", "rtt": 100.096}, {"annotation": null, "asn": null, "ip": "66.110.96.5", "name": "if-ae-12-2.tcore1.n75-new-york.as6453.net", "rtt": 100.089}]}, {"hop": 9, "probes": [{"annotation": null, "asn": null, "ip": "66.110.96.157", "name": "66.110.96.157", "rtt": 101.514}, {"annotation": null, "asn": null, "ip": "66.110.96.157", "name": "66.110.96.157", "rtt": 101.055}, {"annotation": null, "asn": null, "ip": "66.110.96.157", "name": "66.110.96.157", "rtt": 101.058}]}, {"hop": 10, "probes": [{"annotation": null, "asn": null, "ip": "52.93.31.33", "name": "52.93.31.33", "rtt": 100.489}, {"annotation": null, "asn": null, "ip": "52.93.31.33", "name": "52.93.31.33", "rtt": 100.113}, {"annotation": null, "asn": null, "ip": "52.93.31.33", "name": "52.93.31.33", "rtt": 100.065}]}, {"hop": 11, "probes": [{"annotation": null, "asn": null, "ip": "52.93.4.0", "name": "52.93.4.0", "rtt": 93.575}, {"annotation": null, "asn": null, "ip": "52.93.4.0", "name": "52.93.4.0", "rtt": 93.473}, {"annotation": null, "asn": null, "ip": "52.93.4.0", "name": "52.93.4.0", "rtt": 93.491}]}, {"hop": 12, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 13, "probes": [{"annotation": null, "asn": null, "ip": "54.240.229.143", "name": "54.240.229.143", "rtt": 94.307}, {"annotation": null, "asn": null, "ip": "54.240.229.143", "name": "54.240.229.143", "rtt": 94.732}, {"annotation": null, "asn": null, "ip": "54.240.229.143", "name": "54.240.229.143", "rtt": 94.683}]}, {"hop": 14, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 15, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 16, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 17, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 18, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 19, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 20, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 21, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 22, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 23, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 24, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 25, "probes": [{"annotation": null, "asn": null, "ip": "52.93.28.172", "name": "52.93.28.172", "rtt": 94.27}, {"annotation": null, "asn": null, "ip": "52.93.28.172", "name": "52.93.28.172", "rtt": 94.296}, {"annotation": null, "asn": null, "ip": "52.93.28.172", "name": "52.93.28.172", "rtt": 94.294}]}, {"hop": 26, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 27, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 28, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 29, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 30, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}]} diff --git a/tests/fixtures/generic/traceroute6.out b/tests/fixtures/generic/traceroute6.out new file mode 100644 index 00000000..738e6178 --- /dev/null +++ b/tests/fixtures/generic/traceroute6.out @@ -0,0 +1,31 @@ +traceroute to alexa.com (52.22.122.82), 30 hops max, 40 byte packets + 1 130.185.80.253 (130.185.80.253) 0.374 ms * 0.474 ms + 2 94.46.128.26 (94.46.128.26) 0.440 ms 0.457 ms 0.459 ms + 3 ix-xe-1-3-0-0.tcore1.pv9-lisbon.as6453.net (80.231.158.49) 0.436 ms 0.436 ms 0.446 ms + 4 if-ae-1-3.tcore1.sv8-highbridge.as6453.net (80.231.158.30) 100.300 ms 100.346 ms 100.362 ms + 5 if-ae-2-2.tcore2.sv8-highbridge.as6453.net (80.231.139.1) 100.737 ms 100.787 ms 100.863 ms + 6 if-ae-11-2.tcore1.l78-london.as6453.net (80.231.139.42) 94.576 ms 94.647 ms 94.631 ms + 7 if-ae-66-2.tcore2.nto-new-york.as6453.net (80.231.130.106) 104.775 ms 105.059 ms 105.146 ms + 8 if-ae-12-2.tcore1.n75-new-york.as6453.net (66.110.96.5) 100.043 ms 100.096 ms 100.089 ms + 9 66.110.96.157 (66.110.96.157) 101.514 ms 101.055 ms 101.058 ms +10 52.93.31.33 (52.93.31.33) 100.489 ms 100.113 ms 100.065 ms +11 52.93.4.0 (52.93.4.0) 93.575 ms 93.473 ms 93.491 ms +12 * * * +13 54.240.229.143 (54.240.229.143) 94.307 ms 94.732 ms 94.683 ms +14 * * * +15 * * * +16 * * * +17 * * * +18 * * * +19 * * * +20 * * * +21 * * * +22 * * * +23 * * * +24 * * * +25 52.93.28.172 (52.93.28.172) 94.270 ms 94.296 ms 94.294 ms +26 * * * +27 * * * +28 * * * +29 * * * +30 * * * diff --git a/tests/fixtures/generic/traceroute7.json b/tests/fixtures/generic/traceroute7.json new file mode 100644 index 00000000..0bdfb92c --- /dev/null +++ b/tests/fixtures/generic/traceroute7.json @@ -0,0 +1 @@ +{"destination_ip": "181.40.91.83", "destination_name": "paraguay.com", "hops": [{"hop": 1, "probes": [{"annotation": null, "asn": 128742, "ip": "192.168.0.1", "name": "192.168.0.1", "rtt": 9.173}, {"annotation": null, "asn": 128742, "ip": "192.168.0.1", "name": "192.168.0.1", "rtt": 5.49}, {"annotation": null, "asn": 128742, "ip": "192.168.0.1", "name": "192.168.0.1", "rtt": 5.197}]}, {"hop": 2, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 3, "probes": [{"annotation": null, "asn": 0, "ip": "192.168.117.58", "name": "192.168.117.58", "rtt": 26.768}, {"annotation": null, "asn": 0, "ip": "192.168.117.58", "name": "192.168.117.58", "rtt": 17.878}, {"annotation": null, "asn": 0, "ip": "192.168.117.58", "name": "192.168.117.58", "rtt": 16.443}]}, {"hop": 4, "probes": [{"annotation": null, "asn": 0, "ip": "192.168.15.1", "name": "192.168.15.1", "rtt": 16.229}, {"annotation": null, "asn": 0, "ip": "192.168.15.1", "name": "192.168.15.1", "rtt": 23.514}, {"annotation": null, "asn": 0, "ip": "192.168.15.1", "name": "192.168.15.1", "rtt": 16.878}]}, {"hop": 5, "probes": [{"annotation": null, "asn": 0, "ip": "91.122.105.27", "name": "91.122.105.27", "rtt": 17.825}, {"annotation": null, "asn": 0, "ip": "91.122.105.27", "name": "91.122.105.27", "rtt": 22.906}, {"annotation": null, "asn": 0, "ip": "91.122.105.27", "name": "91.122.105.27", "rtt": 29.003}]}, {"hop": 6, "probes": [{"annotation": null, "asn": 0, "ip": "94.142.122.45", "name": "94.142.122.45", "rtt": 42.79}, {"annotation": null, "asn": 0, "ip": "94.142.122.45", "name": "94.142.122.45", "rtt": 46.352}, {"annotation": null, "asn": 0, "ip": "94.142.122.44", "name": "94.142.122.44", "rtt": 41.479}]}, {"hop": 7, "probes": [{"annotation": null, "asn": 0, "ip": "94.142.124.46", "name": "94.142.124.46", "rtt": 62.692}, {"annotation": null, "asn": 0, "ip": "94.142.124.46", "name": "94.142.124.46", "rtt": 44.691}, {"annotation": null, "asn": 0, "ip": "5.53.0.153", "name": "5.53.0.153", "rtt": 61.049}]}, {"hop": 8, "probes": [{"annotation": null, "asn": 0, "ip": "181.40.42.30", "name": "pool-30-42-40-181.telecel.com.py", "rtt": 65.148}, {"annotation": null, "asn": 0, "ip": "5.53.0.155", "name": "5.53.0.155", "rtt": 65.096}, {"annotation": null, "asn": 0, "ip": "181.40.42.30", "name": "pool-30-42-40-181.telecel.com.py", "rtt": 65.157}]}, {"hop": 9, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 10, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 11, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 12, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}]} diff --git a/tests/fixtures/generic/traceroute7.out b/tests/fixtures/generic/traceroute7.out new file mode 100644 index 00000000..bf4bfd12 --- /dev/null +++ b/tests/fixtures/generic/traceroute7.out @@ -0,0 +1,17 @@ +traceroute to paraguay.com (181.40.91.83), 64 hops max, 52 byte packets + 1 [AS128742] 192.168.0.1 (192.168.0.1) 9.173 ms 5.490 ms 5.197 ms + 2 * * * + 3 [AS0] 192.168.117.58 (192.168.117.58) 26.768 ms 17.878 ms 16.443 ms + 4 [AS0] 192.168.15.1 (192.168.15.1) 16.229 ms 23.514 ms 16.878 ms + 5 [AS0] 91.122.105.27 (91.122.105.27) 17.825 ms 22.906 ms 29.003 ms + 6 [AS0] 94.142.122.45 (94.142.122.45) 42.790 ms 46.352 ms + [AS0] 94.142.122.44 (94.142.122.44) 41.479 ms + 7 [AS0] 94.142.124.46 (94.142.124.46) 62.692 ms 44.691 ms + [AS0] 5.53.0.153 (5.53.0.153) 61.049 ms + 8 [AS0] pool-30-42-40-181.telecel.com.py (181.40.42.30) 65.148 ms + [AS0] 5.53.0.155 (5.53.0.155) 65.096 ms + [AS0] pool-30-42-40-181.telecel.com.py (181.40.42.30) 65.157 ms + 9 * * * +10 * * * +11 * * * +12 * * * diff --git a/tests/fixtures/generic/traceroute8.json b/tests/fixtures/generic/traceroute8.json new file mode 100644 index 00000000..b0f6f779 --- /dev/null +++ b/tests/fixtures/generic/traceroute8.json @@ -0,0 +1 @@ +{"destination_ip": "2606:4700:3030::6812:3e4e", "destination_name": "baeldung.com", "hops": [{"hop": 1, "probes": [{"annotation": null, "asn": null, "ip": "2001:2e8:665:0:2:2:0:1", "name": "2001:2e8:665:0:2:2:0:1", "rtt": 0.083}, {"annotation": null, "asn": null, "ip": "2001:2e8:665:0:2:2:0:1", "name": "2001:2e8:665:0:2:2:0:1", "rtt": 0.048}, {"annotation": null, "asn": null, "ip": "2001:2e8:665:0:2:2:0:1", "name": "2001:2e8:665:0:2:2:0:1", "rtt": 0.044}]}, {"hop": 2, "probes": [{"annotation": null, "asn": null, "ip": "2001:2e8:22:204::2", "name": "2001:2e8:22:204::2", "rtt": 25.128}, {"annotation": null, "asn": null, "ip": "2001:2e8:22:204::2", "name": "2001:2e8:22:204::2", "rtt": 25.047}, {"annotation": null, "asn": null, "ip": "2001:2e8:22:204::2", "name": "2001:2e8:22:204::2", "rtt": 25.025}]}, {"hop": 3, "probes": [{"annotation": null, "asn": null, "ip": "2001:2e8:20::22:11", "name": "2001:2e8:20::22:11", "rtt": 1.106}, {"annotation": null, "asn": null, "ip": "2001:2e8:20::22:11", "name": "2001:2e8:20::22:11", "rtt": 25.83}, {"annotation": null, "asn": null, "ip": "2001:2e8:20::22:11", "name": "2001:2e8:20::22:11", "rtt": 1.007}]}, {"hop": 4, "probes": [{"annotation": null, "asn": null, "ip": "2001:218:2000:5000::305", "name": "xe-0-0-14-1.a02.tokyjp05.jp.bb.gin.ntt.net", "rtt": 0.908}, {"annotation": null, "asn": null, "ip": "2001:218:2000:5000::305", "name": "xe-0-0-14-1.a02.tokyjp05.jp.bb.gin.ntt.net", "rtt": 1.197}, {"annotation": null, "asn": null, "ip": "2001:218:2000:5000::305", "name": "xe-0-0-14-1.a02.tokyjp05.jp.bb.gin.ntt.net", "rtt": 1.097}]}, {"hop": 5, "probes": [{"annotation": null, "asn": null, "ip": "2001:218:0:2000::59", "name": "ae-25.r02.tokyjp05.jp.bb.gin.ntt.net", "rtt": 1.515}, {"annotation": null, "asn": null, "ip": "2001:218:0:2000::59", "name": "ae-25.r02.tokyjp05.jp.bb.gin.ntt.net", "rtt": 1.744}, {"annotation": null, "asn": null, "ip": "2001:218:0:2000::59", "name": "ae-25.r02.tokyjp05.jp.bb.gin.ntt.net", "rtt": 1.785}]}, {"hop": 6, "probes": [{"annotation": null, "asn": null, "ip": "2001:218:0:2000::11a", "name": "ae-4.r30.tokyjp05.jp.bb.gin.ntt.net", "rtt": 1.466}, {"annotation": null, "asn": null, "ip": "2001:218:0:2000::11a", "name": "ae-4.r30.tokyjp05.jp.bb.gin.ntt.net", "rtt": 1.538}, {"annotation": null, "asn": null, "ip": "2001:218:0:2000::11a", "name": "ae-4.r30.tokyjp05.jp.bb.gin.ntt.net", "rtt": 1.337}]}, {"hop": 7, "probes": [{"annotation": null, "asn": null, "ip": "2001:218:0:2000::2d7", "name": "ae-3.r00.tokyjp08.jp.bb.gin.ntt.net", "rtt": 1.857}, {"annotation": null, "asn": null, "ip": "2001:218:0:2000::2d7", "name": "ae-3.r00.tokyjp08.jp.bb.gin.ntt.net", "rtt": 1.839}, {"annotation": null, "asn": null, "ip": "2001:218:0:2000::2d7", "name": "ae-3.r00.tokyjp08.jp.bb.gin.ntt.net", "rtt": 1.901}]}, {"hop": 8, "probes": [{"annotation": null, "asn": null, "ip": "2001:218:2000:5000::26", "name": "as7515.ntt.net", "rtt": 2.717}, {"annotation": null, "asn": null, "ip": "2001:218:2000:5000::26", "name": "as7515.ntt.net", "rtt": 2.419}, {"annotation": null, "asn": null, "ip": "2001:218:2000:5000::26", "name": "as7515.ntt.net", "rtt": 2.325}]}, {"hop": 9, "probes": [{"annotation": null, "asn": null, "ip": "2400:cb00:22:1024::a29e:759c", "name": "2400:cb00:22:1024::a29e:759c", "rtt": 2.115}, {"annotation": null, "asn": null, "ip": "2400:cb00:22:1024::a29e:759c", "name": "2400:cb00:22:1024::a29e:759c", "rtt": 1.985}, {"annotation": null, "asn": null, "ip": "2400:cb00:22:1024::a29e:759c", "name": "2400:cb00:22:1024::a29e:759c", "rtt": 2.272}]}]} diff --git a/tests/fixtures/generic/traceroute8.out b/tests/fixtures/generic/traceroute8.out new file mode 100644 index 00000000..fea21dce --- /dev/null +++ b/tests/fixtures/generic/traceroute8.out @@ -0,0 +1,10 @@ +traceroute to baeldung.com (2606:4700:3030::6812:3e4e), 30 hops max, 80 byte packets + 1 2001:2e8:665:0:2:2:0:1 (2001:2e8:665:0:2:2:0:1) 0.083 ms 0.048 ms 0.044 ms + 2 2001:2e8:22:204::2 (2001:2e8:22:204::2) 25.128 ms 25.047 ms 25.025 ms + 3 2001:2e8:20::22:11 (2001:2e8:20::22:11) 1.106 ms 25.830 ms 1.007 ms + 4 xe-0-0-14-1.a02.tokyjp05.jp.bb.gin.ntt.net (2001:218:2000:5000::305) 0.908 ms 1.197 ms 1.097 ms + 5 ae-25.r02.tokyjp05.jp.bb.gin.ntt.net (2001:218:0:2000::59) 1.515 ms 1.744 ms 1.785 ms + 6 ae-4.r30.tokyjp05.jp.bb.gin.ntt.net (2001:218:0:2000::11a) 1.466 ms 1.538 ms ae-4.r30.tokyjp05.jp.bb.gin.ntt.net (2001:218:0:2000::11a) 1.337 ms + 7 ae-3.r00.tokyjp08.jp.bb.gin.ntt.net (2001:218:0:2000::2d7) 1.857 ms 1.839 ms ae-3.r00.tokyjp08.jp.bb.gin.ntt.net (2001:218:0:2000::2d7) 1.901 ms + 8 as7515.ntt.net (2001:218:2000:5000::26) 2.717 ms 2.419 ms 2.325 ms + 9 2400:cb00:22:1024::a29e:759c (2400:cb00:22:1024::a29e:759c) 2.115 ms 1.985 ms 2400:cb00:22:1024::a29e:759f (2400:cb00:22:1024::a29e:759f) 2.272 ms diff --git a/tests/fixtures/osx-10.14.6/ping-hostname-p.json b/tests/fixtures/osx-10.14.6/ping-hostname-p.json new file mode 100644 index 00000000..34a25e39 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping-hostname-p.json @@ -0,0 +1 @@ +{"destination_ip": "151.101.1.67", "data_bytes": 56, "pattern": "0xff", "destination": "cnn.com", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 89.422, "round_trip_ms_avg": 118.033, "round_trip_ms_max": 147.964, "round_trip_ms_stddev": 23.918, "responses": [{"type": "reply", "bytes": 64, "response_ip": "151.101.1.67", "icmp_seq": 0, "ttl": 59, "time_ms": 89.422, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "151.101.1.67", "icmp_seq": 1, "ttl": 59, "time_ms": 116.712, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "151.101.1.67", "icmp_seq": 2, "ttl": 59, "time_ms": 147.964, "duplicate": false}]} diff --git a/tests/fixtures/osx-10.14.6/ping-hostname-p.out b/tests/fixtures/osx-10.14.6/ping-hostname-p.out new file mode 100644 index 00000000..27121259 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping-hostname-p.out @@ -0,0 +1,9 @@ +PATTERN: 0xff +PING cnn.com (151.101.1.67): 56 data bytes +64 bytes from 151.101.1.67: icmp_seq=0 ttl=59 time=89.422 ms +64 bytes from 151.101.1.67: icmp_seq=1 ttl=59 time=116.712 ms +64 bytes from 151.101.1.67: icmp_seq=2 ttl=59 time=147.964 ms + +--- cnn.com ping statistics --- +3 packets transmitted, 3 packets received, 0.0% packet loss +round-trip min/avg/max/stddev = 89.422/118.033/147.964/23.918 ms diff --git a/tests/fixtures/osx-10.14.6/ping-hostname-s.json b/tests/fixtures/osx-10.14.6/ping-hostname-s.json new file mode 100644 index 00000000..12cfa26a --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping-hostname-s.json @@ -0,0 +1 @@ +{"destination_ip": "151.101.1.67", "data_bytes": 1400, "pattern": null, "destination": "cnn.com", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 29.954, "round_trip_ms_avg": 39.892, "round_trip_ms_max": 50.674, "round_trip_ms_stddev": 8.48, "responses": [{"type": "reply", "bytes": 1408, "response_ip": "151.101.1.67", "icmp_seq": 0, "ttl": 59, "time_ms": 39.048, "duplicate": false}, {"type": "reply", "bytes": 1408, "response_ip": "151.101.1.67", "icmp_seq": 1, "ttl": 59, "time_ms": 29.954, "duplicate": false}, {"type": "reply", "bytes": 1408, "response_ip": "151.101.1.67", "icmp_seq": 2, "ttl": 59, "time_ms": 50.674, "duplicate": false}]} diff --git a/tests/fixtures/osx-10.14.6/ping-hostname-s.out b/tests/fixtures/osx-10.14.6/ping-hostname-s.out new file mode 100644 index 00000000..819e7c29 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping-hostname-s.out @@ -0,0 +1,8 @@ +PING cnn.com (151.101.1.67): 1400 data bytes +1408 bytes from 151.101.1.67: icmp_seq=0 ttl=59 time=39.048 ms +1408 bytes from 151.101.1.67: icmp_seq=1 ttl=59 time=29.954 ms +1408 bytes from 151.101.1.67: icmp_seq=2 ttl=59 time=50.674 ms + +--- cnn.com ping statistics --- +3 packets transmitted, 3 packets received, 0.0% packet loss +round-trip min/avg/max/stddev = 29.954/39.892/50.674/8.480 ms diff --git a/tests/fixtures/osx-10.14.6/ping-hostname.json b/tests/fixtures/osx-10.14.6/ping-hostname.json new file mode 100644 index 00000000..7e3acfbf --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping-hostname.json @@ -0,0 +1 @@ +{"destination_ip": "151.101.1.67", "data_bytes": 56, "pattern": null, "destination": "cnn.com", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 28.042, "round_trip_ms_avg": 34.67, "round_trip_ms_max": 41.182, "round_trip_ms_stddev": 5.365, "responses": [{"type": "reply", "bytes": 64, "response_ip": "151.101.1.67", "icmp_seq": 0, "ttl": 59, "time_ms": 28.042, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "151.101.1.67", "icmp_seq": 1, "ttl": 59, "time_ms": 34.786, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "151.101.1.67", "icmp_seq": 2, "ttl": 59, "time_ms": 41.182, "duplicate": false}]} diff --git a/tests/fixtures/osx-10.14.6/ping-hostname.out b/tests/fixtures/osx-10.14.6/ping-hostname.out new file mode 100644 index 00000000..8e723329 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping-hostname.out @@ -0,0 +1,8 @@ +PING cnn.com (151.101.1.67): 56 data bytes +64 bytes from 151.101.1.67: icmp_seq=0 ttl=59 time=28.042 ms +64 bytes from 151.101.1.67: icmp_seq=1 ttl=59 time=34.786 ms +64 bytes from 151.101.1.67: icmp_seq=2 ttl=59 time=41.182 ms + +--- cnn.com ping statistics --- +3 packets transmitted, 3 packets received, 0.0% packet loss +round-trip min/avg/max/stddev = 28.042/34.670/41.182/5.365 ms diff --git a/tests/fixtures/osx-10.14.6/ping-ip-dup.json b/tests/fixtures/osx-10.14.6/ping-ip-dup.json new file mode 100644 index 00000000..5688383e --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping-ip-dup.json @@ -0,0 +1 @@ +{"destination_ip": "192.168.1.255", "data_bytes": 56, "pattern": null, "destination": "192.168.1.255", "packets_transmitted": 2, "packets_received": 2, "packet_loss_percent": 0.0, "duplicates": 13, "round_trip_ms_min": 0.235, "round_trip_ms_avg": 226.389, "round_trip_ms_max": 1084.262, "round_trip_ms_stddev": 344.729, "responses": [{"type": "reply", "bytes": 64, "response_ip": "192.168.1.221", "icmp_seq": 0, "ttl": 64, "time_ms": 0.235, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "192.168.1.88", "icmp_seq": 0, "ttl": 64, "time_ms": 4.224, "duplicate": true}, {"type": "reply", "bytes": 64, "response_ip": "192.168.1.89", "icmp_seq": 0, "ttl": 64, "time_ms": 8.37, "duplicate": true}, {"type": "reply", "bytes": 64, "response_ip": "192.168.1.72", "icmp_seq": 0, "ttl": 64, "time_ms": 62.635, "duplicate": true}, {"type": "reply", "bytes": 64, "response_ip": "192.168.1.246", "icmp_seq": 0, "ttl": 255, "time_ms": 62.805, "duplicate": true}, {"type": "reply", "bytes": 64, "response_ip": "192.168.1.78", "icmp_seq": 0, "ttl": 128, "time_ms": 63.803, "duplicate": true}, {"type": "reply", "bytes": 64, "response_ip": "192.168.1.251", "icmp_seq": 0, "ttl": 64, "time_ms": 63.857, "duplicate": true}, {"type": "reply", "bytes": 64, "response_ip": "192.168.1.217", "icmp_seq": 0, "ttl": 255, "time_ms": 672.974, "duplicate": true}, {"type": "reply", "bytes": 64, "response_ip": "192.168.1.186", "icmp_seq": 0, "ttl": 64, "time_ms": 673.123, "duplicate": true}, {"type": "reply", "bytes": 64, "response_ip": "192.168.1.75", "icmp_seq": 0, "ttl": 64, "time_ms": 673.358, "duplicate": true}, {"type": "reply", "bytes": 64, "response_ip": "192.168.1.221", "icmp_seq": 1, "ttl": 64, "time_ms": 0.291, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "192.168.1.78", "icmp_seq": 1, "ttl": 128, "time_ms": 7.898, "duplicate": true}, {"type": "reply", "bytes": 64, "response_ip": "192.168.1.88", "icmp_seq": 1, "ttl": 64, "time_ms": 7.927, "duplicate": true}, {"type": "reply", "bytes": 64, "response_ip": "192.168.1.89", "icmp_seq": 1, "ttl": 64, "time_ms": 10.077, "duplicate": true}, {"type": "reply", "bytes": 64, "response_ip": "192.168.1.250", "icmp_seq": 0, "ttl": 64, "time_ms": 1084.262, "duplicate": true}]} diff --git a/tests/fixtures/osx-10.14.6/ping-ip-dup.out b/tests/fixtures/osx-10.14.6/ping-ip-dup.out new file mode 100644 index 00000000..4cbc8aa8 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping-ip-dup.out @@ -0,0 +1,20 @@ +PING 192.168.1.255 (192.168.1.255): 56 data bytes +64 bytes from 192.168.1.221: icmp_seq=0 ttl=64 time=0.235 ms +64 bytes from 192.168.1.88: icmp_seq=0 ttl=64 time=4.224 ms +64 bytes from 192.168.1.89: icmp_seq=0 ttl=64 time=8.370 ms +64 bytes from 192.168.1.72: icmp_seq=0 ttl=64 time=62.635 ms +64 bytes from 192.168.1.246: icmp_seq=0 ttl=255 time=62.805 ms +64 bytes from 192.168.1.78: icmp_seq=0 ttl=128 time=63.803 ms +64 bytes from 192.168.1.251: icmp_seq=0 ttl=64 time=63.857 ms +64 bytes from 192.168.1.217: icmp_seq=0 ttl=255 time=672.974 ms +64 bytes from 192.168.1.186: icmp_seq=0 ttl=64 time=673.123 ms +64 bytes from 192.168.1.75: icmp_seq=0 ttl=64 time=673.358 ms +64 bytes from 192.168.1.221: icmp_seq=1 ttl=64 time=0.291 ms +64 bytes from 192.168.1.78: icmp_seq=1 ttl=128 time=7.898 ms +64 bytes from 192.168.1.88: icmp_seq=1 ttl=64 time=7.927 ms +64 bytes from 192.168.1.89: icmp_seq=1 ttl=64 time=10.077 ms +64 bytes from 192.168.1.250: icmp_seq=0 ttl=64 time=1084.262 ms + +--- 192.168.1.255 ping statistics --- +2 packets transmitted, 2 packets received, +13 duplicates, 0.0% packet loss +round-trip min/avg/max/stddev = 0.235/226.389/1084.262/344.729 ms diff --git a/tests/fixtures/osx-10.14.6/ping-ip-p.json b/tests/fixtures/osx-10.14.6/ping-ip-p.json new file mode 100644 index 00000000..8831c4db --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping-ip-p.json @@ -0,0 +1 @@ +{"destination_ip": "127.0.0.1", "data_bytes": 56, "pattern": "0xff", "destination": "127.0.0.1", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.05, "round_trip_ms_avg": 0.078, "round_trip_ms_max": 0.104, "round_trip_ms_stddev": 0.022, "responses": [{"type": "reply", "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.05, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.104, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.079, "duplicate": false}]} diff --git a/tests/fixtures/osx-10.14.6/ping-ip-p.out b/tests/fixtures/osx-10.14.6/ping-ip-p.out new file mode 100644 index 00000000..2f2948b4 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping-ip-p.out @@ -0,0 +1,9 @@ +PATTERN: 0xff +PING 127.0.0.1 (127.0.0.1): 56 data bytes +64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.050 ms +64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.104 ms +64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.079 ms + +--- 127.0.0.1 ping statistics --- +3 packets transmitted, 3 packets received, 0.0% packet loss +round-trip min/avg/max/stddev = 0.050/0.078/0.104/0.022 ms diff --git a/tests/fixtures/osx-10.14.6/ping-ip-s.json b/tests/fixtures/osx-10.14.6/ping-ip-s.json new file mode 100644 index 00000000..6fc090d9 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping-ip-s.json @@ -0,0 +1 @@ +{"destination_ip": "127.0.0.1", "data_bytes": 1400, "pattern": null, "destination": "127.0.0.1", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.053, "round_trip_ms_avg": 0.083, "round_trip_ms_max": 0.108, "round_trip_ms_stddev": 0.023, "responses": [{"type": "reply", "bytes": 1408, "response_ip": "127.0.0.1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.053, "duplicate": false}, {"type": "reply", "bytes": 1408, "response_ip": "127.0.0.1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.108, "duplicate": false}, {"type": "reply", "bytes": 1408, "response_ip": "127.0.0.1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.089, "duplicate": false}]} diff --git a/tests/fixtures/osx-10.14.6/ping-ip-s.out b/tests/fixtures/osx-10.14.6/ping-ip-s.out new file mode 100644 index 00000000..2f9471f5 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping-ip-s.out @@ -0,0 +1,8 @@ +PING 127.0.0.1 (127.0.0.1): 1400 data bytes +1408 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.053 ms +1408 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.108 ms +1408 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.089 ms + +--- 127.0.0.1 ping statistics --- +3 packets transmitted, 3 packets received, 0.0% packet loss +round-trip min/avg/max/stddev = 0.053/0.083/0.108/0.023 ms diff --git a/tests/fixtures/osx-10.14.6/ping-ip.json b/tests/fixtures/osx-10.14.6/ping-ip.json new file mode 100644 index 00000000..4c2fb14c --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping-ip.json @@ -0,0 +1 @@ +{"destination_ip": "127.0.0.1", "data_bytes": 56, "pattern": null, "destination": "127.0.0.1", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.05, "round_trip_ms_avg": 0.066, "round_trip_ms_max": 0.095, "round_trip_ms_stddev": 0.021, "responses": [{"type": "reply", "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.052, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.095, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.05, "duplicate": false}]} diff --git a/tests/fixtures/osx-10.14.6/ping-ip.out b/tests/fixtures/osx-10.14.6/ping-ip.out new file mode 100644 index 00000000..eecb4cdc --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping-ip.out @@ -0,0 +1,8 @@ +PING 127.0.0.1 (127.0.0.1): 56 data bytes +64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.052 ms +64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.095 ms +64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.050 ms + +--- 127.0.0.1 ping statistics --- +3 packets transmitted, 3 packets received, 0.0% packet loss +round-trip min/avg/max/stddev = 0.050/0.066/0.095/0.021 ms diff --git a/tests/fixtures/osx-10.14.6/ping6-hostname-p.json b/tests/fixtures/osx-10.14.6/ping6-hostname-p.json new file mode 100644 index 00000000..3c49bfd1 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping6-hostname-p.json @@ -0,0 +1 @@ +{"source_ip": "2600:1700:bab0:d40:2595:8c97:ad16:749a", "destination_ip": "2a04:4e42:200::323", "data_bytes": 56, "pattern": "0xff", "destination": "cnn.com", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 32.992, "round_trip_ms_avg": 34.606, "round_trip_ms_max": 36.07, "round_trip_ms_stddev": 1.261, "responses": [{"type": "reply", "bytes": 16, "response_ip": "2a04:4e42:200::323", "icmp_seq": 0, "ttl": 59, "time_ms": 32.992, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "2a04:4e42:200::323", "icmp_seq": 1, "ttl": 59, "time_ms": 34.757, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "2a04:4e42:200::323", "icmp_seq": 2, "ttl": 59, "time_ms": 36.07, "duplicate": false}]} diff --git a/tests/fixtures/osx-10.14.6/ping6-hostname-p.out b/tests/fixtures/osx-10.14.6/ping6-hostname-p.out new file mode 100644 index 00000000..6211b79d --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping6-hostname-p.out @@ -0,0 +1,9 @@ +PATTERN: 0xff +PING6(56=40+8+8 bytes) 2600:1700:bab0:d40:2595:8c97:ad16:749a --> 2a04:4e42:200::323 +16 bytes from 2a04:4e42:200::323, icmp_seq=0 hlim=59 time=32.992 ms +16 bytes from 2a04:4e42:200::323, icmp_seq=1 hlim=59 time=34.757 ms +16 bytes from 2a04:4e42:200::323, icmp_seq=2 hlim=59 time=36.070 ms + +--- cnn.com ping6 statistics --- +3 packets transmitted, 3 packets received, 0.0% packet loss +round-trip min/avg/max/std-dev = 32.992/34.606/36.070/1.261 ms diff --git a/tests/fixtures/osx-10.14.6/ping6-hostname-s.json b/tests/fixtures/osx-10.14.6/ping6-hostname-s.json new file mode 100644 index 00000000..1eb1ccde --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping6-hostname-s.json @@ -0,0 +1 @@ +{"source_ip": "2600:1700:bab0:d40:2595:8c97:ad16:749a", "destination_ip": "2a04:4e42:600::323", "data_bytes": 128, "pattern": null, "destination": "cnn.com", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 25.933, "round_trip_ms_avg": 38.979, "round_trip_ms_max": 64.712, "round_trip_ms_stddev": 18.197, "responses": [{"type": "reply", "bytes": 88, "response_ip": "2a04:4e42:600::323", "icmp_seq": 0, "ttl": 59, "time_ms": 26.292, "duplicate": false}, {"type": "reply", "bytes": 88, "response_ip": "2a04:4e42:600::323", "icmp_seq": 1, "ttl": 59, "time_ms": 64.712, "duplicate": false}, {"type": "reply", "bytes": 88, "response_ip": "2a04:4e42:600::323", "icmp_seq": 2, "ttl": 59, "time_ms": 25.933, "duplicate": false}]} diff --git a/tests/fixtures/osx-10.14.6/ping6-hostname-s.out b/tests/fixtures/osx-10.14.6/ping6-hostname-s.out new file mode 100644 index 00000000..e52949a2 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping6-hostname-s.out @@ -0,0 +1,8 @@ +PING6(128=40+8+80 bytes) 2600:1700:bab0:d40:2595:8c97:ad16:749a --> 2a04:4e42:600::323 +88 bytes from 2a04:4e42:600::323, icmp_seq=0 hlim=59 time=26.292 ms +88 bytes from 2a04:4e42:600::323, icmp_seq=1 hlim=59 time=64.712 ms +88 bytes from 2a04:4e42:600::323, icmp_seq=2 hlim=59 time=25.933 ms + +--- cnn.com ping6 statistics --- +3 packets transmitted, 3 packets received, 0.0% packet loss +round-trip min/avg/max/std-dev = 25.933/38.979/64.712/18.197 ms diff --git a/tests/fixtures/osx-10.14.6/ping6-hostname.json b/tests/fixtures/osx-10.14.6/ping6-hostname.json new file mode 100644 index 00000000..2b9f0b2b --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping6-hostname.json @@ -0,0 +1 @@ +{"source_ip": "2600:1700:bab0:d40:2595:8c97:ad16:749a", "destination_ip": "2a04:4e42:200::323", "data_bytes": 56, "pattern": null, "destination": "cnn.com", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 27.684, "round_trip_ms_avg": 29.836, "round_trip_ms_max": 31.824, "round_trip_ms_stddev": 1.694, "responses": [{"type": "reply", "bytes": 16, "response_ip": "2a04:4e42:200::323", "icmp_seq": 0, "ttl": 59, "time_ms": 27.684, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "2a04:4e42:200::323", "icmp_seq": 1, "ttl": 59, "time_ms": 31.824, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "2a04:4e42:200::323", "icmp_seq": 2, "ttl": 59, "time_ms": 30.0, "duplicate": false}]} diff --git a/tests/fixtures/osx-10.14.6/ping6-hostname.out b/tests/fixtures/osx-10.14.6/ping6-hostname.out new file mode 100644 index 00000000..9a0634ba --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping6-hostname.out @@ -0,0 +1,8 @@ +PING6(56=40+8+8 bytes) 2600:1700:bab0:d40:2595:8c97:ad16:749a --> 2a04:4e42:200::323 +16 bytes from 2a04:4e42:200::323, icmp_seq=0 hlim=59 time=27.684 ms +16 bytes from 2a04:4e42:200::323, icmp_seq=1 hlim=59 time=31.824 ms +16 bytes from 2a04:4e42:200::323, icmp_seq=2 hlim=59 time=30.000 ms + +--- cnn.com ping6 statistics --- +3 packets transmitted, 3 packets received, 0.0% packet loss +round-trip min/avg/max/std-dev = 27.684/29.836/31.824/1.694 ms diff --git a/tests/fixtures/osx-10.14.6/ping6-ip-dup.json b/tests/fixtures/osx-10.14.6/ping6-ip-dup.json new file mode 100644 index 00000000..4ec30cd9 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping6-ip-dup.json @@ -0,0 +1 @@ +{"source_ip": "fe80::c48:5896:526d:81ba%en0", "destination_ip": "ff02::1%en0", "data_bytes": 56, "pattern": null, "destination": "ff02::1%en0", "packets_transmitted": 5, "packets_received": 5, "packet_loss_percent": 0.0, "duplicates": 58, "round_trip_ms_min": 0.302, "round_trip_ms_avg": 180.26, "round_trip_ms_max": 749.182, "round_trip_ms_stddev": 250.393, "responses": [{"type": "reply", "bytes": 16, "response_ip": "fe80::c48:5896:526d:81ba%en0", "icmp_seq": 0, "ttl": 64, "time_ms": 0.302, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "fe80::c1cb:715d:bc3e:b8a0%en0", "icmp_seq": 0, "ttl": 64, "time_ms": 0.56, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::3e37:86ff:fe15:adf7%en0", "icmp_seq": 0, "ttl": 64, "time_ms": 2.677, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::4ab:6f0f:bdb6:9dd3%en0", "icmp_seq": 0, "ttl": 64, "time_ms": 2.765, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::feae:34ff:fea1:3a80%en0", "icmp_seq": 0, "ttl": 64, "time_ms": 2.976, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::feae:34ff:fea1:3a82%en0", "icmp_seq": 0, "ttl": 64, "time_ms": 3.045, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::3e37:86ff:fe15:ddb3%en0", "icmp_seq": 0, "ttl": 64, "time_ms": 6.182, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::10ff:f3b1:fe91:e200%en0", "icmp_seq": 0, "ttl": 64, "time_ms": 10.536, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::da30:62ff:fe2e:86cf%en0", "icmp_seq": 0, "ttl": 64, "time_ms": 102.839, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::18a5:fc21:6794:b605%en0", "icmp_seq": 0, "ttl": 64, "time_ms": 104.367, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::ced:c70f:bb6d:804a%en0", "icmp_seq": 0, "ttl": 64, "time_ms": 195.421, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::9eb6:54ff:fe5a:5a7c%en0", "icmp_seq": 0, "ttl": 64, "time_ms": 244.586, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::4ad7:5ff:fef1:86e8%en0", "icmp_seq": 0, "ttl": 64, "time_ms": 699.725, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::bd:798d:17ea:17a5%en0", "icmp_seq": 0, "ttl": 64, "time_ms": 704.087, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "2600:1700:bab0:d40:5214:79ff:fe12:423e", "icmp_seq": 0, "ttl": 64, "time_ms": 704.996, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::c48:5896:526d:81ba%en0", "icmp_seq": 1, "ttl": 64, "time_ms": 0.458, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "fe80::c1cb:715d:bc3e:b8a0%en0", "icmp_seq": 1, "ttl": 64, "time_ms": 0.776, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::3e37:86ff:fe15:adf7%en0", "icmp_seq": 1, "ttl": 64, "time_ms": 4.926, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::4ab:6f0f:bdb6:9dd3%en0", "icmp_seq": 1, "ttl": 64, "time_ms": 5.134, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::feae:34ff:fea1:3a80%en0", "icmp_seq": 1, "ttl": 64, "time_ms": 5.242, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::feae:34ff:fea1:3a82%en0", "icmp_seq": 1, "ttl": 64, "time_ms": 5.444, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::3e37:86ff:fe15:ddb3%en0", "icmp_seq": 1, "ttl": 64, "time_ms": 5.657, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::10ff:f3b1:fe91:e200%en0", "icmp_seq": 1, "ttl": 64, "time_ms": 21.339, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::9eb6:54ff:fe5a:5a7c%en0", "icmp_seq": 1, "ttl": 64, "time_ms": 53.804, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::da30:62ff:fe2e:86cf%en0", "icmp_seq": 1, "ttl": 64, "time_ms": 748.798, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::18a5:fc21:6794:b605%en0", "icmp_seq": 1, "ttl": 64, "time_ms": 749.069, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::1012:688e:7e41:6338%en0", "icmp_seq": 1, "ttl": 64, "time_ms": 749.182, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::c48:5896:526d:81ba%en0", "icmp_seq": 2, "ttl": 64, "time_ms": 0.385, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "fe80::c1cb:715d:bc3e:b8a0%en0", "icmp_seq": 2, "ttl": 64, "time_ms": 0.713, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::3e37:86ff:fe15:adf7%en0", "icmp_seq": 2, "ttl": 64, "time_ms": 6.868, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::4ab:6f0f:bdb6:9dd3%en0", "icmp_seq": 2, "ttl": 64, "time_ms": 6.991, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::feae:34ff:fea1:3a80%en0", "icmp_seq": 2, "ttl": 64, "time_ms": 7.06, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::feae:34ff:fea1:3a82%en0", "icmp_seq": 2, "ttl": 64, "time_ms": 7.174, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::3e37:86ff:fe15:ddb3%en0", "icmp_seq": 2, "ttl": 64, "time_ms": 9.045, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::10ff:f3b1:fe91:e200%en0", "icmp_seq": 2, "ttl": 64, "time_ms": 11.193, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::4ad7:5ff:fef1:86e8%en0", "icmp_seq": 2, "ttl": 64, "time_ms": 141.374, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "2600:1700:bab0:d40:5214:79ff:fe12:423e", "icmp_seq": 2, "ttl": 64, "time_ms": 141.53, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::bd:798d:17ea:17a5%en0", "icmp_seq": 2, "ttl": 64, "time_ms": 141.565, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::c5d:5f82:6ce5:b9b9%en0", "icmp_seq": 2, "ttl": 64, "time_ms": 142.862, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::8d:8cfc:35ac:578f%en0", "icmp_seq": 2, "ttl": 64, "time_ms": 145.985, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::da30:62ff:fe2e:86cf%en0", "icmp_seq": 2, "ttl": 64, "time_ms": 566.996, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::18a5:fc21:6794:b605%en0", "icmp_seq": 2, "ttl": 64, "time_ms": 567.127, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::1012:688e:7e41:6338%en0", "icmp_seq": 2, "ttl": 64, "time_ms": 567.184, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::9eb6:54ff:fe5a:5a7c%en0", "icmp_seq": 2, "ttl": 64, "time_ms": 657.246, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::ced:c70f:bb6d:804a%en0", "icmp_seq": 2, "ttl": 64, "time_ms": 657.567, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::c48:5896:526d:81ba%en0", "icmp_seq": 3, "ttl": 64, "time_ms": 0.485, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "fe80::c1cb:715d:bc3e:b8a0%en0", "icmp_seq": 3, "ttl": 64, "time_ms": 0.948, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::3e37:86ff:fe15:adf7%en0", "icmp_seq": 3, "ttl": 64, "time_ms": 6.796, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::4ab:6f0f:bdb6:9dd3%en0", "icmp_seq": 3, "ttl": 64, "time_ms": 6.918, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::feae:34ff:fea1:3a80%en0", "icmp_seq": 3, "ttl": 64, "time_ms": 6.994, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::feae:34ff:fea1:3a82%en0", "icmp_seq": 3, "ttl": 64, "time_ms": 7.059, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::3e37:86ff:fe15:ddb3%en0", "icmp_seq": 3, "ttl": 64, "time_ms": 7.122, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::10ff:f3b1:fe91:e200%en0", "icmp_seq": 3, "ttl": 64, "time_ms": 9.741, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::8d:8cfc:35ac:578f%en0", "icmp_seq": 3, "ttl": 64, "time_ms": 152.829, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "2600:1700:bab0:d40:5214:79ff:fe12:423e", "icmp_seq": 3, "ttl": 64, "time_ms": 158.816, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::bd:798d:17ea:17a5%en0", "icmp_seq": 3, "ttl": 64, "time_ms": 158.879, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::c5d:5f82:6ce5:b9b9%en0", "icmp_seq": 3, "ttl": 64, "time_ms": 158.956, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::4ad7:5ff:fef1:86e8%en0", "icmp_seq": 3, "ttl": 64, "time_ms": 159.015, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::18a5:fc21:6794:b605%en0", "icmp_seq": 3, "ttl": 64, "time_ms": 377.87, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::1012:688e:7e41:6338%en0", "icmp_seq": 3, "ttl": 64, "time_ms": 377.963, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::da30:62ff:fe2e:86cf%en0", "icmp_seq": 3, "ttl": 64, "time_ms": 381.785, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::9eb6:54ff:fe5a:5a7c%en0", "icmp_seq": 3, "ttl": 64, "time_ms": 470.009, "duplicate": true}, {"type": "reply", "bytes": 16, "response_ip": "fe80::c48:5896:526d:81ba%en0", "icmp_seq": 4, "ttl": 64, "time_ms": 0.425, "duplicate": false}]} diff --git a/tests/fixtures/osx-10.14.6/ping6-ip-dup.out b/tests/fixtures/osx-10.14.6/ping6-ip-dup.out new file mode 100644 index 00000000..614417c0 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping6-ip-dup.out @@ -0,0 +1,68 @@ +PING6(56=40+8+8 bytes) fe80::c48:5896:526d:81ba%en0 --> ff02::1%en0 +16 bytes from fe80::c48:5896:526d:81ba%en0, icmp_seq=0 hlim=64 time=0.302 ms +16 bytes from fe80::c1cb:715d:bc3e:b8a0%en0, icmp_seq=0 hlim=64 time=0.560 ms +16 bytes from fe80::3e37:86ff:fe15:adf7%en0, icmp_seq=0 hlim=64 time=2.677 ms +16 bytes from fe80::4ab:6f0f:bdb6:9dd3%en0, icmp_seq=0 hlim=64 time=2.765 ms +16 bytes from fe80::feae:34ff:fea1:3a80%en0, icmp_seq=0 hlim=64 time=2.976 ms +16 bytes from fe80::feae:34ff:fea1:3a82%en0, icmp_seq=0 hlim=64 time=3.045 ms +16 bytes from fe80::3e37:86ff:fe15:ddb3%en0, icmp_seq=0 hlim=64 time=6.182 ms +16 bytes from fe80::10ff:f3b1:fe91:e200%en0, icmp_seq=0 hlim=64 time=10.536 ms +16 bytes from fe80::da30:62ff:fe2e:86cf%en0, icmp_seq=0 hlim=64 time=102.839 ms +16 bytes from fe80::18a5:fc21:6794:b605%en0, icmp_seq=0 hlim=64 time=104.367 ms +16 bytes from fe80::ced:c70f:bb6d:804a%en0, icmp_seq=0 hlim=64 time=195.421 ms +16 bytes from fe80::9eb6:54ff:fe5a:5a7c%en0, icmp_seq=0 hlim=64 time=244.586 ms +16 bytes from fe80::4ad7:5ff:fef1:86e8%en0, icmp_seq=0 hlim=64 time=699.725 ms +16 bytes from fe80::bd:798d:17ea:17a5%en0, icmp_seq=0 hlim=64 time=704.087 ms +16 bytes from 2600:1700:bab0:d40:5214:79ff:fe12:423e, icmp_seq=0 hlim=64 time=704.996 ms +16 bytes from fe80::c48:5896:526d:81ba%en0, icmp_seq=1 hlim=64 time=0.458 ms +16 bytes from fe80::c1cb:715d:bc3e:b8a0%en0, icmp_seq=1 hlim=64 time=0.776 ms +16 bytes from fe80::3e37:86ff:fe15:adf7%en0, icmp_seq=1 hlim=64 time=4.926 ms +16 bytes from fe80::4ab:6f0f:bdb6:9dd3%en0, icmp_seq=1 hlim=64 time=5.134 ms +16 bytes from fe80::feae:34ff:fea1:3a80%en0, icmp_seq=1 hlim=64 time=5.242 ms +16 bytes from fe80::feae:34ff:fea1:3a82%en0, icmp_seq=1 hlim=64 time=5.444 ms +16 bytes from fe80::3e37:86ff:fe15:ddb3%en0, icmp_seq=1 hlim=64 time=5.657 ms +16 bytes from fe80::10ff:f3b1:fe91:e200%en0, icmp_seq=1 hlim=64 time=21.339 ms +16 bytes from fe80::9eb6:54ff:fe5a:5a7c%en0, icmp_seq=1 hlim=64 time=53.804 ms +16 bytes from fe80::da30:62ff:fe2e:86cf%en0, icmp_seq=1 hlim=64 time=748.798 ms +16 bytes from fe80::18a5:fc21:6794:b605%en0, icmp_seq=1 hlim=64 time=749.069 ms +16 bytes from fe80::1012:688e:7e41:6338%en0, icmp_seq=1 hlim=64 time=749.182 ms +16 bytes from fe80::c48:5896:526d:81ba%en0, icmp_seq=2 hlim=64 time=0.385 ms +16 bytes from fe80::c1cb:715d:bc3e:b8a0%en0, icmp_seq=2 hlim=64 time=0.713 ms +16 bytes from fe80::3e37:86ff:fe15:adf7%en0, icmp_seq=2 hlim=64 time=6.868 ms +16 bytes from fe80::4ab:6f0f:bdb6:9dd3%en0, icmp_seq=2 hlim=64 time=6.991 ms +16 bytes from fe80::feae:34ff:fea1:3a80%en0, icmp_seq=2 hlim=64 time=7.060 ms +16 bytes from fe80::feae:34ff:fea1:3a82%en0, icmp_seq=2 hlim=64 time=7.174 ms +16 bytes from fe80::3e37:86ff:fe15:ddb3%en0, icmp_seq=2 hlim=64 time=9.045 ms +16 bytes from fe80::10ff:f3b1:fe91:e200%en0, icmp_seq=2 hlim=64 time=11.193 ms +16 bytes from fe80::4ad7:5ff:fef1:86e8%en0, icmp_seq=2 hlim=64 time=141.374 ms +16 bytes from 2600:1700:bab0:d40:5214:79ff:fe12:423e, icmp_seq=2 hlim=64 time=141.530 ms +16 bytes from fe80::bd:798d:17ea:17a5%en0, icmp_seq=2 hlim=64 time=141.565 ms +16 bytes from fe80::c5d:5f82:6ce5:b9b9%en0, icmp_seq=2 hlim=64 time=142.862 ms +16 bytes from fe80::8d:8cfc:35ac:578f%en0, icmp_seq=2 hlim=64 time=145.985 ms +16 bytes from fe80::da30:62ff:fe2e:86cf%en0, icmp_seq=2 hlim=64 time=566.996 ms +16 bytes from fe80::18a5:fc21:6794:b605%en0, icmp_seq=2 hlim=64 time=567.127 ms +16 bytes from fe80::1012:688e:7e41:6338%en0, icmp_seq=2 hlim=64 time=567.184 ms +16 bytes from fe80::9eb6:54ff:fe5a:5a7c%en0, icmp_seq=2 hlim=64 time=657.246 ms +16 bytes from fe80::ced:c70f:bb6d:804a%en0, icmp_seq=2 hlim=64 time=657.567 ms +16 bytes from fe80::c48:5896:526d:81ba%en0, icmp_seq=3 hlim=64 time=0.485 ms +16 bytes from fe80::c1cb:715d:bc3e:b8a0%en0, icmp_seq=3 hlim=64 time=0.948 ms +16 bytes from fe80::3e37:86ff:fe15:adf7%en0, icmp_seq=3 hlim=64 time=6.796 ms +16 bytes from fe80::4ab:6f0f:bdb6:9dd3%en0, icmp_seq=3 hlim=64 time=6.918 ms +16 bytes from fe80::feae:34ff:fea1:3a80%en0, icmp_seq=3 hlim=64 time=6.994 ms +16 bytes from fe80::feae:34ff:fea1:3a82%en0, icmp_seq=3 hlim=64 time=7.059 ms +16 bytes from fe80::3e37:86ff:fe15:ddb3%en0, icmp_seq=3 hlim=64 time=7.122 ms +16 bytes from fe80::10ff:f3b1:fe91:e200%en0, icmp_seq=3 hlim=64 time=9.741 ms +16 bytes from fe80::8d:8cfc:35ac:578f%en0, icmp_seq=3 hlim=64 time=152.829 ms +16 bytes from 2600:1700:bab0:d40:5214:79ff:fe12:423e, icmp_seq=3 hlim=64 time=158.816 ms +16 bytes from fe80::bd:798d:17ea:17a5%en0, icmp_seq=3 hlim=64 time=158.879 ms +16 bytes from fe80::c5d:5f82:6ce5:b9b9%en0, icmp_seq=3 hlim=64 time=158.956 ms +16 bytes from fe80::4ad7:5ff:fef1:86e8%en0, icmp_seq=3 hlim=64 time=159.015 ms +16 bytes from fe80::18a5:fc21:6794:b605%en0, icmp_seq=3 hlim=64 time=377.870 ms +16 bytes from fe80::1012:688e:7e41:6338%en0, icmp_seq=3 hlim=64 time=377.963 ms +16 bytes from fe80::da30:62ff:fe2e:86cf%en0, icmp_seq=3 hlim=64 time=381.785 ms +16 bytes from fe80::9eb6:54ff:fe5a:5a7c%en0, icmp_seq=3 hlim=64 time=470.009 ms +16 bytes from fe80::c48:5896:526d:81ba%en0, icmp_seq=4 hlim=64 time=0.425 ms + +--- ff02::1%en0 ping6 statistics --- +5 packets transmitted, 5 packets received, +58 duplicates, 0.0% packet loss +round-trip min/avg/max/std-dev = 0.302/180.260/749.182/250.393 ms diff --git a/tests/fixtures/osx-10.14.6/ping6-ip-p.json b/tests/fixtures/osx-10.14.6/ping6-ip-p.json new file mode 100644 index 00000000..1f07d57d --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping6-ip-p.json @@ -0,0 +1 @@ +{"source_ip": "::1", "destination_ip": "::1", "data_bytes": 56, "pattern": "0xff", "destination": "::1", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.077, "round_trip_ms_avg": 0.124, "round_trip_ms_max": 0.156, "round_trip_ms_stddev": 0.034, "responses": [{"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.077, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.156, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.139, "duplicate": false}]} diff --git a/tests/fixtures/osx-10.14.6/ping6-ip-p.out b/tests/fixtures/osx-10.14.6/ping6-ip-p.out new file mode 100644 index 00000000..f1a18f71 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping6-ip-p.out @@ -0,0 +1,9 @@ +PATTERN: 0xff +PING6(56=40+8+8 bytes) ::1 --> ::1 +16 bytes from ::1, icmp_seq=0 hlim=64 time=0.077 ms +16 bytes from ::1, icmp_seq=1 hlim=64 time=0.156 ms +16 bytes from ::1, icmp_seq=2 hlim=64 time=0.139 ms + +--- ::1 ping6 statistics --- +3 packets transmitted, 3 packets received, 0.0% packet loss +round-trip min/avg/max/std-dev = 0.077/0.124/0.156/0.034 ms diff --git a/tests/fixtures/osx-10.14.6/ping6-ip-s.json b/tests/fixtures/osx-10.14.6/ping6-ip-s.json new file mode 100644 index 00000000..0059f6f6 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping6-ip-s.json @@ -0,0 +1 @@ +{"source_ip": "::1", "destination_ip": "::1", "data_bytes": 1448, "pattern": null, "destination": "::1", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.093, "round_trip_ms_avg": 0.135, "round_trip_ms_max": 0.161, "round_trip_ms_stddev": 0.03, "responses": [{"type": "reply", "bytes": 1408, "response_ip": "::1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.093, "duplicate": false}, {"type": "reply", "bytes": 1408, "response_ip": "::1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.161, "duplicate": false}, {"type": "reply", "bytes": 1408, "response_ip": "::1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.152, "duplicate": false}]} diff --git a/tests/fixtures/osx-10.14.6/ping6-ip-s.out b/tests/fixtures/osx-10.14.6/ping6-ip-s.out new file mode 100644 index 00000000..981683d1 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping6-ip-s.out @@ -0,0 +1,8 @@ +PING6(1448=40+8+1400 bytes) ::1 --> ::1 +1408 bytes from ::1, icmp_seq=0 hlim=64 time=0.093 ms +1408 bytes from ::1, icmp_seq=1 hlim=64 time=0.161 ms +1408 bytes from ::1, icmp_seq=2 hlim=64 time=0.152 ms + +--- ::1 ping6 statistics --- +3 packets transmitted, 3 packets received, 0.0% packet loss +round-trip min/avg/max/std-dev = 0.093/0.135/0.161/0.030 ms diff --git a/tests/fixtures/osx-10.14.6/ping6-ip.json b/tests/fixtures/osx-10.14.6/ping6-ip.json new file mode 100644 index 00000000..93992d44 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping6-ip.json @@ -0,0 +1 @@ +{"source_ip": "::1", "destination_ip": "::1", "data_bytes": 56, "pattern": null, "destination": "::1", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.071, "round_trip_ms_avg": 0.115, "round_trip_ms_max": 0.153, "round_trip_ms_stddev": 0.034, "responses": [{"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.071, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.153, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.122, "duplicate": false}]} diff --git a/tests/fixtures/osx-10.14.6/ping6-ip.out b/tests/fixtures/osx-10.14.6/ping6-ip.out new file mode 100644 index 00000000..8a4d7b59 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/ping6-ip.out @@ -0,0 +1,8 @@ +PING6(56=40+8+8 bytes) ::1 --> ::1 +16 bytes from ::1, icmp_seq=0 hlim=64 time=0.071 ms +16 bytes from ::1, icmp_seq=1 hlim=64 time=0.153 ms +16 bytes from ::1, icmp_seq=2 hlim=64 time=0.122 ms + +--- ::1 ping6 statistics --- +3 packets transmitted, 3 packets received, 0.0% packet loss +round-trip min/avg/max/std-dev = 0.071/0.115/0.153/0.034 ms diff --git a/tests/fixtures/osx-10.14.6/traceroute-asn.json b/tests/fixtures/osx-10.14.6/traceroute-asn.json new file mode 100644 index 00000000..5ae90f6e --- /dev/null +++ b/tests/fixtures/osx-10.14.6/traceroute-asn.json @@ -0,0 +1 @@ +{"destination_ip": "8.8.8.8", "destination_name": "8.8.8.8", "hops": [{"hop": 1, "probes": [{"annotation": null, "asn": 198949, "ip": "192.168.1.254", "name": "dsldevice", "rtt": 6.07}, {"annotation": null, "asn": 198949, "ip": "192.168.1.254", "name": "dsldevice", "rtt": 5.721}, {"annotation": null, "asn": 198949, "ip": "192.168.1.254", "name": "dsldevice", "rtt": 5.269}]}, {"hop": 2, "probes": [{"annotation": null, "asn": 0, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 160.025}, {"annotation": null, "asn": 0, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 178.69}, {"annotation": null, "asn": 0, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 33.759}]}, {"hop": 3, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 4, "probes": [{"annotation": null, "asn": 7018, "ip": "12.122.149.186", "name": "12.122.149.186", "rtt": 37.783}, {"annotation": null, "asn": 7018, "ip": "12.122.149.186", "name": "12.122.149.186", "rtt": 23.782}, {"annotation": null, "asn": 7018, "ip": "12.122.149.186", "name": "12.122.149.186", "rtt": 24.958}]}]} diff --git a/tests/fixtures/osx-10.14.6/traceroute-asn.out b/tests/fixtures/osx-10.14.6/traceroute-asn.out new file mode 100644 index 00000000..f7999273 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/traceroute-asn.out @@ -0,0 +1,5 @@ +traceroute to 8.8.8.8 (8.8.8.8), 4 hops max, 52 byte packets + 1 [AS198949] dsldevice (192.168.1.254) 6.070 ms 5.721 ms 5.269 ms + 2 [AS0] 76-220-24-1.lightspeed.sntcca.sbcglobal.net (76.220.24.1) 160.025 ms 178.690 ms 33.759 ms + 3 * * * + 4 [AS7018] 12.122.149.186 (12.122.149.186) 37.783 ms 23.782 ms 24.958 ms diff --git a/tests/fixtures/osx-10.14.6/traceroute-mult-addresses.json b/tests/fixtures/osx-10.14.6/traceroute-mult-addresses.json new file mode 100644 index 00000000..fce2ad3e --- /dev/null +++ b/tests/fixtures/osx-10.14.6/traceroute-mult-addresses.json @@ -0,0 +1 @@ +{"destination_ip": "151.101.129.67", "destination_name": "cnn.com", "hops": [{"hop": 1, "probes": [{"annotation": null, "asn": null, "ip": "192.168.1.254", "name": "dsldevice", "rtt": 4.478}, {"annotation": null, "asn": null, "ip": "192.168.1.254", "name": "dsldevice", "rtt": 3.907}, {"annotation": null, "asn": null, "ip": "192.168.1.254", "name": "dsldevice", "rtt": 4.849}]}, {"hop": 2, "probes": [{"annotation": null, "asn": null, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 23.53}, {"annotation": null, "asn": null, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 26.518}, {"annotation": null, "asn": null, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 23.48}]}, {"hop": 3, "probes": []}]} diff --git a/tests/fixtures/osx-10.14.6/traceroute-mult-addresses.out b/tests/fixtures/osx-10.14.6/traceroute-mult-addresses.out new file mode 100644 index 00000000..d8bf4220 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/traceroute-mult-addresses.out @@ -0,0 +1,5 @@ +traceroute: Warning: cnn.com has multiple addresses; using 151.101.129.67 +traceroute to cnn.com (151.101.129.67), 64 hops max, 52 byte packets + 1 dsldevice (192.168.1.254) 4.478 ms 3.907 ms 4.849 ms + 2 76-220-24-1.lightspeed.sntcca.sbcglobal.net (76.220.24.1) 23.530 ms 26.518 ms 23.480 ms + 3 * * \ No newline at end of file diff --git a/tests/fixtures/osx-10.14.6/traceroute-no-header.out b/tests/fixtures/osx-10.14.6/traceroute-no-header.out new file mode 100644 index 00000000..0c1932c3 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/traceroute-no-header.out @@ -0,0 +1,3 @@ + 1 dsldevice (192.168.1.254) 11.415 ms 3.934 ms 3.286 ms + 2 76-220-24-1.lightspeed.sntcca.sbcglobal.net (76.220.24.1) 24.174 ms 20.817 ms 27.771 ms + 3 * * * diff --git a/tests/fixtures/osx-10.14.6/traceroute-q.json b/tests/fixtures/osx-10.14.6/traceroute-q.json new file mode 100644 index 00000000..75e23ca5 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/traceroute-q.json @@ -0,0 +1 @@ +{"destination_ip": "8.8.8.8", "destination_name": "8.8.8.8", "hops": [{"hop": 1, "probes": [{"annotation": null, "asn": null, "ip": "192.168.1.254", "name": "dsldevice", "rtt": 3.317}, {"annotation": null, "asn": null, "ip": "192.168.1.254", "name": "dsldevice", "rtt": 6.373}, {"annotation": null, "asn": null, "ip": "192.168.1.254", "name": "dsldevice", "rtt": 6.967}, {"annotation": null, "asn": null, "ip": "192.168.1.254", "name": "dsldevice", "rtt": 5.299}, {"annotation": null, "asn": null, "ip": "192.168.1.254", "name": "dsldevice", "rtt": 4.605}]}, {"hop": 2, "probes": [{"annotation": null, "asn": null, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 28.829}, {"annotation": null, "asn": null, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 20.073}, {"annotation": null, "asn": null, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 26.238}, {"annotation": null, "asn": null, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 22.052}, {"annotation": null, "asn": null, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 22.519}]}, {"hop": 3, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}, {"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}]} diff --git a/tests/fixtures/osx-10.14.6/traceroute-q.out b/tests/fixtures/osx-10.14.6/traceroute-q.out new file mode 100644 index 00000000..6e181bc7 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/traceroute-q.out @@ -0,0 +1,4 @@ +traceroute to 8.8.8.8 (8.8.8.8), 3 hops max, 52 byte packets + 1 dsldevice (192.168.1.254) 3.317 ms 6.373 ms 6.967 ms 5.299 ms 4.605 ms + 2 76-220-24-1.lightspeed.sntcca.sbcglobal.net (76.220.24.1) 28.829 ms 20.073 ms 26.238 ms 22.052 ms 22.519 ms + 3 * * * * * diff --git a/tests/fixtures/osx-10.14.6/traceroute.json b/tests/fixtures/osx-10.14.6/traceroute.json new file mode 100644 index 00000000..19ac25c1 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/traceroute.json @@ -0,0 +1 @@ +{"destination_ip": "8.8.8.8", "destination_name": "8.8.8.8", "hops": [{"hop": 1, "probes": [{"annotation": null, "asn": null, "ip": "192.168.1.254", "name": "dsldevice", "rtt": 12.07}, {"annotation": null, "asn": null, "ip": "192.168.1.254", "name": "dsldevice", "rtt": 4.328}, {"annotation": null, "asn": null, "ip": "192.168.1.254", "name": "dsldevice", "rtt": 4.167}]}, {"hop": 2, "probes": [{"annotation": null, "asn": null, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 20.595}, {"annotation": null, "asn": null, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 26.13}, {"annotation": null, "asn": null, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 28.555}]}, {"hop": 3, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 4, "probes": [{"annotation": null, "asn": null, "ip": "12.122.149.186", "name": "12.122.149.186", "rtt": 149.663}, {"annotation": null, "asn": null, "ip": "12.122.149.186", "name": "12.122.149.186", "rtt": 27.761}, {"annotation": null, "asn": null, "ip": "12.122.149.186", "name": "12.122.149.186", "rtt": 160.709}]}, {"hop": 5, "probes": [{"annotation": null, "asn": null, "ip": "12.122.3.70", "name": "sffca22crs.ip.att.net", "rtt": 27.131}, {"annotation": null, "asn": null, "ip": "12.122.3.70", "name": "sffca22crs.ip.att.net", "rtt": 160.459}, {"annotation": null, "asn": null, "ip": "12.122.3.70", "name": "sffca22crs.ip.att.net", "rtt": 32.274}]}, {"hop": 6, "probes": [{"annotation": null, "asn": null, "ip": "12.122.163.61", "name": "12.122.163.61", "rtt": 143.143}, {"annotation": null, "asn": null, "ip": "12.122.163.61", "name": "12.122.163.61", "rtt": 27.034}, {"annotation": null, "asn": null, "ip": "12.122.163.61", "name": "12.122.163.61", "rtt": 152.676}]}, {"hop": 7, "probes": [{"annotation": null, "asn": null, "ip": "12.255.10.234", "name": "12.255.10.234", "rtt": 24.912}, {"annotation": null, "asn": null, "ip": "12.255.10.234", "name": "12.255.10.234", "rtt": 23.802}, {"annotation": null, "asn": null, "ip": "12.255.10.234", "name": "12.255.10.234", "rtt": 157.338}]}, {"hop": 8, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 9, "probes": [{"annotation": null, "asn": null, "ip": "8.8.8.8", "name": "dns.google", "rtt": 30.84}, {"annotation": null, "asn": null, "ip": "8.8.8.8", "name": "dns.google", "rtt": 22.503}, {"annotation": null, "asn": null, "ip": "8.8.8.8", "name": "dns.google", "rtt": 23.538}]}]} diff --git a/tests/fixtures/osx-10.14.6/traceroute.out b/tests/fixtures/osx-10.14.6/traceroute.out new file mode 100644 index 00000000..372c309a --- /dev/null +++ b/tests/fixtures/osx-10.14.6/traceroute.out @@ -0,0 +1,11 @@ +traceroute to 8.8.8.8 (8.8.8.8), 64 hops max, 52 byte packets + 1 dsldevice (192.168.1.254) 12.070 ms 4.328 ms 4.167 ms + 2 76-220-24-1.lightspeed.sntcca.sbcglobal.net (76.220.24.1) 20.595 ms 26.130 ms 28.555 ms + 3 * * * + 4 12.122.149.186 (12.122.149.186) 149.663 ms 27.761 ms 160.709 ms + 5 sffca22crs.ip.att.net (12.122.3.70) 27.131 ms 160.459 ms 32.274 ms + 6 12.122.163.61 (12.122.163.61) 143.143 ms 27.034 ms 152.676 ms + 7 12.255.10.234 (12.255.10.234) 24.912 ms 23.802 ms 157.338 ms + 8 * * * + 9 dns.google (8.8.8.8) 30.840 ms 22.503 ms 23.538 ms + diff --git a/tests/fixtures/osx-10.14.6/traceroute6-mult-addresses.json b/tests/fixtures/osx-10.14.6/traceroute6-mult-addresses.json new file mode 100644 index 00000000..badd27b3 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/traceroute6-mult-addresses.json @@ -0,0 +1 @@ +{"destination_ip": "2a04:4e42:200::323", "destination_name": "turner-tls.map.fastly.net", "hops": [{"hop": 1, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 2, "probes": [{"annotation": null, "asn": null, "ip": "2001:506:6000:11b:71:156:212:143", "name": null, "rtt": 27.635}, {"annotation": null, "asn": null, "ip": "2001:506:6000:11b:71:156:212:143", "name": null, "rtt": 20.383}, {"annotation": null, "asn": null, "ip": "2001:506:6000:11b:71:156:212:143", "name": null, "rtt": 23.438}]}, {"hop": 3, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 4, "probes": [{"annotation": null, "asn": null, "ip": "2001:1890:ff:ff08:12:242:117:16", "name": null, "rtt": 20.118}, {"annotation": null, "asn": null, "ip": "2001:1890:ff:ff08:12:242:117:16", "name": null, "rtt": 20.327}, {"annotation": null, "asn": null, "ip": "2001:1890:ff:ff08:12:242:117:16", "name": null, "rtt": 21.213}]}, {"hop": 5, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}]} diff --git a/tests/fixtures/osx-10.14.6/traceroute6-mult-addresses.out b/tests/fixtures/osx-10.14.6/traceroute6-mult-addresses.out new file mode 100644 index 00000000..e056c8ce --- /dev/null +++ b/tests/fixtures/osx-10.14.6/traceroute6-mult-addresses.out @@ -0,0 +1,8 @@ +traceroute6: Warning: turner-tls.map.fastly.net has multiple addresses; using 2a04:4e42:200::323 +traceroute6 to turner-tls.map.fastly.net (2a04:4e42:200::323) from 2600:1700:bab0:d40:985:f00a:98bd:f142, 5 hops max, 12 byte packets + 1 * * * + 2 2001:506:6000:11b:71:156:212:143 27.635 ms 20.383 ms 23.438 ms + 3 * * * + 4 2001:1890:ff:ff08:12:242:117:16 20.118 ms 20.327 ms 21.213 ms + 5 * * * + diff --git a/tests/fixtures/osx-10.14.6/traceroute6.json b/tests/fixtures/osx-10.14.6/traceroute6.json new file mode 100644 index 00000000..badd27b3 --- /dev/null +++ b/tests/fixtures/osx-10.14.6/traceroute6.json @@ -0,0 +1 @@ +{"destination_ip": "2a04:4e42:200::323", "destination_name": "turner-tls.map.fastly.net", "hops": [{"hop": 1, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 2, "probes": [{"annotation": null, "asn": null, "ip": "2001:506:6000:11b:71:156:212:143", "name": null, "rtt": 27.635}, {"annotation": null, "asn": null, "ip": "2001:506:6000:11b:71:156:212:143", "name": null, "rtt": 20.383}, {"annotation": null, "asn": null, "ip": "2001:506:6000:11b:71:156:212:143", "name": null, "rtt": 23.438}]}, {"hop": 3, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 4, "probes": [{"annotation": null, "asn": null, "ip": "2001:1890:ff:ff08:12:242:117:16", "name": null, "rtt": 20.118}, {"annotation": null, "asn": null, "ip": "2001:1890:ff:ff08:12:242:117:16", "name": null, "rtt": 20.327}, {"annotation": null, "asn": null, "ip": "2001:1890:ff:ff08:12:242:117:16", "name": null, "rtt": 21.213}]}, {"hop": 5, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}]} diff --git a/tests/fixtures/osx-10.14.6/traceroute6.out b/tests/fixtures/osx-10.14.6/traceroute6.out new file mode 100644 index 00000000..8af70abd --- /dev/null +++ b/tests/fixtures/osx-10.14.6/traceroute6.out @@ -0,0 +1,7 @@ +traceroute6 to turner-tls.map.fastly.net (2a04:4e42:200::323) from 2600:1700:bab0:d40:985:f00a:98bd:f142, 5 hops max, 12 byte packets + 1 * * * + 2 2001:506:6000:11b:71:156:212:143 27.635 ms 20.383 ms 23.438 ms + 3 * * * + 4 2001:1890:ff:ff08:12:242:117:16 20.118 ms 20.327 ms 21.213 ms + 5 * * * + diff --git a/tests/fixtures/osx-10.14.6/uname.out b/tests/fixtures/osx-10.14.6/uname.out new file mode 100644 index 00000000..b81c54fc --- /dev/null +++ b/tests/fixtures/osx-10.14.6/uname.out @@ -0,0 +1 @@ +Darwin diff --git a/tests/fixtures/ubuntu-18.04/ping-hostname-O-D-p-s.json b/tests/fixtures/ubuntu-18.04/ping-hostname-O-D-p-s.json new file mode 100644 index 00000000..34eb45e2 --- /dev/null +++ b/tests/fixtures/ubuntu-18.04/ping-hostname-O-D-p-s.json @@ -0,0 +1 @@ +{"destination_ip": "151.101.189.67", "data_bytes": 1400, "pattern": "0xabcd", "destination": "turner-tls.map.fastly.net", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19040.0, "round_trip_ms_min": 26.767, "round_trip_ms_avg": 33.782, "round_trip_ms_max": 44.159, "round_trip_ms_stddev": 3.954, "responses": [{"type": "reply", "timestamp": 1595103464.996693, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 1, "ttl": 59, "time_ms": 26.7, "duplicate": false}, {"type": "reply", "timestamp": 1595103466.001289, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 2, "ttl": 59, "time_ms": 28.5, "duplicate": false}, {"type": "reply", "timestamp": 1595103467.004316, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 3, "ttl": 59, "time_ms": 28.8, "duplicate": false}, {"type": "reply", "timestamp": 1595103468.009966, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 4, "ttl": 59, "time_ms": 33.2, "duplicate": false}, {"type": "reply", "timestamp": 1595103469.013655, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 5, "ttl": 59, "time_ms": 34.4, "duplicate": false}, {"type": "reply", "timestamp": 1595103470.014253, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 6, "ttl": 59, "time_ms": 34.2, "duplicate": false}, {"type": "reply", "timestamp": 1595103471.02653, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 7, "ttl": 59, "time_ms": 44.1, "duplicate": false}, {"type": "reply", "timestamp": 1595103472.019493, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 8, "ttl": 59, "time_ms": 34.9, "duplicate": false}, {"type": "reply", "timestamp": 1595103473.021432, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 9, "ttl": 59, "time_ms": 35.6, "duplicate": false}, {"type": "reply", "timestamp": 1595103474.015603, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 10, "ttl": 59, "time_ms": 27.4, "duplicate": false}, {"type": "reply", "timestamp": 1595103475.02676, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 11, "ttl": 59, "time_ms": 36.9, "duplicate": false}, {"type": "reply", "timestamp": 1595103476.02693, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 12, "ttl": 59, "time_ms": 35.7, "duplicate": false}, {"type": "reply", "timestamp": 1595103477.031093, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 13, "ttl": 59, "time_ms": 36.8, "duplicate": false}, {"type": "reply", "timestamp": 1595103478.028918, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 14, "ttl": 59, "time_ms": 33.1, "duplicate": false}, {"type": "reply", "timestamp": 1595103479.032238, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 15, "ttl": 59, "time_ms": 35.6, "duplicate": false}, {"type": "reply", "timestamp": 1595103480.032097, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 16, "ttl": 59, "time_ms": 33.3, "duplicate": false}, {"type": "reply", "timestamp": 1595103481.034546, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 17, "ttl": 59, "time_ms": 34.8, "duplicate": false}, {"type": "reply", "timestamp": 1595103482.037939, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 18, "ttl": 59, "time_ms": 35.7, "duplicate": false}, {"type": "reply", "timestamp": 1595103483.041514, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 19, "ttl": 59, "time_ms": 35.8, "duplicate": false}, {"type": "reply", "timestamp": 1595103484.03911, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 20, "ttl": 59, "time_ms": 29.3, "duplicate": false}]} diff --git a/tests/fixtures/ubuntu-18.04/ping-hostname-O-D-p-s.out b/tests/fixtures/ubuntu-18.04/ping-hostname-O-D-p-s.out new file mode 100644 index 00000000..57b2d09e --- /dev/null +++ b/tests/fixtures/ubuntu-18.04/ping-hostname-O-D-p-s.out @@ -0,0 +1,26 @@ +PATTERN: 0xabcd +PING turner-tls.map.fastly.net (151.101.189.67) 1400(1428) bytes of data. +[1595103464.996693] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=1 ttl=59 time=26.7 ms +[1595103466.001289] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=2 ttl=59 time=28.5 ms +[1595103467.004316] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=3 ttl=59 time=28.8 ms +[1595103468.009966] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=4 ttl=59 time=33.2 ms +[1595103469.013655] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=5 ttl=59 time=34.4 ms +[1595103470.014253] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=6 ttl=59 time=34.2 ms +[1595103471.026530] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=7 ttl=59 time=44.1 ms +[1595103472.019493] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=8 ttl=59 time=34.9 ms +[1595103473.021432] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=9 ttl=59 time=35.6 ms +[1595103474.015603] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=10 ttl=59 time=27.4 ms +[1595103475.026760] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=11 ttl=59 time=36.9 ms +[1595103476.026930] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=12 ttl=59 time=35.7 ms +[1595103477.031093] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=13 ttl=59 time=36.8 ms +[1595103478.028918] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=14 ttl=59 time=33.1 ms +[1595103479.032238] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=15 ttl=59 time=35.6 ms +[1595103480.032097] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=16 ttl=59 time=33.3 ms +[1595103481.034546] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=17 ttl=59 time=34.8 ms +[1595103482.037939] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=18 ttl=59 time=35.7 ms +[1595103483.041514] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=19 ttl=59 time=35.8 ms +[1595103484.039110] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=20 ttl=59 time=29.3 ms + +--- turner-tls.map.fastly.net ping statistics --- +20 packets transmitted, 20 received, 0% packet loss, time 19040ms +rtt min/avg/max/mdev = 26.767/33.782/44.159/3.954 ms diff --git a/tests/fixtures/ubuntu-18.04/ping-hostname-O-p.json b/tests/fixtures/ubuntu-18.04/ping-hostname-O-p.json new file mode 100644 index 00000000..ec57c879 --- /dev/null +++ b/tests/fixtures/ubuntu-18.04/ping-hostname-O-p.json @@ -0,0 +1 @@ +{"destination_ip": "151.101.189.67", "data_bytes": 56, "pattern": "0xabcd", "destination": "turner-tls.map.fastly.net", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19052.0, "round_trip_ms_min": 24.785, "round_trip_ms_avg": 41.856, "round_trip_ms_max": 143.789, "round_trip_ms_stddev": 27.768, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 1, "ttl": 59, "time_ms": 26.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 2, "ttl": 59, "time_ms": 26.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 3, "ttl": 59, "time_ms": 34.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 4, "ttl": 59, "time_ms": 34.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 5, "ttl": 59, "time_ms": 32.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 6, "ttl": 59, "time_ms": 25.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 7, "ttl": 59, "time_ms": 33.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 8, "ttl": 59, "time_ms": 34.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 9, "ttl": 59, "time_ms": 27.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 10, "ttl": 59, "time_ms": 32.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 11, "ttl": 59, "time_ms": 32.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 12, "ttl": 59, "time_ms": 32.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 13, "ttl": 59, "time_ms": 24.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 14, "ttl": 59, "time_ms": 34.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 15, "ttl": 59, "time_ms": 35.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 16, "ttl": 59, "time_ms": 33.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 17, "ttl": 59, "time_ms": 74.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 18, "ttl": 59, "time_ms": 31.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 19, "ttl": 59, "time_ms": 85.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 20, "ttl": 59, "time_ms": 143.0, "duplicate": false}]} diff --git a/tests/fixtures/ubuntu-18.04/ping-hostname-O-p.out b/tests/fixtures/ubuntu-18.04/ping-hostname-O-p.out new file mode 100644 index 00000000..897770d7 --- /dev/null +++ b/tests/fixtures/ubuntu-18.04/ping-hostname-O-p.out @@ -0,0 +1,26 @@ +PATTERN: 0xabcd +PING turner-tls.map.fastly.net (151.101.189.67) 56(84) bytes of data. +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=1 ttl=59 time=26.6 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=2 ttl=59 time=26.8 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=3 ttl=59 time=34.8 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=4 ttl=59 time=34.2 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=5 ttl=59 time=32.6 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=6 ttl=59 time=25.6 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=7 ttl=59 time=33.1 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=8 ttl=59 time=34.8 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=9 ttl=59 time=27.1 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=10 ttl=59 time=32.9 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=11 ttl=59 time=32.6 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=12 ttl=59 time=32.0 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=13 ttl=59 time=24.7 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=14 ttl=59 time=34.6 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=15 ttl=59 time=35.2 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=16 ttl=59 time=33.3 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=17 ttl=59 time=74.5 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=18 ttl=59 time=31.8 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=19 ttl=59 time=85.3 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=20 ttl=59 time=143 ms + +--- turner-tls.map.fastly.net ping statistics --- +20 packets transmitted, 20 received, 0% packet loss, time 19052ms +rtt min/avg/max/mdev = 24.785/41.856/143.789/27.768 ms diff --git a/tests/fixtures/ubuntu-18.04/ping-hostname-O.json b/tests/fixtures/ubuntu-18.04/ping-hostname-O.json new file mode 100644 index 00000000..49cc748c --- /dev/null +++ b/tests/fixtures/ubuntu-18.04/ping-hostname-O.json @@ -0,0 +1 @@ +{"destination_ip": "151.101.189.67", "data_bytes": 56, "pattern": null, "destination": "turner-tls.map.fastly.net", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19290.0, "round_trip_ms_min": 24.33, "round_trip_ms_avg": 30.42, "round_trip_ms_max": 35.259, "round_trip_ms_stddev": 3.84, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 1, "ttl": 59, "time_ms": 26.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 2, "ttl": 59, "time_ms": 24.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 3, "ttl": 59, "time_ms": 32.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 4, "ttl": 59, "time_ms": 33.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 5, "ttl": 59, "time_ms": 32.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 6, "ttl": 59, "time_ms": 26.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 7, "ttl": 59, "time_ms": 34.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 8, "ttl": 59, "time_ms": 24.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 9, "ttl": 59, "time_ms": 34.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 10, "ttl": 59, "time_ms": 33.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 11, "ttl": 59, "time_ms": 33.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 12, "ttl": 59, "time_ms": 28.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 13, "ttl": 59, "time_ms": 33.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 14, "ttl": 59, "time_ms": 26.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 15, "ttl": 59, "time_ms": 27.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 16, "ttl": 59, "time_ms": 33.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 17, "ttl": 59, "time_ms": 35.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 18, "ttl": 59, "time_ms": 26.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 19, "ttl": 59, "time_ms": 34.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 20, "ttl": 59, "time_ms": 27.1, "duplicate": false}]} diff --git a/tests/fixtures/ubuntu-18.04/ping-hostname-O.out b/tests/fixtures/ubuntu-18.04/ping-hostname-O.out new file mode 100644 index 00000000..fc94183b --- /dev/null +++ b/tests/fixtures/ubuntu-18.04/ping-hostname-O.out @@ -0,0 +1,25 @@ +PING turner-tls.map.fastly.net (151.101.189.67) 56(84) bytes of data. +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=1 ttl=59 time=26.3 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=2 ttl=59 time=24.3 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=3 ttl=59 time=32.5 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=4 ttl=59 time=33.1 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=5 ttl=59 time=32.5 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=6 ttl=59 time=26.1 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=7 ttl=59 time=34.2 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=8 ttl=59 time=24.6 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=9 ttl=59 time=34.7 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=10 ttl=59 time=33.8 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=11 ttl=59 time=33.9 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=12 ttl=59 time=28.4 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=13 ttl=59 time=33.2 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=14 ttl=59 time=26.3 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=15 ttl=59 time=27.0 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=16 ttl=59 time=33.8 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=17 ttl=59 time=35.2 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=18 ttl=59 time=26.4 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=19 ttl=59 time=34.1 ms +64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=20 ttl=59 time=27.1 ms + +--- turner-tls.map.fastly.net ping statistics --- +20 packets transmitted, 20 received, 0% packet loss, time 19290ms +rtt min/avg/max/mdev = 24.330/30.420/35.259/3.840 ms diff --git a/tests/fixtures/ubuntu-18.04/ping-ip-O-D.json b/tests/fixtures/ubuntu-18.04/ping-ip-O-D.json new file mode 100644 index 00000000..8de4e694 --- /dev/null +++ b/tests/fixtures/ubuntu-18.04/ping-ip-O-D.json @@ -0,0 +1 @@ +{"destination_ip": "127.0.0.1", "data_bytes": 56, "pattern": null, "destination": "127.0.0.1", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19452.0, "round_trip_ms_min": 0.017, "round_trip_ms_avg": 0.044, "round_trip_ms_max": 0.051, "round_trip_ms_stddev": 0.01, "responses": [{"type": "reply", "timestamp": 1595102903.313934, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.017, "duplicate": false}, {"type": "reply", "timestamp": 1595102904.33341, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.033, "duplicate": false}, {"type": "reply", "timestamp": 1595102905.35791, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 3, "ttl": 64, "time_ms": 0.041, "duplicate": false}, {"type": "reply", "timestamp": 1595102906.3814, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 4, "ttl": 64, "time_ms": 0.039, "duplicate": false}, {"type": "reply", "timestamp": 1595102907.406752, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 5, "ttl": 64, "time_ms": 0.05, "duplicate": false}, {"type": "reply", "timestamp": 1595102908.430739, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 6, "ttl": 64, "time_ms": 0.05, "duplicate": false}, {"type": "reply", "timestamp": 1595102909.454753, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 7, "ttl": 64, "time_ms": 0.051, "duplicate": false}, {"type": "reply", "timestamp": 1595102910.478765, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 8, "ttl": 64, "time_ms": 0.05, "duplicate": false}, {"type": "reply", "timestamp": 1595102911.50115, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 9, "ttl": 64, "time_ms": 0.027, "duplicate": false}, {"type": "reply", "timestamp": 1595102912.525888, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 10, "ttl": 64, "time_ms": 0.051, "duplicate": false}, {"type": "reply", "timestamp": 1595102913.550088, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 11, "ttl": 64, "time_ms": 0.05, "duplicate": false}, {"type": "reply", "timestamp": 1595102914.574405, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 12, "ttl": 64, "time_ms": 0.04, "duplicate": false}, {"type": "reply", "timestamp": 1595102915.598696, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 13, "ttl": 64, "time_ms": 0.05, "duplicate": false}, {"type": "reply", "timestamp": 1595102916.622554, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 14, "ttl": 64, "time_ms": 0.049, "duplicate": false}, {"type": "reply", "timestamp": 1595102917.646755, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 15, "ttl": 64, "time_ms": 0.05, "duplicate": false}, {"type": "reply", "timestamp": 1595102918.670765, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 16, "ttl": 64, "time_ms": 0.051, "duplicate": false}, {"type": "reply", "timestamp": 1595102919.693157, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 17, "ttl": 64, "time_ms": 0.05, "duplicate": false}, {"type": "reply", "timestamp": 1595102920.717034, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 18, "ttl": 64, "time_ms": 0.038, "duplicate": false}, {"type": "reply", "timestamp": 1595102921.741629, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 19, "ttl": 64, "time_ms": 0.05, "duplicate": false}, {"type": "reply", "timestamp": 1595102922.766421, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 20, "ttl": 64, "time_ms": 0.05, "duplicate": false}]} diff --git a/tests/fixtures/ubuntu-18.04/ping-ip-O-D.out b/tests/fixtures/ubuntu-18.04/ping-ip-O-D.out new file mode 100644 index 00000000..8a9e3378 --- /dev/null +++ b/tests/fixtures/ubuntu-18.04/ping-ip-O-D.out @@ -0,0 +1,25 @@ +PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. +[1595102903.313934] 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.017 ms +[1595102904.333410] 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.033 ms +[1595102905.357910] 64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.041 ms +[1595102906.381400] 64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.039 ms +[1595102907.406752] 64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.050 ms +[1595102908.430739] 64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.050 ms +[1595102909.454753] 64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.051 ms +[1595102910.478765] 64 bytes from 127.0.0.1: icmp_seq=8 ttl=64 time=0.050 ms +[1595102911.501150] 64 bytes from 127.0.0.1: icmp_seq=9 ttl=64 time=0.027 ms +[1595102912.525888] 64 bytes from 127.0.0.1: icmp_seq=10 ttl=64 time=0.051 ms +[1595102913.550088] 64 bytes from 127.0.0.1: icmp_seq=11 ttl=64 time=0.050 ms +[1595102914.574405] 64 bytes from 127.0.0.1: icmp_seq=12 ttl=64 time=0.040 ms +[1595102915.598696] 64 bytes from 127.0.0.1: icmp_seq=13 ttl=64 time=0.050 ms +[1595102916.622554] 64 bytes from 127.0.0.1: icmp_seq=14 ttl=64 time=0.049 ms +[1595102917.646755] 64 bytes from 127.0.0.1: icmp_seq=15 ttl=64 time=0.050 ms +[1595102918.670765] 64 bytes from 127.0.0.1: icmp_seq=16 ttl=64 time=0.051 ms +[1595102919.693157] 64 bytes from 127.0.0.1: icmp_seq=17 ttl=64 time=0.050 ms +[1595102920.717034] 64 bytes from 127.0.0.1: icmp_seq=18 ttl=64 time=0.038 ms +[1595102921.741629] 64 bytes from 127.0.0.1: icmp_seq=19 ttl=64 time=0.050 ms +[1595102922.766421] 64 bytes from 127.0.0.1: icmp_seq=20 ttl=64 time=0.050 ms + +--- 127.0.0.1 ping statistics --- +20 packets transmitted, 20 received, 0% packet loss, time 19452ms +rtt min/avg/max/mdev = 0.017/0.044/0.051/0.010 ms diff --git a/tests/fixtures/ubuntu-18.04/ping-ip-O.json b/tests/fixtures/ubuntu-18.04/ping-ip-O.json new file mode 100644 index 00000000..4ff87e99 --- /dev/null +++ b/tests/fixtures/ubuntu-18.04/ping-ip-O.json @@ -0,0 +1 @@ +{"destination_ip": "127.0.0.1", "data_bytes": 56, "pattern": null, "destination": "127.0.0.1", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19434.0, "round_trip_ms_min": 0.02, "round_trip_ms_avg": 0.047, "round_trip_ms_max": 0.057, "round_trip_ms_stddev": 0.01, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.02, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.043, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 3, "ttl": 64, "time_ms": 0.05, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 4, "ttl": 64, "time_ms": 0.051, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 5, "ttl": 64, "time_ms": 0.051, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 6, "ttl": 64, "time_ms": 0.027, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 7, "ttl": 64, "time_ms": 0.05, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 8, "ttl": 64, "time_ms": 0.051, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 9, "ttl": 64, "time_ms": 0.051, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 10, "ttl": 64, "time_ms": 0.051, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 11, "ttl": 64, "time_ms": 0.051, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 12, "ttl": 64, "time_ms": 0.05, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 13, "ttl": 64, "time_ms": 0.05, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 14, "ttl": 64, "time_ms": 0.041, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 15, "ttl": 64, "time_ms": 0.052, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 16, "ttl": 64, "time_ms": 0.057, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 17, "ttl": 64, "time_ms": 0.05, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 18, "ttl": 64, "time_ms": 0.051, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 19, "ttl": 64, "time_ms": 0.05, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 20, "ttl": 64, "time_ms": 0.049, "duplicate": false}]} diff --git a/tests/fixtures/ubuntu-18.04/ping-ip-O.out b/tests/fixtures/ubuntu-18.04/ping-ip-O.out new file mode 100644 index 00000000..82b1ea46 --- /dev/null +++ b/tests/fixtures/ubuntu-18.04/ping-ip-O.out @@ -0,0 +1,25 @@ +PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. +64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.020 ms +64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.043 ms +64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.050 ms +64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.051 ms +64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.051 ms +64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.027 ms +64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.050 ms +64 bytes from 127.0.0.1: icmp_seq=8 ttl=64 time=0.051 ms +64 bytes from 127.0.0.1: icmp_seq=9 ttl=64 time=0.051 ms +64 bytes from 127.0.0.1: icmp_seq=10 ttl=64 time=0.051 ms +64 bytes from 127.0.0.1: icmp_seq=11 ttl=64 time=0.051 ms +64 bytes from 127.0.0.1: icmp_seq=12 ttl=64 time=0.050 ms +64 bytes from 127.0.0.1: icmp_seq=13 ttl=64 time=0.050 ms +64 bytes from 127.0.0.1: icmp_seq=14 ttl=64 time=0.041 ms +64 bytes from 127.0.0.1: icmp_seq=15 ttl=64 time=0.052 ms +64 bytes from 127.0.0.1: icmp_seq=16 ttl=64 time=0.057 ms +64 bytes from 127.0.0.1: icmp_seq=17 ttl=64 time=0.050 ms +64 bytes from 127.0.0.1: icmp_seq=18 ttl=64 time=0.051 ms +64 bytes from 127.0.0.1: icmp_seq=19 ttl=64 time=0.050 ms +64 bytes from 127.0.0.1: icmp_seq=20 ttl=64 time=0.049 ms + +--- 127.0.0.1 ping statistics --- +20 packets transmitted, 20 received, 0% packet loss, time 19434ms +rtt min/avg/max/mdev = 0.020/0.047/0.057/0.010 ms diff --git a/tests/fixtures/ubuntu-18.04/ping6-hostname-O-D-p-s.json b/tests/fixtures/ubuntu-18.04/ping6-hostname-O-D-p-s.json new file mode 100644 index 00000000..0c606259 --- /dev/null +++ b/tests/fixtures/ubuntu-18.04/ping6-hostname-O-D-p-s.json @@ -0,0 +1 @@ +{"destination_ip": "2a04:4e42:2d::323", "data_bytes": 1400, "pattern": "0xabcd", "destination": "www.cnn.com", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19050.0, "round_trip_ms_min": 25.086, "round_trip_ms_avg": 37.398, "round_trip_ms_max": 162.132, "round_trip_ms_stddev": 28.854, "responses": [{"type": "reply", "timestamp": 1595102963.207191, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 1, "ttl": 59, "time_ms": 162.0, "duplicate": false}, {"type": "reply", "timestamp": 1595102964.072572, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 2, "ttl": 59, "time_ms": 26.2, "duplicate": false}, {"type": "reply", "timestamp": 1595102965.083093, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 3, "ttl": 59, "time_ms": 34.0, "duplicate": false}, {"type": "reply", "timestamp": 1595102966.086221, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 4, "ttl": 59, "time_ms": 34.6, "duplicate": false}, {"type": "reply", "timestamp": 1595102967.088365, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 5, "ttl": 59, "time_ms": 32.9, "duplicate": false}, {"type": "reply", "timestamp": 1595102968.090956, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 6, "ttl": 59, "time_ms": 33.5, "duplicate": false}, {"type": "reply", "timestamp": 1595102969.088229, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 7, "ttl": 59, "time_ms": 27.6, "duplicate": false}, {"type": "reply", "timestamp": 1595102970.08863, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 8, "ttl": 59, "time_ms": 25.0, "duplicate": false}, {"type": "reply", "timestamp": 1595102971.093828, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 9, "ttl": 59, "time_ms": 27.0, "duplicate": false}, {"type": "reply", "timestamp": 1595102972.104782, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 10, "ttl": 59, "time_ms": 35.3, "duplicate": false}, {"type": "reply", "timestamp": 1595102973.098518, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 11, "ttl": 59, "time_ms": 27.1, "duplicate": false}, {"type": "reply", "timestamp": 1595102974.108744, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 12, "ttl": 59, "time_ms": 36.0, "duplicate": false}, {"type": "reply", "timestamp": 1595102975.104919, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 13, "ttl": 59, "time_ms": 30.4, "duplicate": false}, {"type": "reply", "timestamp": 1595102976.103486, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 14, "ttl": 59, "time_ms": 26.1, "duplicate": false}, {"type": "reply", "timestamp": 1595102977.107027, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 15, "ttl": 59, "time_ms": 27.2, "duplicate": false}, {"type": "reply", "timestamp": 1595102978.111345, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 16, "ttl": 59, "time_ms": 28.3, "duplicate": false}, {"type": "reply", "timestamp": 1595102979.121028, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 17, "ttl": 59, "time_ms": 35.9, "duplicate": false}, {"type": "reply", "timestamp": 1595102980.116465, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 18, "ttl": 59, "time_ms": 28.8, "duplicate": false}, {"type": "reply", "timestamp": 1595102981.126039, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 19, "ttl": 59, "time_ms": 34.7, "duplicate": false}, {"type": "reply", "timestamp": 1595102982.12868, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 20, "ttl": 59, "time_ms": 34.3, "duplicate": false}]} diff --git a/tests/fixtures/ubuntu-18.04/ping6-hostname-O-D-p-s.out b/tests/fixtures/ubuntu-18.04/ping6-hostname-O-D-p-s.out new file mode 100644 index 00000000..6f92efc7 --- /dev/null +++ b/tests/fixtures/ubuntu-18.04/ping6-hostname-O-D-p-s.out @@ -0,0 +1,26 @@ +PATTERN: 0xabcd +PING www.cnn.com(2a04:4e42:2d::323 (2a04:4e42:2d::323)) 1400 data bytes +[1595102963.207191] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=1 ttl=59 time=162 ms +[1595102964.072572] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=2 ttl=59 time=26.2 ms +[1595102965.083093] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=3 ttl=59 time=34.0 ms +[1595102966.086221] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=4 ttl=59 time=34.6 ms +[1595102967.088365] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=5 ttl=59 time=32.9 ms +[1595102968.090956] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=6 ttl=59 time=33.5 ms +[1595102969.088229] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=7 ttl=59 time=27.6 ms +[1595102970.088630] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=8 ttl=59 time=25.0 ms +[1595102971.093828] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=9 ttl=59 time=27.0 ms +[1595102972.104782] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=10 ttl=59 time=35.3 ms +[1595102973.098518] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=11 ttl=59 time=27.1 ms +[1595102974.108744] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=12 ttl=59 time=36.0 ms +[1595102975.104919] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=13 ttl=59 time=30.4 ms +[1595102976.103486] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=14 ttl=59 time=26.1 ms +[1595102977.107027] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=15 ttl=59 time=27.2 ms +[1595102978.111345] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=16 ttl=59 time=28.3 ms +[1595102979.121028] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=17 ttl=59 time=35.9 ms +[1595102980.116465] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=18 ttl=59 time=28.8 ms +[1595102981.126039] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=19 ttl=59 time=34.7 ms +[1595102982.128680] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=20 ttl=59 time=34.3 ms + +--- www.cnn.com ping statistics --- +20 packets transmitted, 20 received, 0% packet loss, time 19050ms +rtt min/avg/max/mdev = 25.086/37.398/162.132/28.854 ms diff --git a/tests/fixtures/ubuntu-18.04/ping6-hostname-O-D-p.json b/tests/fixtures/ubuntu-18.04/ping6-hostname-O-D-p.json new file mode 100644 index 00000000..d77458bd --- /dev/null +++ b/tests/fixtures/ubuntu-18.04/ping6-hostname-O-D-p.json @@ -0,0 +1 @@ +{"destination_ip": "2a04:4e42:2d::323", "data_bytes": 56, "pattern": "0xabcd", "destination": "www.cnn.com", "packets_transmitted": 20, "packets_received": 18, "packet_loss_percent": 10.0, "duplicates": 0, "time_ms": 19052.0, "round_trip_ms_min": 24.671, "round_trip_ms_avg": 30.617, "round_trip_ms_max": 33.654, "round_trip_ms_stddev": 3.419, "responses": [{"type": "reply", "timestamp": 1595102982.159725, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 1, "ttl": 59, "time_ms": 26.9, "duplicate": false}, {"type": "reply", "timestamp": 1595102983.167501, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 2, "ttl": 59, "time_ms": 33.0, "duplicate": false}, {"type": "reply", "timestamp": 1595102984.169378, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 3, "ttl": 59, "time_ms": 33.1, "duplicate": false}, {"type": "reply", "timestamp": 1595102985.163818, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 4, "ttl": 59, "time_ms": 25.7, "duplicate": false}, {"type": "reply", "timestamp": 1595102986.167583, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 5, "ttl": 59, "time_ms": 26.5, "duplicate": false}, {"type": "reply", "timestamp": 1595102987.175507, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 6, "ttl": 59, "time_ms": 32.5, "duplicate": false}, {"type": "reply", "timestamp": 1595102988.171549, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 7, "ttl": 59, "time_ms": 25.8, "duplicate": false}, {"type": "reply", "timestamp": 1595102989.181855, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 8, "ttl": 59, "time_ms": 33.6, "duplicate": false}, {"type": "reply", "timestamp": 1595102990.176307, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 9, "ttl": 59, "time_ms": 24.6, "duplicate": false}, {"type": "reply", "timestamp": 1595102991.188111, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 10, "ttl": 59, "time_ms": 33.0, "duplicate": false}, {"type": "timeout", "timestamp": 1595102993.166385, "icmp_seq": 11}, {"type": "reply", "timestamp": 1595102993.198594, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 12, "ttl": 59, "time_ms": 32.0, "duplicate": false}, {"type": "reply", "timestamp": 1595102994.201841, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 13, "ttl": 59, "time_ms": 32.8, "duplicate": false}, {"type": "timeout", "timestamp": 1595102996.17406, "icmp_seq": 14}, {"type": "reply", "timestamp": 1595102996.207576, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 15, "ttl": 59, "time_ms": 33.3, "duplicate": false}, {"type": "reply", "timestamp": 1595102997.211141, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 16, "ttl": 59, "time_ms": 33.6, "duplicate": false}, {"type": "reply", "timestamp": 1595102998.210588, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 17, "ttl": 59, "time_ms": 32.0, "duplicate": false}, {"type": "reply", "timestamp": 1595102999.20548, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 18, "ttl": 59, "time_ms": 25.4, "duplicate": false}, {"type": "reply", "timestamp": 1595103000.216799, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 19, "ttl": 59, "time_ms": 33.5, "duplicate": false}, {"type": "reply", "timestamp": 1595103001.217993, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 20, "ttl": 59, "time_ms": 32.8, "duplicate": false}]} diff --git a/tests/fixtures/ubuntu-18.04/ping6-hostname-O-D-p.out b/tests/fixtures/ubuntu-18.04/ping6-hostname-O-D-p.out new file mode 100644 index 00000000..5803d1fc --- /dev/null +++ b/tests/fixtures/ubuntu-18.04/ping6-hostname-O-D-p.out @@ -0,0 +1,26 @@ +PATTERN: 0xabcd +PING www.cnn.com(2a04:4e42:2d::323 (2a04:4e42:2d::323)) 56 data bytes +[1595102982.159725] 64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=1 ttl=59 time=26.9 ms +[1595102983.167501] 64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=2 ttl=59 time=33.0 ms +[1595102984.169378] 64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=3 ttl=59 time=33.1 ms +[1595102985.163818] 64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=4 ttl=59 time=25.7 ms +[1595102986.167583] 64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=5 ttl=59 time=26.5 ms +[1595102987.175507] 64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=6 ttl=59 time=32.5 ms +[1595102988.171549] 64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=7 ttl=59 time=25.8 ms +[1595102989.181855] 64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=8 ttl=59 time=33.6 ms +[1595102990.176307] 64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=9 ttl=59 time=24.6 ms +[1595102991.188111] 64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=10 ttl=59 time=33.0 ms +[1595102993.166385] no answer yet for icmp_seq=11 +[1595102993.198594] 64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=12 ttl=59 time=32.0 ms +[1595102994.201841] 64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=13 ttl=59 time=32.8 ms +[1595102996.174060] no answer yet for icmp_seq=14 +[1595102996.207576] 64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=15 ttl=59 time=33.3 ms +[1595102997.211141] 64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=16 ttl=59 time=33.6 ms +[1595102998.210588] 64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=17 ttl=59 time=32.0 ms +[1595102999.205480] 64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=18 ttl=59 time=25.4 ms +[1595103000.216799] 64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=19 ttl=59 time=33.5 ms +[1595103001.217993] 64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=20 ttl=59 time=32.8 ms + +--- www.cnn.com ping statistics --- +20 packets transmitted, 18 received, 10% packet loss, time 19052ms +rtt min/avg/max/mdev = 24.671/30.617/33.654/3.419 ms diff --git a/tests/fixtures/ubuntu-18.04/ping6-hostname-O-p.json b/tests/fixtures/ubuntu-18.04/ping6-hostname-O-p.json new file mode 100644 index 00000000..54fab070 --- /dev/null +++ b/tests/fixtures/ubuntu-18.04/ping6-hostname-O-p.json @@ -0,0 +1 @@ +{"destination_ip": "2a04:4e42:2d::323", "data_bytes": 56, "pattern": "0xabcd", "destination": "www.cnn.com", "packets_transmitted": 20, "packets_received": 18, "packet_loss_percent": 10.0, "duplicates": 0, "time_ms": 19081.0, "round_trip_ms_min": 25.229, "round_trip_ms_avg": 38.451, "round_trip_ms_max": 151.911, "round_trip_ms_stddev": 28.221, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 1, "ttl": 59, "time_ms": 25.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 2, "ttl": 59, "time_ms": 27.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 3, "ttl": 59, "time_ms": 26.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 4, "ttl": 59, "time_ms": 34.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 5, "ttl": 59, "time_ms": 27.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 6, "ttl": 59, "time_ms": 34.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 7, "ttl": 59, "time_ms": 26.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 8, "ttl": 59, "time_ms": 35.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 9, "ttl": 59, "time_ms": 26.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 10, "ttl": 59, "time_ms": 33.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 11, "ttl": 59, "time_ms": 33.5, "duplicate": false}, {"type": "timeout", "timestamp": null, "icmp_seq": 12}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 13, "ttl": 59, "time_ms": 25.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 14, "ttl": 59, "time_ms": 25.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 15, "ttl": 59, "time_ms": 36.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 16, "ttl": 59, "time_ms": 34.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 17, "ttl": 59, "time_ms": 35.4, "duplicate": false}, {"type": "timeout", "timestamp": null, "icmp_seq": 18}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 19, "ttl": 59, "time_ms": 151.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 20, "ttl": 59, "time_ms": 51.5, "duplicate": false}]} diff --git a/tests/fixtures/ubuntu-18.04/ping6-hostname-O-p.out b/tests/fixtures/ubuntu-18.04/ping6-hostname-O-p.out new file mode 100644 index 00000000..8c39522d --- /dev/null +++ b/tests/fixtures/ubuntu-18.04/ping6-hostname-O-p.out @@ -0,0 +1,26 @@ +PATTERN: 0xabcd +PING www.cnn.com(2a04:4e42:2d::323 (2a04:4e42:2d::323)) 56 data bytes +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=1 ttl=59 time=25.4 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=2 ttl=59 time=27.6 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=3 ttl=59 time=26.5 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=4 ttl=59 time=34.4 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=5 ttl=59 time=27.5 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=6 ttl=59 time=34.5 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=7 ttl=59 time=26.6 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=8 ttl=59 time=35.3 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=9 ttl=59 time=26.8 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=10 ttl=59 time=33.1 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=11 ttl=59 time=33.5 ms +no answer yet for icmp_seq=12 +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=13 ttl=59 time=25.2 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=14 ttl=59 time=25.2 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=15 ttl=59 time=36.5 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=16 ttl=59 time=34.4 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=17 ttl=59 time=35.4 ms +no answer yet for icmp_seq=18 +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=19 ttl=59 time=151 ms +64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=20 ttl=59 time=51.5 ms + +--- www.cnn.com ping statistics --- +20 packets transmitted, 18 received, 10% packet loss, time 19081ms +rtt min/avg/max/mdev = 25.229/38.451/151.911/28.221 ms diff --git a/tests/fixtures/ubuntu-18.04/ping6-ip-O-D-p.json b/tests/fixtures/ubuntu-18.04/ping6-ip-O-D-p.json new file mode 100644 index 00000000..84791fe5 --- /dev/null +++ b/tests/fixtures/ubuntu-18.04/ping6-ip-O-D-p.json @@ -0,0 +1 @@ +{"destination_ip": "2a04:4e42:600::323", "data_bytes": 56, "pattern": "0xabcd", "destination": "2a04:4e42:600::323", "packets_transmitted": 20, "packets_received": 15, "packet_loss_percent": 25.0, "duplicates": 0, "time_ms": 19161.0, "round_trip_ms_min": 21.405, "round_trip_ms_avg": 45.041, "round_trip_ms_max": 159.38, "round_trip_ms_stddev": 38.693, "responses": [{"type": "reply", "timestamp": 1595102942.853155, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 1, "ttl": 59, "time_ms": 28.4, "duplicate": false}, {"type": "reply", "timestamp": 1595102943.857295, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 2, "ttl": 59, "time_ms": 29.4, "duplicate": false}, {"type": "reply", "timestamp": 1595102944.861751, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 3, "ttl": 59, "time_ms": 31.2, "duplicate": false}, {"type": "timeout", "timestamp": 1595102946.861681, "icmp_seq": 4}, {"type": "reply", "timestamp": 1595102946.891881, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 5, "ttl": 59, "time_ms": 30.0, "duplicate": false}, {"type": "reply", "timestamp": 1595102947.884818, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 6, "ttl": 59, "time_ms": 22.0, "duplicate": false}, {"type": "reply", "timestamp": 1595102948.89152, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 7, "ttl": 59, "time_ms": 27.2, "duplicate": false}, {"type": "reply", "timestamp": 1595102949.897424, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 8, "ttl": 59, "time_ms": 30.5, "duplicate": false}, {"type": "reply", "timestamp": 1595102950.89982, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 9, "ttl": 59, "time_ms": 29.0, "duplicate": false}, {"type": "reply", "timestamp": 1595102951.905148, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 10, "ttl": 59, "time_ms": 31.3, "duplicate": false}, {"type": "timeout", "timestamp": 1595102953.901458, "icmp_seq": 11}, {"type": "reply", "timestamp": 1595102953.93159, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 12, "ttl": 59, "time_ms": 29.9, "duplicate": false}, {"type": "timeout", "timestamp": 1595102955.918953, "icmp_seq": 13}, {"type": "timeout", "timestamp": 1595102956.942898, "icmp_seq": 14}, {"type": "reply", "timestamp": 1595102956.973463, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 15, "ttl": 59, "time_ms": 30.4, "duplicate": false}, {"type": "reply", "timestamp": 1595102957.966655, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 16, "ttl": 59, "time_ms": 21.4, "duplicate": false}, {"type": "timeout", "timestamp": 1595102959.981759, "icmp_seq": 17}, {"type": "reply", "timestamp": 1595102960.035095, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 18, "ttl": 59, "time_ms": 53.2, "duplicate": false}, {"type": "reply", "timestamp": 1595102961.106079, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 19, "ttl": 59, "time_ms": 121.0, "duplicate": false}, {"type": "reply", "timestamp": 1595102962.145647, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 20, "ttl": 59, "time_ms": 159.0, "duplicate": false}]} diff --git a/tests/fixtures/ubuntu-18.04/ping6-ip-O-D-p.out b/tests/fixtures/ubuntu-18.04/ping6-ip-O-D-p.out new file mode 100644 index 00000000..b016ec88 --- /dev/null +++ b/tests/fixtures/ubuntu-18.04/ping6-ip-O-D-p.out @@ -0,0 +1,26 @@ +PATTERN: 0xabcd +PING 2a04:4e42:600::323(2a04:4e42:600::323) 56 data bytes +[1595102942.853155] 64 bytes from 2a04:4e42:600::323: icmp_seq=1 ttl=59 time=28.4 ms +[1595102943.857295] 64 bytes from 2a04:4e42:600::323: icmp_seq=2 ttl=59 time=29.4 ms +[1595102944.861751] 64 bytes from 2a04:4e42:600::323: icmp_seq=3 ttl=59 time=31.2 ms +[1595102946.861681] no answer yet for icmp_seq=4 +[1595102946.891881] 64 bytes from 2a04:4e42:600::323: icmp_seq=5 ttl=59 time=30.0 ms +[1595102947.884818] 64 bytes from 2a04:4e42:600::323: icmp_seq=6 ttl=59 time=22.0 ms +[1595102948.891520] 64 bytes from 2a04:4e42:600::323: icmp_seq=7 ttl=59 time=27.2 ms +[1595102949.897424] 64 bytes from 2a04:4e42:600::323: icmp_seq=8 ttl=59 time=30.5 ms +[1595102950.899820] 64 bytes from 2a04:4e42:600::323: icmp_seq=9 ttl=59 time=29.0 ms +[1595102951.905148] 64 bytes from 2a04:4e42:600::323: icmp_seq=10 ttl=59 time=31.3 ms +[1595102953.901458] no answer yet for icmp_seq=11 +[1595102953.931590] 64 bytes from 2a04:4e42:600::323: icmp_seq=12 ttl=59 time=29.9 ms +[1595102955.918953] no answer yet for icmp_seq=13 +[1595102956.942898] no answer yet for icmp_seq=14 +[1595102956.973463] 64 bytes from 2a04:4e42:600::323: icmp_seq=15 ttl=59 time=30.4 ms +[1595102957.966655] 64 bytes from 2a04:4e42:600::323: icmp_seq=16 ttl=59 time=21.4 ms +[1595102959.981759] no answer yet for icmp_seq=17 +[1595102960.035095] 64 bytes from 2a04:4e42:600::323: icmp_seq=18 ttl=59 time=53.2 ms +[1595102961.106079] 64 bytes from 2a04:4e42:600::323: icmp_seq=19 ttl=59 time=121 ms +[1595102962.145647] 64 bytes from 2a04:4e42:600::323: icmp_seq=20 ttl=59 time=159 ms + +--- 2a04:4e42:600::323 ping statistics --- +20 packets transmitted, 15 received, 25% packet loss, time 19161ms +rtt min/avg/max/mdev = 21.405/45.041/159.380/38.693 ms diff --git a/tests/fixtures/ubuntu-18.04/ping6-ip-O-p.json b/tests/fixtures/ubuntu-18.04/ping6-ip-O-p.json new file mode 100644 index 00000000..3fbf2824 --- /dev/null +++ b/tests/fixtures/ubuntu-18.04/ping6-ip-O-p.json @@ -0,0 +1 @@ +{"destination_ip": "2a04:4e42:600::323", "data_bytes": 56, "pattern": "0xabcd", "destination": "2a04:4e42:600::323", "packets_transmitted": 20, "packets_received": 19, "packet_loss_percent": 5.0, "duplicates": 0, "time_ms": 19046.0, "round_trip_ms_min": 21.403, "round_trip_ms_avg": 24.901, "round_trip_ms_max": 30.176, "round_trip_ms_stddev": 3.056, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 1, "ttl": 59, "time_ms": 26.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 2, "ttl": 59, "time_ms": 24.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 3, "ttl": 59, "time_ms": 23.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 4, "ttl": 59, "time_ms": 21.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 5, "ttl": 59, "time_ms": 28.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 6, "ttl": 59, "time_ms": 23.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 7, "ttl": 59, "time_ms": 21.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 8, "ttl": 59, "time_ms": 22.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 9, "ttl": 59, "time_ms": 22.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 10, "ttl": 59, "time_ms": 29.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 11, "ttl": 59, "time_ms": 22.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 12, "ttl": 59, "time_ms": 22.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 13, "ttl": 59, "time_ms": 29.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 14, "ttl": 59, "time_ms": 22.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 15, "ttl": 59, "time_ms": 30.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 16, "ttl": 59, "time_ms": 24.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 17, "ttl": 59, "time_ms": 22.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 18, "ttl": 59, "time_ms": 24.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 19, "ttl": 59, "time_ms": 29.9, "duplicate": false}]} diff --git a/tests/fixtures/ubuntu-18.04/ping6-ip-O-p.out b/tests/fixtures/ubuntu-18.04/ping6-ip-O-p.out new file mode 100644 index 00000000..4b43c026 --- /dev/null +++ b/tests/fixtures/ubuntu-18.04/ping6-ip-O-p.out @@ -0,0 +1,25 @@ +PATTERN: 0xabcd +PING 2a04:4e42:600::323(2a04:4e42:600::323) 56 data bytes +64 bytes from 2a04:4e42:600::323: icmp_seq=1 ttl=59 time=26.8 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=2 ttl=59 time=24.6 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=3 ttl=59 time=23.6 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=4 ttl=59 time=21.7 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=5 ttl=59 time=28.4 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=6 ttl=59 time=23.0 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=7 ttl=59 time=21.4 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=8 ttl=59 time=22.3 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=9 ttl=59 time=22.3 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=10 ttl=59 time=29.3 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=11 ttl=59 time=22.6 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=12 ttl=59 time=22.7 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=13 ttl=59 time=29.9 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=14 ttl=59 time=22.0 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=15 ttl=59 time=30.1 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=16 ttl=59 time=24.2 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=17 ttl=59 time=22.9 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=18 ttl=59 time=24.5 ms +64 bytes from 2a04:4e42:600::323: icmp_seq=19 ttl=59 time=29.9 ms + +--- 2a04:4e42:600::323 ping statistics --- +20 packets transmitted, 19 received, 5% packet loss, time 19046ms +rtt min/avg/max/mdev = 21.403/24.901/30.176/3.056 ms diff --git a/tests/test_cli.py b/tests/test_cli.py index d07485ce..d998ee23 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -191,4 +191,5 @@ class MyTests(unittest.TestCase): def test_cli_about_jc(self): self.assertEqual(jc.cli.about_jc()['name'], 'jc') - self.assertGreaterEqual(jc.cli.about_jc()['parser_count'], 50) + self.assertGreaterEqual(jc.cli.about_jc()['parser_count'], 55) + self.assertEqual(jc.cli.about_jc()['parser_count'], len(jc.cli.about_jc()['parsers'])) diff --git a/tests/test_ini.py b/tests/test_ini.py index 977886e1..c3f83714 100644 --- a/tests/test_ini.py +++ b/tests/test_ini.py @@ -16,6 +16,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/ini-iptelserver.ini'), 'r', encoding='utf-8') as f: self.generic_ini_iptelserver = f.read() + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/keyvalue.txt'), 'r', encoding='utf-8') as f: + self.generic_ini_keyvalue = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/keyvalue-ifcfg.txt'), 'r', encoding='utf-8') as f: + self.generic_ini_keyvalue_ifcfg = f.read() + # output with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/ini-test.json'), 'r', encoding='utf-8') as f: self.generic_ini_test_json = json.loads(f.read()) @@ -23,6 +29,12 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/ini-iptelserver.json'), 'r', encoding='utf-8') as f: self.generic_ini_iptelserver_json = json.loads(f.read()) + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/keyvalue.json'), 'r', encoding='utf-8') as f: + self.generic_ini_keyvalue_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/keyvalue-ifcfg.json'), 'r', encoding='utf-8') as f: + self.generic_ini_keyvalue_ifcfg_json = json.loads(f.read()) + def test_ini_nodata(self): """ Test the test ini file with no data @@ -41,6 +53,18 @@ class MyTests(unittest.TestCase): """ self.assertEqual(jc.parsers.ini.parse(self.generic_ini_iptelserver, quiet=True), self.generic_ini_iptelserver_json) + def test_ini_keyvalue(self): + """ + Test a file that only includes key/value lines + """ + self.assertEqual(jc.parsers.ini.parse(self.generic_ini_keyvalue, quiet=True), self.generic_ini_keyvalue_json) + + def test_ini_keyvalue_ifcfg(self): + """ + Test a sample ifcfg key/value file that has quotation marks in the values + """ + self.assertEqual(jc.parsers.ini.parse(self.generic_ini_keyvalue_ifcfg, quiet=True), self.generic_ini_keyvalue_ifcfg_json) + if __name__ == '__main__': unittest.main() diff --git a/tests/test_ping.py b/tests/test_ping.py new file mode 100644 index 00000000..282dbdad --- /dev/null +++ b/tests/test_ping.py @@ -0,0 +1,694 @@ +import os +import unittest +import json +import jc.parsers.ping + +THIS_DIR = os.path.dirname(os.path.abspath(__file__)) + + +class MyTests(unittest.TestCase): + + def setUp(self): + # input + + # centos + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ping-ip-O.out'), 'r', encoding='utf-8') as f: + self.centos_7_7_ping_ip_O = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ping-ip-O-D.out'), 'r', encoding='utf-8') as f: + self.centos_7_7_ping_ip_O_D = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ping-hostname-O.out'), 'r', encoding='utf-8') as f: + self.centos_7_7_ping_hostname_O = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ping-hostname-O-p.out'), 'r', encoding='utf-8') as f: + self.centos_7_7_ping_hostname_O_p = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ping-hostname-O-D-p-s.out'), 'r', encoding='utf-8') as f: + self.centos_7_7_ping_hostname_O_D_p_s = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ping6-ip-O-p.out'), 'r', encoding='utf-8') as f: + self.centos_7_7_ping6_ip_O_p = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ping6-ip-O-D-p.out'), 'r', encoding='utf-8') as f: + self.centos_7_7_ping6_ip_O_D_p = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ping6-hostname-O-p.out'), 'r', encoding='utf-8') as f: + self.centos_7_7_ping6_hostname_O_p = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ping6-hostname-O-D-p-s.out'), 'r', encoding='utf-8') as f: + self.centos_7_7_ping6_hostname_O_D_p_s = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ping-ip-dup.out'), 'r', encoding='utf-8') as f: + self.centos_7_7_ping_ip_dup = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ping6-ip-dup.out'), 'r', encoding='utf-8') as f: + self.centos_7_7_ping6_ip_dup = f.read() + + # ubuntu + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ping-ip-O.out'), 'r', encoding='utf-8') as f: + self.ubuntu_18_4_ping_ip_O = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ping-ip-O-D.out'), 'r', encoding='utf-8') as f: + self.ubuntu_18_4_ping_ip_O_D = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ping-hostname-O.out'), 'r', encoding='utf-8') as f: + self.ubuntu_18_4_ping_hostname_O = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ping-hostname-O-p.out'), 'r', encoding='utf-8') as f: + self.ubuntu_18_4_ping_hostname_O_p = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ping-hostname-O-D-p-s.out'), 'r', encoding='utf-8') as f: + self.ubuntu_18_4_ping_hostname_O_D_p_s = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ping6-ip-O-p.out'), 'r', encoding='utf-8') as f: + self.ubuntu_18_4_ping6_ip_O_p = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ping6-ip-O-D-p.out'), 'r', encoding='utf-8') as f: + self.ubuntu_18_4_ping6_ip_O_D_p = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ping6-hostname-O-p.out'), 'r', encoding='utf-8') as f: + self.ubuntu_18_4_ping6_hostname_O_p = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ping6-hostname-O-D-p-s.out'), 'r', encoding='utf-8') as f: + self.ubuntu_18_4_ping6_hostname_O_D_p_s = f.read() + + # fedora + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/fedora32/ping-ip-O.out'), 'r', encoding='utf-8') as f: + self.fedora32_ping_ip_O = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/fedora32/ping-ip-O-D.out'), 'r', encoding='utf-8') as f: + self.fedora32_ping_ip_O_D = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/fedora32/ping-hostname-O.out'), 'r', encoding='utf-8') as f: + self.fedora32_ping_hostname_O = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/fedora32/ping-hostname-O-p.out'), 'r', encoding='utf-8') as f: + self.fedora32_ping_hostname_O_p = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/fedora32/ping-hostname-O-D-p-s.out'), 'r', encoding='utf-8') as f: + self.fedora32_ping_hostname_O_D_p_s = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/fedora32/ping6-ip-O-p.out'), 'r', encoding='utf-8') as f: + self.fedora32_ping6_ip_O_p = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/fedora32/ping6-ip-O-D-p.out'), 'r', encoding='utf-8') as f: + self.fedora32_ping6_ip_O_D_p = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/fedora32/ping6-hostname-O-p.out'), 'r', encoding='utf-8') as f: + self.fedora32_ping6_hostname_O_p = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/fedora32/ping6-hostname-O-D-p-s.out'), 'r', encoding='utf-8') as f: + self.fedora32_ping6_hostname_O_D_p_s = f.read() + + # freebsd + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ping-hostname-p.out'), 'r', encoding='utf-8') as f: + self.freebsd12_ping_hostname_p = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ping-hostname-s.out'), 'r', encoding='utf-8') as f: + self.freebsd12_ping_hostname_s = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ping-hostname.out'), 'r', encoding='utf-8') as f: + self.freebsd12_ping_hostname = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ping-ip-p.out'), 'r', encoding='utf-8') as f: + self.freebsd12_ping_ip_p = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ping-ip-s.out'), 'r', encoding='utf-8') as f: + self.freebsd12_ping_ip_s = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ping-ip.out'), 'r', encoding='utf-8') as f: + self.freebsd12_ping_ip = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ping6-hostname-p.out'), 'r', encoding='utf-8') as f: + self.freebsd12_ping6_hostname_p = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ping6-hostname-s.out'), 'r', encoding='utf-8') as f: + self.freebsd12_ping6_hostname_s = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ping6-hostname.out'), 'r', encoding='utf-8') as f: + self.freebsd12_ping6_hostname = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ping6-ip-p.out'), 'r', encoding='utf-8') as f: + self.freebsd12_ping6_ip_p = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ping6-ip-s.out'), 'r', encoding='utf-8') as f: + self.freebsd12_ping6_ip_s = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ping6-ip.out'), 'r', encoding='utf-8') as f: + self.freebsd12_ping6_ip = f.read() + + # osx + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping-hostname-p.out'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping_hostname_p = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping-hostname-s.out'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping_hostname_s = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping-hostname.out'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping_hostname = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping-ip-p.out'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping_ip_p = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping-ip-s.out'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping_ip_s = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping-ip.out'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping_ip = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping6-hostname-p.out'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping6_hostname_p = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping6-hostname-s.out'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping6_hostname_s = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping6-hostname.out'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping6_hostname = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping6-ip-p.out'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping6_ip_p = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping6-ip-s.out'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping6_ip_s = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping6-ip.out'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping6_ip = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping-ip-dup.out'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping_ip_dup = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping6-ip-dup.out'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping6_ip_dup = f.read() + + # output + + # centos + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ping-ip-O.json'), 'r', encoding='utf-8') as f: + self.centos_7_7_ping_ip_O_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ping-ip-O-D.json'), 'r', encoding='utf-8') as f: + self.centos_7_7_ping_ip_O_D_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ping-hostname-O.json'), 'r', encoding='utf-8') as f: + self.centos_7_7_ping_hostname_O_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ping-hostname-O-p.json'), 'r', encoding='utf-8') as f: + self.centos_7_7_ping_hostname_O_p_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ping-hostname-O-D-p-s.json'), 'r', encoding='utf-8') as f: + self.centos_7_7_ping_hostname_O_D_p_s_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ping6-ip-O-p.json'), 'r', encoding='utf-8') as f: + self.centos_7_7_ping6_ip_O_p_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ping6-ip-O-D-p.json'), 'r', encoding='utf-8') as f: + self.centos_7_7_ping6_ip_O_D_p_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ping6-hostname-O-p.json'), 'r', encoding='utf-8') as f: + self.centos_7_7_ping6_hostname_O_p_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ping6-hostname-O-D-p-s.json'), 'r', encoding='utf-8') as f: + self.centos_7_7_ping6_hostname_O_D_p_s_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ping-ip-dup.json'), 'r', encoding='utf-8') as f: + self.centos_7_7_ping_ip_dup_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/ping6-ip-dup.json'), 'r', encoding='utf-8') as f: + self.centos_7_7_ping6_ip_dup_json = json.loads(f.read()) + + # ubunutu + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ping-ip-O.json'), 'r', encoding='utf-8') as f: + self.ubuntu_18_4_ping_ip_O_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ping-ip-O-D.json'), 'r', encoding='utf-8') as f: + self.ubuntu_18_4_ping_ip_O_D_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ping-hostname-O.json'), 'r', encoding='utf-8') as f: + self.ubuntu_18_4_ping_hostname_O_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ping-hostname-O-p.json'), 'r', encoding='utf-8') as f: + self.ubuntu_18_4_ping_hostname_O_p_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ping-hostname-O-D-p-s.json'), 'r', encoding='utf-8') as f: + self.ubuntu_18_4_ping_hostname_O_D_p_s_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ping6-ip-O-p.json'), 'r', encoding='utf-8') as f: + self.ubuntu_18_4_ping6_ip_O_p_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ping6-ip-O-D-p.json'), 'r', encoding='utf-8') as f: + self.ubuntu_18_4_ping6_ip_O_D_p_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ping6-hostname-O-p.json'), 'r', encoding='utf-8') as f: + self.ubuntu_18_4_ping6_hostname_O_p_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/ping6-hostname-O-D-p-s.json'), 'r', encoding='utf-8') as f: + self.ubuntu_18_4_ping6_hostname_O_D_p_s_json = json.loads(f.read()) + + # fedora + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/fedora32/ping-ip-O.json'), 'r', encoding='utf-8') as f: + self.fedora32_ping_ip_O_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/fedora32/ping-ip-O-D.json'), 'r', encoding='utf-8') as f: + self.fedora32_ping_ip_O_D_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/fedora32/ping-hostname-O.json'), 'r', encoding='utf-8') as f: + self.fedora32_ping_hostname_O_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/fedora32/ping-hostname-O-p.json'), 'r', encoding='utf-8') as f: + self.fedora32_ping_hostname_O_p_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/fedora32/ping-hostname-O-D-p-s.json'), 'r', encoding='utf-8') as f: + self.fedora32_ping_hostname_O_D_p_s_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/fedora32/ping6-ip-O-p.json'), 'r', encoding='utf-8') as f: + self.fedora32_ping6_ip_O_p_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/fedora32/ping6-ip-O-D-p.json'), 'r', encoding='utf-8') as f: + self.fedora32_ping6_ip_O_D_p_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/fedora32/ping6-hostname-O-p.json'), 'r', encoding='utf-8') as f: + self.fedora32_ping6_hostname_O_p_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/fedora32/ping6-hostname-O-D-p-s.json'), 'r', encoding='utf-8') as f: + self.fedora32_ping6_hostname_O_D_p_s_json = json.loads(f.read()) + + # freebsd + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ping-hostname-p.json'), 'r', encoding='utf-8') as f: + self.freebsd12_ping_hostname_p_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ping-hostname-s.json'), 'r', encoding='utf-8') as f: + self.freebsd12_ping_hostname_s_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ping-hostname.json'), 'r', encoding='utf-8') as f: + self.freebsd12_ping_hostname_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ping-ip-p.json'), 'r', encoding='utf-8') as f: + self.freebsd12_ping_ip_p_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ping-ip-s.json'), 'r', encoding='utf-8') as f: + self.freebsd12_ping_ip_s_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ping-ip.json'), 'r', encoding='utf-8') as f: + self.freebsd12_ping_ip_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ping6-hostname-p.json'), 'r', encoding='utf-8') as f: + self.freebsd12_ping6_hostname_p_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ping6-hostname-s.json'), 'r', encoding='utf-8') as f: + self.freebsd12_ping6_hostname_s_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ping6-hostname.json'), 'r', encoding='utf-8') as f: + self.freebsd12_ping6_hostname_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ping6-ip-p.json'), 'r', encoding='utf-8') as f: + self.freebsd12_ping6_ip_p_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ping6-ip-s.json'), 'r', encoding='utf-8') as f: + self.freebsd12_ping6_ip_s_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/ping6-ip.json'), 'r', encoding='utf-8') as f: + self.freebsd12_ping6_ip_json = json.loads(f.read()) + + # osx: + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping-hostname-p.json'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping_hostname_p_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping-hostname-s.json'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping_hostname_s_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping-hostname.json'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping_hostname_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping-ip-p.json'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping_ip_p_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping-ip-s.json'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping_ip_s_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping-ip.json'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping_ip_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping6-hostname-p.json'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping6_hostname_p_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping6-hostname-s.json'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping6_hostname_s_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping6-hostname.json'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping6_hostname_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping6-ip-p.json'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping6_ip_p_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping6-ip-s.json'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping6_ip_s_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping6-ip.json'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping6_ip_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping-ip-dup.json'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping_ip_dup_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/ping6-ip-dup.json'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_ping6_ip_dup_json = json.loads(f.read()) + + def test_ping_nodata(self): + """ + Test 'ping' with no data + """ + self.assertEqual(jc.parsers.ping.parse('', quiet=True), {}) + + def test_ping_ip_O_centos_7_7(self): + """ + Test 'ping -O' on Centos 7.7 + """ + self.assertEqual(jc.parsers.ping.parse(self.centos_7_7_ping_ip_O, quiet=True), self.centos_7_7_ping_ip_O_json) + + def test_ping_ip_O_D_centos_7_7(self): + """ + Test 'ping -O -D' on Centos 7.7 + """ + self.assertEqual(jc.parsers.ping.parse(self.centos_7_7_ping_ip_O_D, quiet=True), self.centos_7_7_ping_ip_O_D_json) + + def test_ping_hostname_O_centos_7_7(self): + """ + Test 'ping -O' on Centos 7.7 + """ + self.assertEqual(jc.parsers.ping.parse(self.centos_7_7_ping_hostname_O, quiet=True), self.centos_7_7_ping_hostname_O_json) + + def test_ping_hostname_O_p_centos_7_7(self): + """ + Test 'ping -O -p' on Centos 7.7 + """ + self.assertEqual(jc.parsers.ping.parse(self.centos_7_7_ping_hostname_O_p, quiet=True), self.centos_7_7_ping_hostname_O_p_json) + + def test_ping_hostname_O_D_p_s_centos_7_7(self): + """ + Test 'ping -O -D -p -s' on Centos 7.7 + """ + self.assertEqual(jc.parsers.ping.parse(self.centos_7_7_ping_hostname_O_D_p_s, quiet=True), self.centos_7_7_ping_hostname_O_D_p_s_json) + + def test_ping6_ip_O_p_centos_7_7(self): + """ + Test 'ping6 -O -p' on Centos 7.7 + """ + self.assertEqual(jc.parsers.ping.parse(self.centos_7_7_ping6_ip_O_p, quiet=True), self.centos_7_7_ping6_ip_O_p_json) + + def test_ping6_ip_O_D_p_centos_7_7(self): + """ + Test 'ping6 -O -D -p' on Centos 7.7 + """ + self.assertEqual(jc.parsers.ping.parse(self.centos_7_7_ping6_ip_O_D_p, quiet=True), self.centos_7_7_ping6_ip_O_D_p_json) + + def test_ping6_hostname_O_p_centos_7_7(self): + """ + Test 'ping6 -O -p' on Centos 7.7 + """ + self.assertEqual(jc.parsers.ping.parse(self.centos_7_7_ping6_hostname_O_p, quiet=True), self.centos_7_7_ping6_hostname_O_p_json) + + def test_ping6_hostname_O_D_p_s_centos_7_7(self): + """ + Test 'ping6 -O -D -p -s' on Centos 7.7 + """ + self.assertEqual(jc.parsers.ping.parse(self.centos_7_7_ping6_hostname_O_D_p_s, quiet=True), self.centos_7_7_ping6_hostname_O_D_p_s_json) + + def test_ping_ip_dup_centos_7_7(self): + """ + Test 'ping ' to broadcast IP to get duplicate replies on Centos 7.7 + """ + self.assertEqual(jc.parsers.ping.parse(self.centos_7_7_ping_ip_dup, quiet=True), self.centos_7_7_ping_ip_dup_json) + + def test_ping6_ip_dup_centos_7_7(self): + """ + Test 'ping6 ' to broadcast IP to get duplicate replies on Centos 7.7 + """ + self.assertEqual(jc.parsers.ping.parse(self.centos_7_7_ping6_ip_dup, quiet=True), self.centos_7_7_ping6_ip_dup_json) + + def test_ping_ip_O_ubuntu_18_4(self): + """ + Test 'ping -O' on Ubuntu 18.4 + """ + self.assertEqual(jc.parsers.ping.parse(self.ubuntu_18_4_ping_ip_O, quiet=True), self.ubuntu_18_4_ping_ip_O_json) + + def test_ping_ip_O_D_ubuntu_18_4(self): + """ + Test 'ping -O -D' on Ubuntu 18.4 + """ + self.assertEqual(jc.parsers.ping.parse(self.ubuntu_18_4_ping_ip_O_D, quiet=True), self.ubuntu_18_4_ping_ip_O_D_json) + + def test_ping_hostname_O_ubuntu_18_4(self): + """ + Test 'ping -O' on Ubuntu 18.4 + """ + self.assertEqual(jc.parsers.ping.parse(self.ubuntu_18_4_ping_hostname_O, quiet=True), self.ubuntu_18_4_ping_hostname_O_json) + + def test_ping_hostname_O_p_ubuntu_18_4(self): + """ + Test 'ping -O -p' on Ubuntu 18.4 + """ + self.assertEqual(jc.parsers.ping.parse(self.ubuntu_18_4_ping_hostname_O_p, quiet=True), self.ubuntu_18_4_ping_hostname_O_p_json) + + def test_ping_hostname_O_D_p_s_ubuntu_18_4(self): + """ + Test 'ping -O -D -p -s' on Ubuntu 18.4 + """ + self.assertEqual(jc.parsers.ping.parse(self.ubuntu_18_4_ping_hostname_O_D_p_s, quiet=True), self.ubuntu_18_4_ping_hostname_O_D_p_s_json) + + def test_ping6_ip_O_p_ubuntu_18_4(self): + """ + Test 'ping6 -O -p' on Ubuntu 18.4 + """ + self.assertEqual(jc.parsers.ping.parse(self.ubuntu_18_4_ping6_ip_O_p, quiet=True), self.ubuntu_18_4_ping6_ip_O_p_json) + + def test_ping6_ip_O_D_p_ubuntu_18_4(self): + """ + Test 'ping6 -O -D -p' on Ubuntu 18.4 + """ + self.assertEqual(jc.parsers.ping.parse(self.ubuntu_18_4_ping6_ip_O_D_p, quiet=True), self.ubuntu_18_4_ping6_ip_O_D_p_json) + + def test_ping6_hostname_O_p_ubuntu_18_4(self): + """ + Test 'ping6 -O -p' on Ubuntu 18.4 + """ + self.assertEqual(jc.parsers.ping.parse(self.ubuntu_18_4_ping6_hostname_O_p, quiet=True), self.ubuntu_18_4_ping6_hostname_O_p_json) + + def test_ping6_hostname_O_D_p_s_ubuntu_18_4(self): + """ + Test 'ping6 -O -D -p -s' on Ubuntu 18.4 + """ + self.assertEqual(jc.parsers.ping.parse(self.ubuntu_18_4_ping6_hostname_O_D_p_s, quiet=True), self.ubuntu_18_4_ping6_hostname_O_D_p_s_json) + + def test_ping_ip_O_fedora32(self): + """ + Test 'ping -O' on fedora32 + """ + self.assertEqual(jc.parsers.ping.parse(self.fedora32_ping_ip_O, quiet=True), self.fedora32_ping_ip_O_json) + + def test_ping_ip_O_D_fedora32(self): + """ + Test 'ping -O -D' on fedora32 + """ + self.assertEqual(jc.parsers.ping.parse(self.fedora32_ping_ip_O_D, quiet=True), self.fedora32_ping_ip_O_D_json) + + def test_ping_hostname_O_fedora32(self): + """ + Test 'ping -O' on fedora32 + """ + self.assertEqual(jc.parsers.ping.parse(self.fedora32_ping_hostname_O, quiet=True), self.fedora32_ping_hostname_O_json) + + def test_ping_hostname_O_p_fedora32(self): + """ + Test 'ping -O -p' on fedora32 + """ + self.assertEqual(jc.parsers.ping.parse(self.fedora32_ping_hostname_O_p, quiet=True), self.fedora32_ping_hostname_O_p_json) + + def test_ping_hostname_O_D_p_s_fedora32(self): + """ + Test 'ping -O -D -p -s' on fedora32 + """ + self.assertEqual(jc.parsers.ping.parse(self.fedora32_ping_hostname_O_D_p_s, quiet=True), self.fedora32_ping_hostname_O_D_p_s_json) + + def test_ping6_ip_O_p_fedora32(self): + """ + Test 'ping6 -O -p' on fedora32 + """ + self.assertEqual(jc.parsers.ping.parse(self.fedora32_ping6_ip_O_p, quiet=True), self.fedora32_ping6_ip_O_p_json) + + def test_ping6_ip_O_D_p_fedora32(self): + """ + Test 'ping6 -O -D -p' on fedora32 + """ + self.assertEqual(jc.parsers.ping.parse(self.fedora32_ping6_ip_O_D_p, quiet=True), self.fedora32_ping6_ip_O_D_p_json) + + def test_ping6_hostname_O_p_fedora32(self): + """ + Test 'ping6 -O -p' on fedora32 + """ + self.assertEqual(jc.parsers.ping.parse(self.fedora32_ping6_hostname_O_p, quiet=True), self.fedora32_ping6_hostname_O_p_json) + + def test_ping6_hostname_O_D_p_s_fedora32(self): + """ + Test 'ping6 -O -D -p -s' on fedora32 + """ + self.assertEqual(jc.parsers.ping.parse(self.fedora32_ping6_hostname_O_D_p_s, quiet=True), self.fedora32_ping6_hostname_O_D_p_s_json) + + def test_ping_hostname_p_freebsd12(self): + """ + Test 'ping -p' on freebsd12 + """ + self.assertEqual(jc.parsers.ping.parse(self.freebsd12_ping_hostname_p, quiet=True), self.freebsd12_ping_hostname_p_json) + + def test_ping_hostname_s_freebsd12(self): + """ + Test 'ping -s' on freebsd12 + """ + self.assertEqual(jc.parsers.ping.parse(self.freebsd12_ping_hostname_s, quiet=True), self.freebsd12_ping_hostname_s_json) + + def test_ping_ping_hostname_freebsd12(self): + """ + Test 'ping ' on freebsd12 + """ + self.assertEqual(jc.parsers.ping.parse(self.freebsd12_ping_hostname, quiet=True), self.freebsd12_ping_hostname_json) + + def test_ping_ip_p_freebsd12(self): + """ + Test 'ping -p' on freebsd12 + """ + self.assertEqual(jc.parsers.ping.parse(self.freebsd12_ping_ip_p, quiet=True), self.freebsd12_ping_ip_p_json) + + def test_ping_ip_s_freebsd12(self): + """ + Test 'ping -s' on freebsd12 + """ + self.assertEqual(jc.parsers.ping.parse(self.freebsd12_ping_ip_s, quiet=True), self.freebsd12_ping_ip_s_json) + + def test_ping_ip_freebsd12(self): + """ + Test 'ping6 ' on freebsd127 + """ + self.assertEqual(jc.parsers.ping.parse(self.freebsd12_ping_ip, quiet=True), self.freebsd12_ping_ip_json) + + def test_ping6_hostname_p_freebsd12(self): + """ + Test 'ping6 -p' on freebsd12 + """ + self.assertEqual(jc.parsers.ping.parse(self.freebsd12_ping6_hostname_p, quiet=True), self.freebsd12_ping6_hostname_p_json) + + def test_ping6_hostname_s_freebsd12(self): + """ + Test 'ping6 -s' on freebsd12 + """ + self.assertEqual(jc.parsers.ping.parse(self.freebsd12_ping6_hostname_s, quiet=True), self.freebsd12_ping6_hostname_s_json) + + def test_ping6_hostname_freebsd12(self): + """ + Test 'ping6 ' on freebsd12 + """ + self.assertEqual(jc.parsers.ping.parse(self.freebsd12_ping6_hostname, quiet=True), self.freebsd12_ping6_hostname_json) + + def test_ping6_ip_p_freebsd12(self): + """ + Test 'ping6 -p' on freebsd12 + """ + self.assertEqual(jc.parsers.ping.parse(self.freebsd12_ping6_ip_p, quiet=True), self.freebsd12_ping6_ip_p_json) + + def test_ping6_ip_s_freebsd12(self): + """ + Test 'ping6 -s' on freebsd12 + """ + self.assertEqual(jc.parsers.ping.parse(self.freebsd12_ping6_ip_s, quiet=True), self.freebsd12_ping6_ip_s_json) + + def test_ping6_ip_freebsd12(self): + """ + Test 'ping6 ' on freebsd12 + """ + self.assertEqual(jc.parsers.ping.parse(self.freebsd12_ping6_ip, quiet=True), self.freebsd12_ping6_ip_json) + + def test_ping_hostname_p_osx_10_14_6(self): + """ + Test 'ping -p' on osx 10.14.6 + """ + self.assertEqual(jc.parsers.ping.parse(self.osx_10_14_6_ping_hostname_p, quiet=True), self.osx_10_14_6_ping_hostname_p_json) + + def test_ping_hostname_s_osx_10_14_6(self): + """ + Test 'ping -s' on osx 10.14.6 + """ + self.assertEqual(jc.parsers.ping.parse(self.osx_10_14_6_ping_hostname_s, quiet=True), self.osx_10_14_6_ping_hostname_s_json) + + def test_ping_ping_hostname_osx_10_14_6(self): + """ + Test 'ping ' on osx 10.14.6 + """ + self.assertEqual(jc.parsers.ping.parse(self.osx_10_14_6_ping_hostname, quiet=True), self.osx_10_14_6_ping_hostname_json) + + def test_ping_ip_p_osx_10_14_6(self): + """ + Test 'ping -p' on osx 10.14.6 + """ + self.assertEqual(jc.parsers.ping.parse(self.osx_10_14_6_ping_ip_p, quiet=True), self.osx_10_14_6_ping_ip_p_json) + + def test_ping_ip_s_osx_10_14_6(self): + """ + Test 'ping -s' on osx 10.14.6 + """ + self.assertEqual(jc.parsers.ping.parse(self.osx_10_14_6_ping_ip_s, quiet=True), self.osx_10_14_6_ping_ip_s_json) + + def test_ping_ip_osx_10_14_6(self): + """ + Test 'ping6 ' on osx 10.14.6 + """ + self.assertEqual(jc.parsers.ping.parse(self.osx_10_14_6_ping_ip, quiet=True), self.osx_10_14_6_ping_ip_json) + + def test_ping6_hostname_p_osx_10_14_6(self): + """ + Test 'ping6 -p' on osx 10.14.6 + """ + self.assertEqual(jc.parsers.ping.parse(self.osx_10_14_6_ping6_hostname_p, quiet=True), self.osx_10_14_6_ping6_hostname_p_json) + + def test_ping6_hostname_s_osx_10_14_6(self): + """ + Test 'ping6 -s' on osx 10.14.6 + """ + self.assertEqual(jc.parsers.ping.parse(self.osx_10_14_6_ping6_hostname_s, quiet=True), self.osx_10_14_6_ping6_hostname_s_json) + + def test_ping6_hostname_osx_10_14_6(self): + """ + Test 'ping6 ' on osx 10.14.6 + """ + self.assertEqual(jc.parsers.ping.parse(self.osx_10_14_6_ping6_hostname, quiet=True), self.osx_10_14_6_ping6_hostname_json) + + def test_ping6_ip_p_osx_10_14_6(self): + """ + Test 'ping6 -p' on osx 10.14.6 + """ + self.assertEqual(jc.parsers.ping.parse(self.osx_10_14_6_ping6_ip_p, quiet=True), self.osx_10_14_6_ping6_ip_p_json) + + def test_ping6_ip_s_osx_10_14_6(self): + """ + Test 'ping6 -s' on osx 10.14.6 + """ + self.assertEqual(jc.parsers.ping.parse(self.osx_10_14_6_ping6_ip_s, quiet=True), self.osx_10_14_6_ping6_ip_s_json) + + def test_ping6_ip_osx_10_14_6(self): + """ + Test 'ping6 ' on osx 10.14.6 + """ + self.assertEqual(jc.parsers.ping.parse(self.osx_10_14_6_ping6_ip, quiet=True), self.osx_10_14_6_ping6_ip_json) + + def test_ping_ip_dup_osx_10_14_6(self): + """ + Test 'ping ' to broadcast IP to get duplicate replies on osx 10.14.6 + """ + self.assertEqual(jc.parsers.ping.parse(self.osx_10_14_6_ping_ip_dup, quiet=True), self.osx_10_14_6_ping_ip_dup_json) + + def test_ping6_ip_dup_osx_10_14_6(self): + """ + Test 'ping6 ' to broadcast IP to get duplicate replies on osx 10.14.6 + """ + self.assertEqual(jc.parsers.ping.parse(self.osx_10_14_6_ping6_ip_dup, quiet=True), self.osx_10_14_6_ping6_ip_dup_json) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_tracepath.py b/tests/test_tracepath.py new file mode 100644 index 00000000..d5ccbb5b --- /dev/null +++ b/tests/test_tracepath.py @@ -0,0 +1,46 @@ +import os +import unittest +import json +import jc.parsers.tracepath + +THIS_DIR = os.path.dirname(os.path.abspath(__file__)) + + +class MyTests(unittest.TestCase): + + def setUp(self): + # input + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/tracepath.out'), 'r', encoding='utf-8') as f: + self.centos_7_7_tracepath = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/tracepath6.out'), 'r', encoding='utf-8') as f: + self.centos_7_7_tracepath6 = f.read() + + # output + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/tracepath.json'), 'r', encoding='utf-8') as f: + self.centos_7_7_tracepath_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/tracepath6.json'), 'r', encoding='utf-8') as f: + self.centos_7_7_tracepath6_json = json.loads(f.read()) + + def test_tracepath_nodata(self): + """ + Test 'tracepath' with no data + """ + self.assertEqual(jc.parsers.tracepath.parse('', quiet=True), {}) + + def test_tracepath_centos_7_7(self): + """ + Test 'tracepath' on Centos 7.7 + """ + self.assertEqual(jc.parsers.tracepath.parse(self.centos_7_7_tracepath, quiet=True), self.centos_7_7_tracepath_json) + + def test_tracepath6_centos_7_7(self): + """ + Test 'tracepath6' on Centos 7.7 + """ + self.assertEqual(jc.parsers.tracepath.parse(self.centos_7_7_tracepath6, quiet=True), self.centos_7_7_tracepath6_json) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_traceroute.py b/tests/test_traceroute.py new file mode 100644 index 00000000..31bfdfcd --- /dev/null +++ b/tests/test_traceroute.py @@ -0,0 +1,235 @@ +import os +import unittest +import json +import jc.parsers.traceroute + +THIS_DIR = os.path.dirname(os.path.abspath(__file__)) + + +class MyTests(unittest.TestCase): + + def setUp(self): + # input + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/traceroute.out'), 'r', encoding='utf-8') as f: + self.centos_7_7_traceroute = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/traceroute-no-header.out'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_traceroute_noheader = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/traceroute-asn.out'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_traceroute_asn = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/traceroute-mult-addresses.out'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_traceroute_mult_addresses = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/traceroute-q.out'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_traceroute_q = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/traceroute.out'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_traceroute = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/traceroute6-mult-addresses.out'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_traceroute6_mult_addresses = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/traceroute6.out'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_traceroute6 = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/traceroute.out'), 'r', encoding='utf-8') as f: + self.freebsd12_traceroute = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/traceroute6.out'), 'r', encoding='utf-8') as f: + self.freebsd12_traceroute6 = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/traceroute1.out'), 'r', encoding='utf-8') as f: + self.generic_traceroute1 = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/traceroute2.out'), 'r', encoding='utf-8') as f: + self.generic_traceroute2 = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/traceroute3.out'), 'r', encoding='utf-8') as f: + self.generic_traceroute3 = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/traceroute4.out'), 'r', encoding='utf-8') as f: + self.generic_traceroute4 = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/traceroute5.out'), 'r', encoding='utf-8') as f: + self.generic_traceroute5 = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/traceroute6.out'), 'r', encoding='utf-8') as f: + self.generic_traceroute6 = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/traceroute7.out'), 'r', encoding='utf-8') as f: + self.generic_traceroute7 = f.read() + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/traceroute8.out'), 'r', encoding='utf-8') as f: + self.generic_traceroute8 = f.read() + + # output + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/traceroute.json'), 'r', encoding='utf-8') as f: + self.centos_7_7_traceroute_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/traceroute-asn.json'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_traceroute_asn_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/traceroute-mult-addresses.json'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_traceroute_mult_addresses_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/traceroute-q.json'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_traceroute_q_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/traceroute.json'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_traceroute_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/traceroute6-mult-addresses.json'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_traceroute6_mult_addresses_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/traceroute6.json'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_traceroute6_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/traceroute.json'), 'r', encoding='utf-8') as f: + self.freebsd12_traceroute_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/freebsd12/traceroute6.json'), 'r', encoding='utf-8') as f: + self.freebsd12_traceroute6_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/traceroute1.json'), 'r', encoding='utf-8') as f: + self.generic_traceroute1_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/traceroute2.json'), 'r', encoding='utf-8') as f: + self.generic_traceroute2_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/traceroute3.json'), 'r', encoding='utf-8') as f: + self.generic_traceroute3_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/traceroute4.json'), 'r', encoding='utf-8') as f: + self.generic_traceroute4_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/traceroute5.json'), 'r', encoding='utf-8') as f: + self.generic_traceroute5_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/traceroute6.json'), 'r', encoding='utf-8') as f: + self.generic_traceroute6_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/traceroute7.json'), 'r', encoding='utf-8') as f: + self.generic_traceroute7_json = json.loads(f.read()) + + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/generic/traceroute8.json'), 'r', encoding='utf-8') as f: + self.generic_traceroute8_json = json.loads(f.read()) + + def test_traceroute_nodata(self): + """ + Test 'traceroute' with no data + """ + self.assertEqual(jc.parsers.traceroute.parse('', quiet=True), {}) + + def test_traceroute_noheader(self): + """ + Test 'traceroute' with missing header row. Should generate a ParseError exception + """ + self.assertRaises(jc.parsers.traceroute.ParseError, jc.parsers.traceroute.parse, self.osx_10_14_6_traceroute_noheader) + + def test_traceroute_centos_7_7(self): + """ + Test 'traceroute' on Centos 7.7 + """ + self.assertEqual(jc.parsers.traceroute.parse(self.centos_7_7_traceroute, quiet=True), self.centos_7_7_traceroute_json) + + def test_traceroute_a_osx_10_14_6(self): + """ + Test 'traceroute -a' on OSX 10.14.6 + """ + self.assertEqual(jc.parsers.traceroute.parse(self.osx_10_14_6_traceroute_asn, quiet=True), self.osx_10_14_6_traceroute_asn_json) + + def test_traceroute_mult_addresses_osx_10_14_6(self): + """ + Test 'traceroute' with multiple addresses returned via dns on OSX 10.14.6 + """ + self.assertEqual(jc.parsers.traceroute.parse(self.osx_10_14_6_traceroute_mult_addresses, quiet=True), self.osx_10_14_6_traceroute_mult_addresses_json) + + def test_traceroute_q_osx_10_14_6(self): + """ + Test 'traceroute -q' on OSX 10.14.6 + """ + self.assertEqual(jc.parsers.traceroute.parse(self.osx_10_14_6_traceroute_q, quiet=True), self.osx_10_14_6_traceroute_q_json) + + def test_traceroute_osx_10_14_6(self): + """ + Test 'traceroute' on OSX 10.14.6 + """ + self.assertEqual(jc.parsers.traceroute.parse(self.osx_10_14_6_traceroute, quiet=True), self.osx_10_14_6_traceroute_json) + + def test_traceroute6_mult_addresses_osx_10_14_6(self): + """ + Test 'traceroute6' with multiple addresses returned via dns on OSX 10.14.6 + """ + self.assertEqual(jc.parsers.traceroute.parse(self.osx_10_14_6_traceroute6_mult_addresses, quiet=True), self.osx_10_14_6_traceroute6_mult_addresses_json) + + def test_traceroute6_osx_10_14_6(self): + """ + Test 'traceroute6' on OSX 10.14.6 + """ + self.assertEqual(jc.parsers.traceroute.parse(self.osx_10_14_6_traceroute6, quiet=True), self.osx_10_14_6_traceroute6_json) + + def test_traceroute_freebsd12(self): + """ + Test 'traceroute' on freebsd12 + """ + self.assertEqual(jc.parsers.traceroute.parse(self.freebsd12_traceroute, quiet=True), self.freebsd12_traceroute_json) + + def test_traceroute6_freebsd12(self): + """ + Test 'traceroute6' on freebsd12 + """ + self.assertEqual(jc.parsers.traceroute.parse(self.freebsd12_traceroute6, quiet=True), self.freebsd12_traceroute6_json) + + def test_traceroute1_generic(self): + """ + Test 'traceroute' + """ + self.assertEqual(jc.parsers.traceroute.parse(self.generic_traceroute1, quiet=True), self.generic_traceroute1_json) + + def test_traceroute2_generic(self): + """ + Test 'traceroute' + """ + self.assertEqual(jc.parsers.traceroute.parse(self.generic_traceroute2, quiet=True), self.generic_traceroute2_json) + + def test_traceroute3_generic(self): + """ + Test 'traceroute' + """ + self.assertEqual(jc.parsers.traceroute.parse(self.generic_traceroute3, quiet=True), self.generic_traceroute3_json) + + def test_traceroute4_generic(self): + """ + Test 'traceroute' + """ + self.assertEqual(jc.parsers.traceroute.parse(self.generic_traceroute4, quiet=True), self.generic_traceroute4_json) + + def test_traceroute5_generic(self): + """ + Test 'traceroute' + """ + self.assertEqual(jc.parsers.traceroute.parse(self.generic_traceroute5, quiet=True), self.generic_traceroute5_json) + + def test_traceroute6_generic(self): + """ + Test 'traceroute' + """ + self.assertEqual(jc.parsers.traceroute.parse(self.generic_traceroute6, quiet=True), self.generic_traceroute6_json) + + def test_traceroute7_generic(self): + """ + Test 'traceroute' + """ + self.assertEqual(jc.parsers.traceroute.parse(self.generic_traceroute7, quiet=True), self.generic_traceroute7_json) + + def test_traceroute8_generic(self): + """ + Test 'traceroute' + """ + self.assertEqual(jc.parsers.traceroute.parse(self.generic_traceroute8, quiet=True), self.generic_traceroute8_json) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_uname.py b/tests/test_uname.py index ca2ca2de..41bc22a1 100644 --- a/tests/test_uname.py +++ b/tests/test_uname.py @@ -22,6 +22,9 @@ class MyTests(unittest.TestCase): with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/uname-a.out'), 'r', encoding='utf-8') as f: self.osx_10_14_6_uname_a = f.read() + with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/uname.out'), 'r', encoding='utf-8') as f: + self.osx_10_14_6_uname = f.read() + # output with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/uname-a.json'), 'r', encoding='utf-8') as f: self.centos_7_7_uname_a_json = json.loads(f.read()) @@ -41,6 +44,12 @@ class MyTests(unittest.TestCase): """ self.assertEqual(jc.parsers.uname.parse('', quiet=True), {}) + def test_uname_no_a(self): + """ + Test 'uname' without -a option. Should generate a ParseError exception + """ + self.assertRaises(jc.parsers.uname.ParseError, jc.parsers.uname.parse, self.osx_10_14_6_uname) + def test_uname_centos_7_7(self): """ Test 'uname -a' on Centos 7.7