mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
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.
This commit is contained in:
parent
eb8928eeba
commit
8a0dc5f1bf
2 changed files with 10 additions and 16 deletions
|
@ -76,7 +76,7 @@ Copyright @copyright{} 2020 Damien Cassou@*
|
||||||
Copyright @copyright{} 2020 Jakub Kądziołka@*
|
Copyright @copyright{} 2020 Jakub Kądziołka@*
|
||||||
Copyright @copyright{} 2020 Jack Hill@*
|
Copyright @copyright{} 2020 Jack Hill@*
|
||||||
Copyright @copyright{} 2020 Naga Malleswari@*
|
Copyright @copyright{} 2020 Naga Malleswari@*
|
||||||
Copyright @copyright{} 2020 Brice Waegeneire@*
|
Copyright @copyright{} 2020, 2021 Brice Waegeneire@*
|
||||||
Copyright @copyright{} 2020 R Veera Kumar@*
|
Copyright @copyright{} 2020 R Veera Kumar@*
|
||||||
Copyright @copyright{} 2020 Pierre Langlois@*
|
Copyright @copyright{} 2020 Pierre Langlois@*
|
||||||
Copyright @copyright{} 2020 pinoaffe@*
|
Copyright @copyright{} 2020 pinoaffe@*
|
||||||
|
@ -34379,13 +34379,10 @@ This service type is intended to be extended by other service types,
|
||||||
such as below:
|
such as below:
|
||||||
|
|
||||||
@lisp
|
@lisp
|
||||||
(define module-installing-service-type
|
(simple-service 'installing-module
|
||||||
(service-type
|
linux-loadable-module-service-type
|
||||||
(name 'module-installing-service)
|
(list module-to-install-1
|
||||||
(extensions (list (service-extension linux-loadable-module-service-type
|
module-to-install-2))
|
||||||
(const (list module-to-install-1
|
|
||||||
module-to-install-2)))))
|
|
||||||
(default-value #f)))
|
|
||||||
@end lisp
|
@end lisp
|
||||||
|
|
||||||
This does not actually load modules at bootup, only adds it to the
|
This does not actually load modules at bootup, only adds it to the
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.org>
|
;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.org>
|
||||||
;;; Copyright © 2020 Danny Milosavljevic <dannym@scratchpost.org>
|
;;; Copyright © 2020 Danny Milosavljevic <dannym@scratchpost.org>
|
||||||
;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
|
;;; Copyright © 2020, 2021 Brice Waegeneire <brice@waegenei.re>
|
||||||
;;; Copyright © 2021 raid5atemyhomework <raid5atemyhomework@protonmail.com>
|
;;; Copyright © 2021 raid5atemyhomework <raid5atemyhomework@protonmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
|
@ -112,16 +112,13 @@ (define* (run-loadable-kernel-modules-service-test module-packages module-names)
|
||||||
"Run a test of an OS having MODULE-PACKAGES, which are loaded by creating a
|
"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
|
service that extends LINUXL-LOADABLE-MODULE-SERVICE-TYPE. Then verify that
|
||||||
MODULE-NAMES are loaded in memory."
|
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
|
(run-loadable-kernel-modules-test-base
|
||||||
(operating-system
|
(operating-system
|
||||||
(inherit (simple-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
|
(operating-system-user-services
|
||||||
(simple-operating-system)))))
|
(simple-operating-system)))))
|
||||||
module-names))
|
module-names))
|
||||||
|
|
Loading…
Reference in a new issue