On some very basic installations (e.g. some container images) the modprobe binary might be missing. If that is the case, don't fail virkmodtest. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- tests/virkmodtest.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/virkmodtest.c b/tests/virkmodtest.c index c90830a23c..80029244ff 100644 --- a/tests/virkmodtest.c +++ b/tests/virkmodtest.c @@ -46,7 +46,12 @@ testKModConfig(const void *args ATTRIBUTE_UNUSED) */ outbuf = virKModConfig(); if (!outbuf) { - fprintf(stderr, "Failed to get config\n"); + if (virFileIsExecutable(MODPROBE)) { + fprintf(stderr, "Failed to get config\n"); + } else { + /* modprobe doesn't exist, do not claim error. */ + ret = 0; + } goto cleanup; } ret = 0; -- 2.19.2