diff options
author | Jeevan B <jeevan.b@intel.com> | 2021-12-03 21:58:51 +0530 |
---|---|---|
committer | Kunal Joshi <kunal1.joshi@intel.com> | 2021-12-13 14:52:28 +0530 |
commit | 27e636b46873a700ee662ce9c63499f560f02e1f (patch) | |
tree | d7767b048c639da9977145b8149b16707ba6a146 /lib/igt_aux.c | |
parent | 136258e86a093fdb50a7a341de1c09ac9a076fea (diff) |
lib/igt_aux: Rename igt_debug_manual_check and assert check if all is supplied
rename igt_debug_manual_check and patch the igt function
igt_debug_wait_for_keypress() to assert if "all" is supplied.
v2: calling igt_debug_wait_for_keypress() with "all" will assert.
v3: Change igt_assert to igt_assert_f for adding clear log message.
v4: Rebase only.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'lib/igt_aux.c')
-rw-r--r-- | lib/igt_aux.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/igt_aux.c b/lib/igt_aux.c index 2445e483..c247a1aa 100644 --- a/lib/igt_aux.c +++ b/lib/igt_aux.c @@ -972,7 +972,7 @@ void igt_drop_root(void) * Waits for a key press when run interactively and when the corresponding debug * var is set in the --interactive-debug=$var variable. Multiple keys * can be specified as a comma-separated list or alternatively "all" if a wait - * should happen for all cases. + * should happen for all cases. Calling this function with "all" will assert. * * When not connected to a terminal interactive_debug is ignored * and execution immediately continues. @@ -993,6 +993,9 @@ void igt_debug_wait_for_keypress(const char *var) if (!igt_interactive_debug) return; + if (strstr(var, "all")) + igt_assert_f(false, "Bug in test: Do not call igt_debug_wait_for_keypress with \"all\"\n"); + if (!strstr(igt_interactive_debug, var) && !strstr(igt_interactive_debug, "all")) return; @@ -1008,7 +1011,7 @@ void igt_debug_wait_for_keypress(const char *var) } /** - * igt_debug_manual_check: + * igt_debug_interactive_mode_check: * @var: var lookup to to enable this wait * @expected: message to be printed as expected behaviour before wait for keys Y/n * @@ -1028,7 +1031,7 @@ void igt_debug_wait_for_keypress(const char *var) * * Force test fail when N/n is pressed. */ -void igt_debug_manual_check(const char *var, const char *expected) +void igt_debug_interactive_mode_check(const char *var, const char *expected) { struct termios oldt, newt; char key; |