mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
tests: 'getlogin' test creates its file atomically.
Previously we could end up reading an empty /root/login-id file. * gnu/tests/base.scm (run-basic-test)["getlogin on tty1"]: Create /root/login-id atomically.
This commit is contained in:
parent
604b167bf2
commit
8b310793d2
1 changed files with 3 additions and 1 deletions
|
@ -311,7 +311,9 @@ (define (user-owned? file)
|
|||
"\"root\""
|
||||
(begin
|
||||
;; Assume we logged in in the previous test and type.
|
||||
(marionette-type "guile -c '(write (getlogin))' > /root/login-id\n"
|
||||
(marionette-type "guile -c '(write (getlogin))' > /root/login-id.tmp\n"
|
||||
marionette)
|
||||
(marionette-type "mv /root/login-id{.tmp,}\n"
|
||||
marionette)
|
||||
|
||||
;; It can take a while before the shell commands are executed.
|
||||
|
|
Loading…
Reference in a new issue