aboutsummaryrefslogtreecommitdiff
path: root/emacs
ModeNameSize
-rw-r--r--guix-backend.el15027logplainabout
-rw-r--r--guix-base.el42521logplainabout
-rw-r--r--guix-emacs.el2837logplainabout
-rw-r--r--guix-helper.scm.in2354logplainabout
-rw-r--r--guix-history.el3216logplainabout
-rw-r--r--guix-info.el33463logplainabout
-rw-r--r--guix-init.el.in627logplainabout
-rw-r--r--guix-list.el32003logplainabout
-rw-r--r--guix-main.scm35089logplainabout
-rw-r--r--guix-messages.el8285logplainabout
-rw-r--r--guix-prettify.el7380logplainabout
-rw-r--r--guix-profiles.el.in2063logplainabout
-rw-r--r--guix-utils.el5940logplainabout
-rw-r--r--guix.el7182logplainabout
(test-assert "nscd is listening on its socket" (wait-for-unix-socket "/var/run/nscd/socket" marionette)) (test-assert "network is up" (marionette-eval '(begin (use-modules (gnu services herd)) (start-service 'networking)) marionette)) ;; Wait for the NFS services to be up and running. (test-assert "nfs services are running" (and (marionette-eval '(begin (use-modules (gnu services herd)) (start-service 'nfs)) marionette) (wait-for-file "/var/run/rpc.statd.pid" marionette))) (test-assert "nfs share is advertised" (marionette-eval '(zero? (system* (string-append #$nfs-utils "/sbin/showmount") "-e" "nfs-server")) marionette)) (test-assert "nfs share mounted" (marionette-eval '(begin (and (zero? (system* (string-append #$nfs-utils "/sbin/mount.nfs4") "nfs-server:/" "/remote" "-v")) (file-exists? "/remote/hello"))) marionette)) (test-end)))) (gexp->derivation "nfs-server-test" test)) (define %test-nfs-server (system-test (name "nfs-server") (description "Test that an NFS server can be started and exported directories can be mounted.") (value (run-nfs-server-test)))) (define (run-nfs-full-test) "Run a test of an OS mounting its root file system via NFS." (define nfs-root-server-os (let ((os (simple-operating-system))) (marionette-operating-system (operating-system (inherit os) (services (cons* (service static-networking-service-type (list (static-networking (addresses (list (network-address (device "ens5") (value "10.0.2.15/24"))))))) (simple-service 'export activation-service-type #~(begin (mkdir-p "/export") (chmod "/export" #o777))) (service nfs-service-type (nfs-configuration (nfsd-port 2049) (nfs-versions '("4.2")) (exports '(("/export" "*(rw,insecure,no_subtree_check,\ crossmnt,fsid=root,no_root_squash,insecure,async)"))))) (modify-services (operating-system-user-services os) (syslog-service-type config => (syslog-configuration (inherit config) (config-file (plain-file "syslog.conf" "*.* /dev/console\n")))))))) #:requirements '(nscd) #:imported-modules '((gnu services herd) (guix combinators))))) (define nfs-root-client-os (marionette-operating-system (simple-operating-system (service static-networking-service-type (list (static-networking (addresses (list (network-address (device "ens5") (value "10.0.2.16/24"))))))) (service nfs-service-type (nfs-configuration (nfsd-port 2049) (nfs-versions '("4.2")))) (simple-service 'export activation-service-type #~(begin (mkdir-p "/export") (chmod "/export" #o777)))) #:requirements '(nscd) #:imported-modules '((gnu services herd) (guix combinators)))) (define test (with-imported-modules '((gnu build marionette)) #~(begin (use-modules (gnu build marionette) (srfi srfi-64)) (test-runner-current (system-test-runner #$output)) (test-begin "start-nfs-boot-test") ;;; Start up NFS server host. (mkdir "/tmp/server") (define server-marionette (make-marionette (cons* #$(virtual-machine (operating-system nfs-root-server-os) (volatile? #f)) '("-device" "e1000,netdev=n1,mac=52:54:00:12:34:56" "-netdev" "socket,id=n1,listen=:1234")) #:socket-directory "/tmp/server")) ;;; Wait for the NFS services to be up and running. (test-assert "nfs services are running" (wait-for-file "/var/run/rpc.statd.pid" server-marionette)) (test-assert "NFS port is ready" (wait-for-tcp-port 2049 server-marionette)) ;;; Start up NFS client host. (mkdir "/tmp/client") (define client-marionette (make-marionette (cons* #$(virtual-machine (operating-system nfs-root-client-os) (volatile? #f)) '("-device" "e1000,netdev=n2,mac=52:54:00:12:34:57" "-netdev" "socket,id=n2,connect=127.0.0.1:1234")) #:socket-directory "/tmp/client")) (test-assert "NFS port is ready" (wait-for-tcp-port 2049 client-marionette)) (marionette-eval '(begin (use-modules (rnrs io ports)) (current-output-port (open-file "/dev/console" "w0")) (and (system* (string-append #$nfs-utils "/sbin/mount.nfs") "10.0.2.15:/export" "/export" "-v") (let ((content (call-with-input-file "/proc/mounts" get-string-all))) (call-with-output-file "/export/mounts" (lambda (port) (display content port)))))) client-marionette) ;;; Check whether NFS client host communicated with NFS server host. (test-assert "nfs client deposited file" (wait-for-file "/export/mounts" server-marionette)) (marionette-eval '(begin (current-output-port (open-file "/dev/console" "w0")) (call-with-input-file "/export/mounts" display)) server-marionette) (test-end)))) (gexp->derivation "nfs-full-test" test)) (define %test-nfs-full (system-test (name "nfs-full") (description "Test that an NFS server can be started and the exported directory can be used by another machine.") (value (run-nfs-full-test))))