diff options
author | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2019-08-16 11:18:04 +0300 |
---|---|---|
committer | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2019-08-20 07:52:04 +0300 |
commit | ce130a078c85ce3f2bdb02047cba5b72702a79c3 (patch) | |
tree | f63c34dd0bfa1ffe3f83caff19d54508be4fa6ec /tests/kms_chamelium.c | |
parent | ffa792ea29a0e19689b15c20173e3808422dea88 (diff) |
tests/kms_chamelium: Wait for chamelium being reachable after a suspend
Getting network back after waking up from suspend takes some time.
If it's not quick enough, it may cause any following chamelium_rpc
to fail.
This includes the chamelium port reset in exit handler:
igt_chamelium-CRITICAL: Test assertion failure function chamelium_rpc,
file ../lib/igt_chamelium.c:349:
igt_chamelium-CRITICAL: Failed assertion: !chamelium->env.fault_occurred
igt_chamelium-CRITICAL: Last errno: 113, No route to host
igt_chamelium-CRITICAL: Chamelium RPC call failed: libcurl failed to execute
the HTTP POST transaction, explaining:
Failed to connect to 192.168.1.224 port 9992: No route to host
Stack trace:
#0 ../lib/igt_core.c:1674 __igt_fail_assert()
#1 [chamelium_rpc+0x1ea]
#2 ../lib/igt_chamelium.c:2274 chamelium_reset()
#3 ../lib/igt_chamelium.c:2361 chamelium_deinit()
#4 ../lib/igt_core.c:2124 call_exit_handlers()
So let's wait for Chamelium to be reachable after each suspend_autoresume.
v2: Bump the network timeout to 20s,
the slowest observed bring-up was 17s. (Petri)
Do not DECREF if we get NULL from __chmelium_rpc(). (Simon & CI)
Cc: Simon Ser <simon.ser@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109380
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Simon Ser <simon.ser@intel.com>
Diffstat (limited to 'tests/kms_chamelium.c')
-rw-r--r-- | tests/kms_chamelium.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c index 756e59ba..d6aec8b9 100644 --- a/tests/kms_chamelium.c +++ b/tests/kms_chamelium.c @@ -57,6 +57,7 @@ typedef struct { } data_t; #define HOTPLUG_TIMEOUT 20 /* seconds */ +#define ONLINE_TIMEOUT 20 /* seconds */ #define HPD_STORM_PULSE_INTERVAL_DP 100 /* ms */ #define HPD_STORM_PULSE_INTERVAL_HDMI 200 /* ms */ @@ -369,6 +370,7 @@ try_suspend_resume_hpd(data_t *data, struct chamelium_port *port, igt_system_suspend_autoresume(state, test); igt_assert(wait_for_hotplug(mon, &timeout)); + chamelium_wait_reachable(data->chamelium, ONLINE_TIMEOUT); if (port) { igt_assert_eq(reprobe_connector(data, port), target_state); @@ -474,8 +476,8 @@ test_suspend_resume_edid_change(data_t *data, struct chamelium_port *port, igt_flush_hotplugs(mon); igt_system_suspend_autoresume(state, test); - igt_assert(igt_hotplug_detected(mon, HOTPLUG_TIMEOUT)); + chamelium_wait_reachable(data->chamelium, ONLINE_TIMEOUT); get_connectors_link_status_failed(data, link_status_failed[1]); |