unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#27387] [PATCH] tests: Allow setting of qemu memory-size for system tests.
@ 2017-06-15 17:16 Jan Nieuwenhuizen
  2017-06-16  8:21 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Nieuwenhuizen @ 2017-06-15 17:16 UTC (permalink / raw)
  To: 27387

* gnu/system/vm.scm (common-qemu-options): Remove hardcoded "-m 256".
(system-qemu-image/shared-store-script): New keyword argument: #:memory-size.
Default to 256 (MiB).
---
 gnu/system/vm.scm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index ad5e6b75b..392737d07 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -489,20 +489,21 @@ with '-virtfs' options for the host file systems listed in SHARED-FS."
      #$@(map virtfs-option shared-fs)
      "-vga std"
      (format #f "-drive file=~a,if=virtio,cache=writeback,werror=report,readonly"
-             #$image)
-     "-m 256"))
+             #$image)))
 
 (define* (system-qemu-image/shared-store-script os
                                                 #:key
                                                 (qemu qemu)
                                                 (graphic? #t)
+                                                (memory-size 256)
                                                 (mappings '())
                                                 full-boot?
                                                 (disk-image-size
                                                  (* (if full-boot? 500 70)
                                                     (expt 2 20))))
   "Return a derivation that builds a script to run a virtual machine image of
-OS that shares its store with the host.
+OS that shares its store with the host.  The virtual machine runs with
+MEMORY-SIZE MiB of memory.
 
 MAPPINGS is a list of <file-system-mapping> specifying mapping of host file
 systems into the guest.
@@ -531,7 +532,8 @@ it is mostly useful when FULL-BOOT?  is true."
                                 (string-join #$kernel-arguments " "))))
               #$@(common-qemu-options image
                                       (map file-system-mapping-source
-                                           (cons %store-mapping mappings)))))
+                                           (cons %store-mapping mappings)))
+              "-m " (number->string #$memory-size)))
 
     (define builder
       #~(call-with-output-file #$output
-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#27387] [PATCH] tests: Allow setting of qemu memory-size for system tests.
  2017-06-15 17:16 [bug#27387] [PATCH] tests: Allow setting of qemu memory-size for system tests Jan Nieuwenhuizen
@ 2017-06-16  8:21 ` Ludovic Courtès
  2017-06-16 11:27   ` bug#27387: " Jan Nieuwenhuizen
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2017-06-16  8:21 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: 27387

Jan Nieuwenhuizen <janneke@gnu.org> skribis:

> * gnu/system/vm.scm (common-qemu-options): Remove hardcoded "-m 256".
> (system-qemu-image/shared-store-script): New keyword argument: #:memory-size.
> Default to 256 (MiB).

Good catch.  LGTM, thanks!

Ludo'.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#27387: [PATCH] tests: Allow setting of qemu memory-size for system tests.
  2017-06-16  8:21 ` Ludovic Courtès
@ 2017-06-16 11:27   ` Jan Nieuwenhuizen
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Nieuwenhuizen @ 2017-06-16 11:27 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 27387-done

Ludovic Courtès writes:

> Jan Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> * gnu/system/vm.scm (common-qemu-options): Remove hardcoded "-m 256".
>> (system-qemu-image/shared-store-script): New keyword argument: #:memory-size.
>> Default to 256 (MiB).
>
> Good catch.  LGTM, thanks!

Pushed to master as ebfb71d45615698040818a68b7dc34996ff4c046

janneke


-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-16 11:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-15 17:16 [bug#27387] [PATCH] tests: Allow setting of qemu memory-size for system tests Jan Nieuwenhuizen
2017-06-16  8:21 ` Ludovic Courtès
2017-06-16 11:27   ` bug#27387: " Jan Nieuwenhuizen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).