runner: Add support for aborting on network failure
PATCH 2/2 HAX: Check all conditions to abort
In reply to Petri Latvala--- runner/executor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
runner/executor.c +1 -1
@@ -288,7 +288,7 @@ static char *need_to_abort(const struct settings* settings)for (it = abort_handlers; it->condition; it++) {char *abort; -if (!(settings->abort_mask & it->condition)) +if (false && !(settings->abort_mask & it->condition))continue ; abort = it->handler ();
Signature · 6 lines
2.19.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH 1/2 runner: Add support for aborting on network failure
If the network goes down while testing, CI tends to interpret that as the device being down, cutting its power after a while. This causes an incomplete to an innocent test, increasing noise in the results.
A new flag to --abort-on-monitored-error, "ping", uses liboping to ping a host configured in .igtrc with one ping after each test execution and aborts the run if there is no reply in a hardcoded amount of time.
--- meson.build | 1 + meson_options.txt | 6 +++ runner/executor.c | 104 +++++++++++++++++++++++++++++++++++++++++++++ runner/meson.build | 12 +++++- runner/settings.c | 3 ++ runner/settings.h | 5 ++- 6 files changed, 128 insertions(+), 3 deletions(-)
meson.build +1 -0
@@ -86,6 +86,7 @@ build_tests = get_option('build_tests') with_libdrm = get_option('with_libdrm') with_libunwind = get_option('with_libunwind') build_runner = get_option('build_runner') +with_oping = get_option('with_oping') _build_overlay = build_overlay != 'false' _overlay_required = build_overlay == 'true'
meson_options.txt +6 -0
@@ -64,6 +64,12 @@ option('build_runner', choices : ['auto', 'true', 'false'], description : 'Build test runner') +option('with_oping', + type : 'combo', + value : 'auto', + choices : ['auto', 'true', 'false'], + description : 'Build igt_runner with liboping') + option('use_rpath', type : 'boolean', value : false,
runner/executor.c +104 -0
128 lines not on this page · raw message
runner/meson.build +11 -1
@@ -1,4 +1,13 @@ jsonc = dependency('json-c', required: _runner_required) +runner_deps = [jsonc, glib] +have_oping = [] +if with_oping != 'false' + oping = dependency('liboping', required: with_oping == 'true') + if oping.found() + runner_deps += oping + have_oping = '-DHAVE_OPING=1' + endif +endif runnerlib_sources = [ 'settings.c', 'job_list.c',
@@ -17,7 +26,8 @@ if _build_runner and jsonc.found() runnerlib = static_library('igt_runner', runnerlib_sources, include_directories : inc, - dependencies : jsonc) + c_args : have_oping, + dependencies : runner_deps) runner = executable('igt_runner', runner_sources, link_with : runnerlib,
runner/settings.c +3 -0
@@ -47,6 +47,7 @@ static struct { } abort_conditions[] = { { ABORT_TAINT, "taint" }, { ABORT_LOCKDEP, "lockdep" }, + { ABORT_PING, "ping" }, { ABORT_ALL, "all" }, { 0, 0 }, };
@@ -135,6 +136,8 @@ static const char *usage_str =" Possible conditions:\n" " lockdep - abort when kernel lockdep has been angered.\n" " taint - abort when kernel becomes fatally tainted.\n" +" ping - abort when a host configured in .igtrc does\n" +" not respond to ping.\n" " all - abort for all of the above.\n" " -s, --sync Sync results to disk after every test\n" " -l {quiet,verbose,dummy}, --log-level {quiet,verbose,dummy}\n"
runner/settings.h +3 -2
@@ -14,9 +14,10 @@ enum {#define ABORT_TAINT (1 << 0)#define ABORT_LOCKDEP (1 << 1) -#define ABORT_ALL (ABORT_TAINT | ABORT_LOCKDEP) +#define ABORT_PING (1 << 2) +#define ABORT_ALL (ABORT_TAINT | ABORT_LOCKDEP | ABORT_PING) -_Static_assert (ABORT_ALL == (ABORT_TAINT |ABORT_LOCKDEP ),"ABORT_ALL must be all conditions bitwise or'd" ); +_Static_assert (ABORT_ALL == (ABORT_TAINT |ABORT_LOCKDEP |ABORT_PING ),"ABORT_ALL must be all conditions bitwise or'd" );struct regex_list {char **regex_strings;
Signature · 6 lines
2.19.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] runner: Add support for aborting on network failure
== Series Details ==
== Series Details ==
Series: series starting with [i-g-t,1/2] runner: Add support for aborting on network failure
URL : https://patchwork.freedesktop.org/series/53841/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5292 -> IGTPW_2140
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/53841/revisions/1/mbox/
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_2140:
### IGT changes ###
#### Possible regressions ####
* igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
- {fi-icl-u3}: PASS -> INCOMPLETE
* {igt@runner@aborted}:
- {fi-kbl-7500u}: NOTRUN -> FAIL
Known issues
------------
Here are the changes found in IGTPW_2140 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@amdgpu/amd_basic@cs-compute:
- fi-kbl-8809g: NOTRUN -> FAIL [fdo#108094]
* igt@amdgpu/amd_prime@amd-to-i915:
- fi-kbl-8809g: NOTRUN -> FAIL [fdo#107341]
* igt@i915_selftest@live_contexts:
- fi-bsw-n3050: NOTRUN -> DMESG-FAIL [fdo#108626] / [fdo#108656]
* igt@i915_selftest@live_hangcheck:
- fi-skl-iommu: PASS -> INCOMPLETE [fdo#108602] / [fdo#108744]
* igt@i915_selftest@live_sanitycheck:
- fi-gdg-551: PASS -> INCOMPLETE [fdo#108789]
* igt@kms_chamelium@common-hpd-after-suspend:
- fi-icl-u2: NOTRUN -> DMESG-FAIL [fdo#103375] / [fdo#107732] / [fdo#108070] / [fdo#108924]
* igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
- fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362]
* igt@prime_vgem@basic-fence-flip:
- fi-gdg-551: PASS -> FAIL [fdo#103182]
* {igt@runner@aborted}:
- fi-cfl-8109u: NOTRUN -> FAIL [fdo#105702]
- fi-icl-u2: NOTRUN -> FAIL [fdo#108070]
- fi-skl-iommu: NOTRUN -> FAIL [fdo#108602]#### Possible fixes ####
* igt@amdgpu/amd_basic@userptr:
- fi-kbl-8809g: DMESG-WARN [fdo#108965] -> PASS
* igt@i915_selftest@live_gem:
- fi-bsw-n3050: DMESG-WARN [fdo#108797] -> PASS
* igt@kms_frontbuffer_tracking@basic:
- fi-byt-clapper: FAIL [fdo#103167] -> PASS
* igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b:
- fi-byt-clapper: FAIL [fdo#107362] -> PASS
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- fi-cfl-8109u: DMESG-WARN [fdo#109000] -> PASS
#### Warnings ####
* igt@gem_ctx_create@basic-files:
- fi-bsw-kefka: FAIL [fdo#108656] -> INCOMPLETE [fdo#105876] / [fdo#108714]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#105702]: https://bugs.freedesktop.org/show_bug.cgi?id=105702
[fdo#105876]: https://bugs.freedesktop.org/show_bug.cgi?id=105876
[fdo#107341]: https://bugs.freedesktop.org/show_bug.cgi?id=107341
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#107732]: https://bugs.freedesktop.org/show_bug.cgi?id=107732
[fdo#108070]: https://bugs.freedesktop.org/show_bug.cgi?id=108070
[fdo#108094]: https://bugs.freedesktop.org/show_bug.cgi?id=108094
[fdo#108602]: https://bugs.freedesktop.org/show_bug.cgi?id=108602
[fdo#108626]: https://bugs.freedesktop.org/show_bug.cgi?id=108626
[fdo#108656]: https://bugs.freedesktop.org/show_bug.cgi?id=108656
[fdo#108714]: https://bugs.freedesktop.org/show_bug.cgi?id=108714
[fdo#108744]: https://bugs.freedesktop.org/show_bug.cgi?id=108744
[fdo#108789]: https://bugs.freedesktop.org/show_bug.cgi?id=108789
[fdo#108797]: https://bugs.freedesktop.org/show_bug.cgi?id=108797
[fdo#108924]: https://bugs.freedesktop.org/show_bug.cgi?id=108924
[fdo#108965]: https://bugs.freedesktop.org/show_bug.cgi?id=108965
[fdo#109000]: https://bugs.freedesktop.org/show_bug.cgi?id=109000
Participating hosts (50 -> 45)
------------------------------
Additional (1): fi-icl-u2
Missing (6): fi-kbl-soraka fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-kbl-7560u
Build changes
-------------
* IGT: IGT_4744 -> IGTPW_2140
CI_DRM_5292: ec6b8cacbc8777a77119fa7af7e2930fe186091b @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2140: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2140/
IGT_4744: 4579ac1d445cf39f6de474071b20db790db575bd @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2140/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] runner: Add support for aborting on network failure
Quoted 27 lines · Patchwork
== Series Details ==
Series: series starting with [i-g-t,1/2] runner: Add support for aborting on network failure
URL : https://patchwork.freedesktop.org/series/53841/
State : success== Summary ==
CI Bug Log - changes from
CI_DRM_5292->IGTPW_2140
====================================================Summary
-------**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/53841/revisions/1/mbox/
Possible new issues
-------------------Here are the unknown changes that may have been introduced in
IGTPW_2140:### IGT changes ###
Quoted 7 lines
#### Possible regressions ####
* igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
- {fi-icl-u3}: PASS -> INCOMPLETE* {igt@runner@aborted}:
- {fi-kbl-7500u}: NOTRUN -> FAIL
The lesson learned from this one is that e1000e takes relative ages to get a link back when resuming from suspend. I'll increase the ping timeout to like 20 seconds for v2.
Signature · 5 lines
Petri Latvala _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] runner: Add support for aborting on network failure
In reply to Petri Latvala== Series Details ==
== Series Details ==
Series: series starting with [i-g-t,1/2] runner: Add support for aborting on network failure
URL : https://patchwork.freedesktop.org/series/53841/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5292_full -> IGTPW_2140_full
====================================================
Summary
-------
**WARNING**
Minor unknown changes coming with IGTPW_2140_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in IGTPW_2140_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/53841/revisions/1/mbox/
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_2140_full:
### IGT changes ###
#### Possible regressions ####
* {igt@runner@aborted}:
- shard-snb: NOTRUN -> FAIL
#### Warnings ####
* igt@pm_rc6_residency@rc6-accuracy:
- shard-snb: PASS -> SKIP
Known issues
------------
Here are the changes found in IGTPW_2140_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_isolation@bcs0-s3:
- shard-kbl: PASS -> INCOMPLETE [fdo#103665]
* igt@kms_cursor_crc@cursor-128x128-suspend:
- shard-glk: PASS -> INCOMPLETE [fdo#103359] / [k.org#198133]
* igt@kms_cursor_crc@cursor-256x256-dpms:
- shard-kbl: PASS -> FAIL [fdo#103232]
* igt@kms_cursor_crc@cursor-64x64-sliding:
- shard-apl: PASS -> FAIL [fdo#103232] +2
* igt@kms_cursor_crc@cursor-64x64-suspend:
- shard-kbl: PASS -> FAIL [fdo#103191] / [fdo#103232]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-move:
- shard-apl: PASS -> FAIL [fdo#103167]
* igt@kms_frontbuffer_tracking@fbc-rgb565-draw-blt:
- shard-snb: PASS -> DMESG-FAIL [fdo#103167] / [fdo#107469]
* {igt@kms_plane@pixel-format-pipe-b-planes-source-clamping}:
- shard-glk: PASS -> FAIL [fdo#108948]
* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
- shard-glk: PASS -> FAIL [fdo#108145]
* igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
- shard-apl: PASS -> FAIL [fdo#103166] +6
- shard-kbl: PASS -> FAIL [fdo#103166] +1
* igt@kms_rotation_crc@primary-rotation-180:
- shard-snb: NOTRUN -> FAIL [fdo#103925]
* igt@kms_setmode@basic:
- shard-hsw: PASS -> FAIL [fdo#99912]
* igt@kms_universal_plane@universal-plane-pipe-c-functional:
- shard-glk: PASS -> FAIL [fdo#103166] +3
* igt@perf_pmu@rc6-runtime-pm-long:
- shard-apl: PASS -> FAIL [fdo#105010]
- shard-glk: PASS -> FAIL [fdo#105010]
- shard-kbl: PASS -> FAIL [fdo#105010]#### Possible fixes ####
* igt@kms_available_modes_crc@available_mode_test_crc:
- shard-apl: FAIL [fdo#106641] -> PASS
* igt@kms_color@pipe-b-legacy-gamma:
- shard-apl: FAIL [fdo#104782] -> PASS
- shard-kbl: FAIL [fdo#104782] -> PASS
* igt@kms_cursor_crc@cursor-128x128-onscreen:
- shard-kbl: FAIL [fdo#103232] -> PASS +2
* igt@kms_cursor_crc@cursor-256x85-sliding:
- shard-glk: FAIL [fdo#103232] -> PASS +2
* igt@kms_cursor_crc@cursor-64x21-random:
- shard-apl: FAIL [fdo#103232] -> PASS +2
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
- shard-apl: FAIL [fdo#103167] -> PASS +1
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
- shard-kbl: FAIL [fdo#103167] -> PASS
* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-cpu:
- shard-glk: FAIL [fdo#103167] -> PASS +5
* {igt@kms_plane@pixel-format-pipe-c-planes-source-clamping}:
- shard-apl: FAIL [fdo#108948] -> PASS
* igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
- shard-apl: FAIL [fdo#103166] -> PASS +4
* igt@kms_plane_multiple@atomic-pipe-b-tiling-x:
- shard-glk: FAIL [fdo#103166] -> PASS +1
* igt@kms_plane_multiple@atomic-pipe-c-tiling-y:
- shard-kbl: FAIL [fdo#103166] -> PASS
* {igt@kms_rotation_crc@multiplane-rotation-cropping-top}:
- shard-kbl: DMESG-FAIL [fdo#108950] -> PASS
- shard-glk: DMESG-FAIL [fdo#105763] / [fdo#106538] -> PASS
* igt@prime_vgem@shrink:
- shard-snb: INCOMPLETE [fdo#105411] / [fdo#107469] -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#103925]: https://bugs.freedesktop.org/show_bug.cgi?id=103925
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#105010]: https://bugs.freedesktop.org/show_bug.cgi?id=105010
[fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
[fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
[fdo#106538]: https://bugs.freedesktop.org/show_bug.cgi?id=106538
[fdo#106641]: https://bugs.freedesktop.org/show_bug.cgi?id=106641
[fdo#107469]: https://bugs.freedesktop.org/show_bug.cgi?id=107469
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948
[fdo#108950]: https://bugs.freedesktop.org/show_bug.cgi?id=108950
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
[k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133
Participating hosts (7 -> 5)
------------------------------
Missing (2): shard-skl shard-iclb
Build changes
-------------
* IGT: IGT_4744 -> IGTPW_2140
* Piglit: piglit_4509 -> None
CI_DRM_5292: ec6b8cacbc8777a77119fa7af7e2930fe186091b @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2140: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2140/
IGT_4744: 4579ac1d445cf39f6de474071b20db790db575bd @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2140/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 73 lines · Petri Latvala
runner/executor.c +58
-0@@ -1,6 +1,10 @@#include <errno.h> #include <fcntl.h> +#include <glib.h> #include <linux/watchdog.h> +#if HAVE_OPING +#include <oping.h> +#endif #include <signal.h> #include <stdio.h> #include <stdlib.h> @@ -108,6 +112,104 @@ static void ping_watchdogs(void) } } +#if HAVE_OPING +static pingobj_t *pingobj =NULL ; +#endif + +static void load_ping_config (void ) +{ +#if HAVE_OPING +char *key_file_env =NULL ; +char *key_file_loc =NULL ; +GError *error =NULL ; +GKeyFile *key_file =NULL ; +const char *ping_hostname; +double timeout =2.0 ;/* Fair dice roll */ + +if (pingobj) +return ; + +/* Determine igt config path */ + key_file_env =getenv ("IGT_CONFIG_PATH" ); +if (key_file_env) { + key_file_loc = key_file_env; + }else { + key_file_loc =malloc (100 ); +snprintf (key_file_loc,100 ,"%s/.igtrc" ,g_get_home_dir ()); + } + +/* Load igt config file */ + key_file =g_key_file_new (); +g_key_file_load_from_file (key_file, key_file_loc, +G_KEY_FILE_NONE , &error); +if (error && error->code ==G_KEY_FILE_ERROR ) { +g_error_free (error); + key_file =NULL ; + + goto out; + } + +g_clear_error (&error); + + ping_hostname = +g_key_file_get_string (key_file,"DUT" , +"PingHostName" , &error); + +g_clear_error (&error); + +if (!ping_hostname) +return ; + + pingobj =ping_construct (); +if (ping_host_add (pingobj, ping_hostname)) { +fprintf (stderr, +"abort on ping: Cannot add configured hostname\n" ); +ping_destroy (pingobj); + pingobj =NULL ; +return ;
runner/executor.c static void ping_watchdogs(void) · line 179
Quoted 10 lines
runner/executor.c +10
-0+ } + +ping_setopt (pingobj,PING_OPT_TIMEOUT , &timeout); + +out: +if (!key_file_env && key_file_loc) +free (key_file_loc); +g_key_file_free (key_file); +#endif +}
I think that having an option to set the host through a cmdline switch/ENV variable can be useful, especially for the CI. The .igtrc is perfect for testing in a limiteds scope, but rolling out updated configuration to 100s of hosts is a file form is rather cumbersome.
Also, it feels like it's about a time to start writing man pages for the runner. Any takers? ;-)
-Arek
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev