John Darrington <j...@gnu.org> skribis: > * gnu/tests/nfs.scm: New file. > * gnu/local.mk: Add it.
Awesome! :-) > +(define %base-os > + (operating-system > + (host-name "olitupmok") > + (timezone "Europe/Berlin") > + (locale "en_US.UTF-8") > + > + (bootloader (grub-configuration (device "/dev/sdX"))) > + (file-systems %base-file-systems) > + (firmware '()) This line is not needed, is it? > + (users %base-user-accounts) > + (services (cons (dhcp-client-service) > + %base-services)))) You can add ‘rpc-service’ and the ‘rpcbind’ package right here… > +(define (os-with-service service) > + "Return a test operating system that runs SERVICE." > + (operating-system > + (inherit %base-os) > + (packages (cons* > + rpcbind > + %base-packages)) > + (services (cons service > + (operating-system-user-services %base-os))))) … and remove this procedure. > + (define test > + (with-imported-modules '((gnu build marionette)) > + #~(begin > + (use-modules (gnu build marionette) > + (srfi srfi-26) > + (srfi srfi-64) > + (ice-9 match)) Looks like srfi-26 and match are unused and can be removed. > + (define marionette > + ;; Enable TCP forwarding of the guest's port 111. > + (make-marionette (list #$command))) Outdated comment, no? > + (test-begin "nfs-daemon") Or “rpcbind-daemon” rather? > + ;; Check the socket file and that the service is still running. > + (test-assert "RPC socket exists" > + (begin > + (wait-for-socket #$socket) > + (marionette-eval I think it should be ‘and’ instead of ‘begin’. > +(define %test-nfs > + (system-test > + (name "nfs") > + (description "Test some things related to NFS.") s/nfs/rpcbind/ ? OK with these changes. Thanks for taking the time to write this test! Ludo’.