diff mbox series

[net-next,1/1] tools: tc-testing: Can pause just before post-suite

Message ID 20180307142715.19755-1-bjb@mojatatu.com
State Changes Requested, archived
Delegated to: David Miller
Headers show
Series [net-next,1/1] tools: tc-testing: Can pause just before post-suite | expand

Commit Message

Brenda J. Butler March 7, 2018, 2:27 p.m. UTC
At debug level 5 or above, the test script will pause just before
the post_suite functions are called.  This allows the tester to
inspect the system before it is torn down.

Signed-off-by: Brenda J. Butler <bjb@mojatatu.com>
---
 tools/testing/selftests/tc-testing/tdc.py | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

David Miller March 8, 2018, 5:45 p.m. UTC | #1
From: "Brenda J. Butler" <bjb@mojatatu.com>
Date: Wed,  7 Mar 2018 09:27:14 -0500

> At debug level 5 or above, the test script will pause just before
> the post_suite functions are called.  This allows the tester to
> inspect the system before it is torn down.
> 
> Signed-off-by: Brenda J. Butler <bjb@mojatatu.com>

When someone adjusts the debug level, they expect that this is a control
over verbosity.

They don't expect it to potentially make the test hang at the TTY
waiting for user input.

Make a separate, appropriately named, knob for this.
diff mbox series

Patch

diff --git a/tools/testing/selftests/tc-testing/tdc.py b/tools/testing/selftests/tc-testing/tdc.py
index 241eea37e4a4..3f5b0a696df2 100755
--- a/tools/testing/selftests/tc-testing/tdc.py
+++ b/tools/testing/selftests/tc-testing/tdc.py
@@ -308,6 +308,7 @@  def test_runner(pm, args, filtered_tests):
     # if we failed in setup or teardown,
     # fill in the remaining tests with ok-skipped
     count = index
+
     if not args.notap:
         tap += 'about to flush the tap output if tests need to be skipped\n'
         if tcount + 1 != index:
@@ -318,6 +319,12 @@  def test_runner(pm, args, filtered_tests):
                 count += 1
 
         tap += 'done flushing skipped test tap output\n'
+
+    if args.verbose > 4:
+        print('Want to pause\nPress enter to continue ...')
+        if input(sys.stdin):
+            print('got something on stdin')
+
     pm.call_post_suite(index)
 
     return tap