\f
(define* (run-basic-test os command #:optional (name "basic")
- #:key initialization root-password)
+ #:key
+ initialization
+ root-password
+ desktop?)
"Return a derivation called NAME that tests basic features of the OS started
using COMMAND, a gexp that evaluates to a list of strings. Compare some
properties of running system to what's declared in OS, an <operating-system>.
(pk 'services services)
'(root #$@(operating-system-shepherd-service-names os)))))
+ (test-equal "/var/log/messages is not world-readable"
+ #o640 ;<https://bugs.gnu.org/40405>
+ (begin
+ (wait-for-file "/var/log/messages" marionette
+ #:read 'get-u8)
+ (marionette-eval '(stat:perms (lstat "/var/log/messages"))
+ marionette)))
+
(test-assert "homes"
(let ((homes
'#$(map user-account-home-directory
(test-equal "login on tty1"
"root\n"
(begin
+ ;; XXX: On desktop, GDM3 will switch to TTY7. If this happens
+ ;; after we switched to TTY1, we won't be able to login. Make
+ ;; sure to wait long enough before switching to TTY1.
+ (when #$desktop?
+ (sleep 30))
+
(marionette-control "sendkey ctrl-alt-f1" marionette)
;; Wait for the 'term-tty1' service to be running (using
;; 'start-service' is the simplest and most reliable way to do
(marionette-eval '(readlink "/var/guix/gcroots/profiles")
marionette))
+ (test-equal "guix-daemon set-http-proxy action"
+ '(#t) ;one value, #t
+ (marionette-eval '(with-shepherd-action 'guix-daemon
+ ('set-http-proxy "http://localhost:8118")
+ result
+ result)
+ marionette))
+
+ (test-equal "guix-daemon set-http-proxy action, clear"
+ '(#t) ;one value, #t
+ (marionette-eval '(with-shepherd-action 'guix-daemon
+ ('set-http-proxy)
+ result
+ result)
+ marionette))
(test-assert "screendump"
(begin