lib/igt_kmod: Allow specifying libkmod config via environment variables
PATCH 1/1 lib/igt_kmod: Allow specifying libkmod config via environment variables
Allow specifying the kernel module configuration via environment variables. This allows enumerating the subtests of the kselftest wrappers from sysroot directory.
IGT_KMOD_CONFIG_PATHS="" \
IGT_KMOD_DIRNAME="/path/to/sysroot/lib/modules/X.Y.Z" \ tests/drm_mm --list-subtests
--- lib/igt_kmod.c | 44 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-)
lib/igt_kmod.c +40 -4
@@ -56,14 +56,50 @@ static void squelch(void *data, int priority,static struct kmod_ctx *kmod_ctx (void ) {static struct kmod_ctx *ctx; +const char **config_paths =NULL ; +char *config_paths_str; +char *dirname; + +if (ctx) + goto out; + + dirname =getenv ("IGT_KMOD_DIRNAME" ); +if (dirname) +igt_debug ("kmod dirname = %s\n" , dirname); + + config_paths_str =getenv ("IGT_KMOD_CONFIG_PATHS" ); +if (config_paths_str) +igt_debug ("kmod config paths = %s\n" , config_paths_str); + +if (config_paths_str) { +unsigned count = !!strlen (config_paths_str); +unsigned i; +char * p; + + p = config_paths_str; +while ((p =strchr (p,':' ))) p++, count++; -if (!ctx) { - ctx =kmod_new (NULL ,NULL ); -igt_assert (ctx !=NULL ); -kmod_set_log_fn (ctx, squelch,NULL ); + config_paths =malloc (sizeof (*config_paths) * (count +1 )); +igt_assert (config_paths !=NULL ); + + p = config_paths_str; +for (i =0 ; i < count; ++i) { + config_paths[i] = p; + +if ((p =strchr (p,':' ))) + *p++ ='\0' ; + } + config_paths[i] =NULL ; } + ctx =kmod_new (dirname, config_paths); +igt_assert (ctx !=NULL ); + +free (config_paths); + +kmod_set_log_fn (ctx, squelch,NULL ); +out:return ctx; }
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Joonas Lahtinen (2017-09-12 16:44:10)
Quoted 7 lines
Allow specifying the kernel module configuration via environment variables. This allows enumerating the subtests of the kselftest wrappers from sysroot directory.
IGT_KMOD_CONFIG_PATHS="" \
IGT_KMOD_DIRNAME="/path/to/sysroot/lib/modules/X.Y.Z" \ tests/drm_mm --list-subtests
Just one quibble, but shouldn't it be PATH? E.g.
PATH=
LD_LIBRARY_PATH=
etc are similar colon-delimited sets of search directories. Then again, if they are not search directories, then just IGT_KMOD_CONFIG=
DIRNAME or just DIR? Names are where the best bikesheds are built. -Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Chris Wilson
Reviewed-byQuoting Chris Wilson (2017-09-12 16:51:40)
Quoted 10 lines
Quoting Joonas Lahtinen (2017-09-12 16:44:10)
Quoted 7 lines
Allow specifying the kernel module configuration via environment variables. This allows enumerating the subtests of the kselftest wrappers from sysroot directory.
IGT_KMOD_CONFIG_PATHS="" \
IGT_KMOD_DIRNAME="/path/to/sysroot/lib/modules/X.Y.Z" \ tests/drm_mm --list-subtestsJust one quibble, but shouldn't it be PATH? E.g.
On reflection, they match the libkmod names, so who am I to judge?
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 6 lines · Chris Wilson
Quoting Chris Wilson (2017-09-12 16:51:40)
Quoted 5 lines
Quoting Joonas Lahtinen (2017-09-12 16:44:10)
Quoted 4 lines
Allow specifying the kernel module configuration via environment variables. This allows enumerating the subtests of the kselftest wrappers from sysroot directory.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
IGT_KMOD_CONFIG_PATHS="" \
IGT_KMOD_DIRNAME="/path/to/sysroot/lib/modules/X.Y.Z" \ tests/drm_mm --list-subtestsJust one quibble, but shouldn't it be PATH? E.g.
On reflection, they match the libkmod names, so who am I to judge?
Reviewed-by Chris Wilson <[email protected]>
Yeah, I was considering IGT_MODULE_PATH and IGT_MODULE_CONFIG_PATH, but that would have indicated they might be used in other ways too, strictly sticking to KMOD convention seemed would cause least confusion.
This is now pushed, thanks for the review.
Regards, Joonas
Signature · 7 lines
Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for lib/igt_kmod: Allow specifying libkmod config via environment variables
In reply to Joonas Lahtinen== Series Details ==
== Series Details ==
Series: lib/igt_kmod: Allow specifying libkmod config via environment variables
URL : https://patchwork.freedesktop.org/series/30220/
State : success
== Summary ==
IGT patchset tested on top of latest successful build c7e116007e907f32c18cc2669e2dc4046553c8e6 igt/sw_sync: Fix up close(timeline) tests for unsignaled fences
with latest DRM-Tip kernel build CI_DRM_3078d20bacd600b7 drm-tip: 2017y-09m-12d-16h-53m-43s UTC integration manifest
Test chamelium:
Subgroup dp-crc-fast:
fail -> PASS (fi-kbl-7500u) fdo#102514
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-atomic:
fail -> PASS (fi-snb-2600) fdo#100215fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514
fdo#100215 https://bugs.freedesktop.org/show_bug.cgi?id=100215
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:452s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:459s fi-blb-e6850 total:289 pass:224 dwarn:1 dfail:0 fail:0 skip:64 time:378s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:531s fi-bwr-2160 total:289 pass:184 dwarn:0 dfail:0 fail:0 skip:105 time:269s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:508s fi-byt-j1900 total:289 pass:254 dwarn:1 dfail:0 fail:0 skip:34 time:506s fi-byt-n2820 total:289 pass:250 dwarn:1 dfail:0 fail:0 skip:38 time:504s fi-cfl-s total:289 pass:250 dwarn:4 dfail:0 fail:0 skip:35 time:467s fi-elk-e7500 total:289 pass:230 dwarn:0 dfail:0 fail:0 skip:59 time:455s fi-glk-2a total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:598s fi-hsw-4770 total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:429s fi-hsw-4770r total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:409s fi-ilk-650 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:440s fi-ivb-3520m total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:489s fi-ivb-3770 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:470s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:503s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:578s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:588s fi-pnv-d510 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:556s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:476s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:524s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:504s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:461s fi-skl-x1585l total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:484s fi-snb-2520m total:289 pass:251 dwarn:0 dfail:0 fail:0 skip:38 time:573s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:1 skip:39 time:428s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_178/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.IGT: failure for lib/igt_kmod: Allow specifying libkmod config via environment variables
In reply to Joonas Lahtinen== Series Details ==
== Series Details ==
Series: lib/igt_kmod: Allow specifying libkmod config via environment variables
URL : https://patchwork.freedesktop.org/series/30220/
State : failure
== Summary ==
Test perf:
Subgroup polling:
pass -> FAIL (shard-hsw) fdo#102252 +1
Test kms_atomic_transition:
Subgroup plane-all-transition-nonblocking:
fail -> PASS (shard-hsw) fdo#102671
Test kms_cursor_legacy:
Subgroup flip-vs-cursor-legacy:
pass -> FAIL (shard-hsw)
Test chamelium:
Subgroup hdmi-frame-dump:
skip -> INCOMPLETE (shard-hsw)
Test kms_busy:
Subgroup extended-modeset-hang-oldfb-with-reset-render-A:
pass -> DMESG-WARN (shard-hsw)
Test kms_flip:
Subgroup blocking-wf_vblank:
pass -> FAIL (shard-hsw)fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#102671 https://bugs.freedesktop.org/show_bug.cgi?id=102671
shard-hsw total:2419 pass:1295 dwarn:2 dfail:0 fail:14 skip:1060 time:9581s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_178/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx