From 8a0dc5f1bfba4493d2460bf05be9aff200a9bd04 Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Mon, 31 May 2021 21:44:02 +0200 Subject: tests: Fix loadable-kernel-modules-service tests. * gnu/tests/linux-modules.scm (run-loadable-kernel-modules-service-test): Actually load the modules with kernel-module-loader-service-type. Use a singleton service instead of defining a custom one. * doc/guix.texi (Service Reference): To give an example of linux-loadable-module-service-type use a singleton instead of defining a new service. --- gnu/tests/linux-modules.scm | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'gnu/tests') diff --git a/gnu/tests/linux-modules.scm b/gnu/tests/linux-modules.scm index 30d8eae03b..fc8945b77f 100644 --- a/gnu/tests/linux-modules.scm +++ b/gnu/tests/linux-modules.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019 Jakob L. Kreuze ;;; Copyright © 2020 Danny Milosavljevic -;;; Copyright © 2020 Brice Waegeneire +;;; Copyright © 2020, 2021 Brice Waegeneire ;;; Copyright © 2021 raid5atemyhomework ;;; ;;; This file is part of GNU Guix. @@ -112,16 +112,13 @@ are loaded in memory." "Run a test of an OS having MODULE-PACKAGES, which are loaded by creating a service that extends LINUXL-LOADABLE-MODULE-SERVICE-TYPE. Then verify that MODULE-NAMES are loaded in memory." - (define module-installing-service-type - (service-type - (name 'module-installing-service) - (extensions (list (service-extension linux-loadable-module-service-type - (const module-packages)))) - (default-value #f))) (run-loadable-kernel-modules-test-base (operating-system (inherit (simple-operating-system)) - (services (cons* (service module-installing-service-type) + (services (cons* (simple-service 'installing-module + linux-loadable-module-service-type + module-packages) + (service kernel-module-loader-service-type module-names) (operating-system-user-services (simple-operating-system))))) module-names)) -- cgit v1.2.3