diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-08-21 09:43:20 -0700 |
---|---|---|
committer | Brent Stapleton <bstapleton@g.hmc.edu> | 2018-08-22 18:37:12 -0700 |
commit | 9c7d251b32eb476e11f8fce13a797c4de9abc796 (patch) | |
tree | b5a398480e689bc85a965573a24d81915849c53d /host | |
parent | 21d725084912d29e15099e24d23b48592d9dcdc4 (diff) | |
download | uhd-9c7d251b32eb476e11f8fce13a797c4de9abc796.tar.gz uhd-9c7d251b32eb476e11f8fce13a797c4de9abc796.tar.bz2 uhd-9c7d251b32eb476e11f8fce13a797c4de9abc796.zip |
devtest: Remove parsing for DD.. and SS..
Detecting drops by parsing for DD and SS was a flawed method. Tools
should find those programmatically. Plus, the string 'DDC' would
interfere with the regex. Also, we're now using
UHD_LOG_FASTPATH_DISABLE.
Diffstat (limited to 'host')
-rwxr-xr-x | host/tests/devtest/benchmark_rate_test.py | 13 | ||||
-rwxr-xr-x | host/tests/devtest/rx_samples_to_file_test.py | 4 | ||||
-rwxr-xr-x | host/tests/devtest/tx_bursts_test.py | 1 | ||||
-rwxr-xr-x | host/tests/devtest/uhd_test_base.py | 12 |
4 files changed, 14 insertions, 16 deletions
diff --git a/host/tests/devtest/benchmark_rate_test.py b/host/tests/devtest/benchmark_rate_test.py index 39d8bd483..1548b795c 100755 --- a/host/tests/devtest/benchmark_rate_test.py +++ b/host/tests/devtest/benchmark_rate_test.py @@ -10,6 +10,11 @@ import re from uhd_test_base import uhd_example_test_case +DEFAULT_O_THRESHOLD = 1000 +DEFAULT_U_THRESHOLD = 1000 +DEFAULT_D_THRESHOLD = 50 +DEFAULT_S_THRESHOLD = 50 + class uhd_benchmark_rate_test(uhd_example_test_case): """ Run benchmark_rate in various configurations. @@ -42,6 +47,14 @@ class uhd_benchmark_rate_test(uhd_example_test_case): self.create_addr_args_str(), '--duration', str(duration), '--channels', str(chan), + '--overrun-threshold', + str(test_args.get('acceptable-overruns', DEFAULT_O_THRESHOLD)), + '--underrun-threshold', + str(test_args.get('acceptable-underruns', DEFAULT_U_THRESHOLD)), + '--drop-threshold', + str(test_args.get('acceptable-D', DEFAULT_D_THRESHOLD)), + '--seq-threshold', + str(test_args.get('acceptable-S', DEFAULT_S_THRESHOLD)), ] if 'tx' in test_args.get('direction', ''): args.append('--tx_rate') diff --git a/host/tests/devtest/rx_samples_to_file_test.py b/host/tests/devtest/rx_samples_to_file_test.py index fe03dc9f8..b12eae9ad 100755 --- a/host/tests/devtest/rx_samples_to_file_test.py +++ b/host/tests/devtest/rx_samples_to_file_test.py @@ -45,11 +45,9 @@ class rx_samples_to_file_test(uhd_example_test_case): if test_args.has_key('subdev'): args.append('--subdev') args.append(test_args['subdev']) - (app, run_results) = self.run_example('rx_samples_to_file', args) + _, run_results = self.run_example('rx_samples_to_file', args) # Evaluate pass/fail: run_results['passed'] = all([ - not run_results['has_D'], - not run_results['has_S'], run_results['return_code'] == 0, ]) self.report_example_results(test_name, run_results) diff --git a/host/tests/devtest/tx_bursts_test.py b/host/tests/devtest/tx_bursts_test.py index 24537a00b..48bc4d2cb 100755 --- a/host/tests/devtest/tx_bursts_test.py +++ b/host/tests/devtest/tx_bursts_test.py @@ -45,7 +45,6 @@ class uhd_tx_bursts_test(uhd_example_test_case): # Evaluate pass/fail: run_results['passed'] = all([ app.returncode == 0, - not run_results['has_S'], ]) run_results['async_burst_ack_found'] = re.search('success', app.stdout) is not None self.report_example_results(test_name, run_results) diff --git a/host/tests/devtest/uhd_test_base.py b/host/tests/devtest/uhd_test_base.py index 71e652459..a1fd8216e 100755 --- a/host/tests/devtest/uhd_test_base.py +++ b/host/tests/devtest/uhd_test_base.py @@ -38,22 +38,12 @@ def filter_stderr(stderr, run_results=None): """ Filters the output to stderr. run_results[] is a dictionary. This function will: - - Remove UUUUU... strings, since they are generally not a problem. - - Remove all DDDD and SSSS strings, and add run_results['has_S'] = True - and run_results['has_D'] = True. - Remove warnings and put them in run_results['warnings'] - Put the filtered error string into run_results['errors'] and returns the dictionary """ run_results = run_results or {} errstr, run_results['warnings'] = filter_warnings(stderr) # Scan for underruns and sequence errors / dropped packets not detected in the counter - errstr = re.sub('UU+', '', errstr) - (errstr, n_subs) = re.subn('SS+', '', errstr) - if n_subs: - run_results['has_S'] = True - (errstr, n_subs) = re.subn('DD+', '', errstr) - if n_subs: - run_results['has_D'] = True errstr = re.sub("\n\n+", "\n", errstr) run_results['errors'] = errstr.strip() return run_results @@ -205,8 +195,6 @@ class uhd_example_test_case(uhd_test_case): run_results = { 'return_code': app.returncode, 'passed': False, - 'has_D': False, - 'has_S': False, } run_results = filter_stderr(app.stderr, run_results) self.log.info('STDERR Output:') |