diff mbox series

[OSSTEST,11/49] ts-debian-di-install: Provide guest with more RAM

Message ID 20200529111945.21394-12-ian.jackson@eu.citrix.com (mailing list archive)
State New, archived
Headers show
Series Switch to Debian buster (= Debian stable) | expand

Commit Message

Ian Jackson May 29, 2020, 11:19 a.m. UTC
buster cannot boot in so little because its initramfs and kernel are
too large.  Bump it to 2G.

However, our armhf test nodes have very little RAM.  And the Debian
armhf does fit in them as a guest still, so use a smaller value there.

Keying this off the architecture rather than the available host memory
is better because you do need the bigger value precisely if you are
not using armhf, and this makes osstest less dependent on a completely
accurate and populated host properties database.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-debian-di-install | 2 +-
 ts-debian-fixup      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/ts-debian-di-install b/ts-debian-di-install
index 9abb4956..d84407cf 100755
--- a/ts-debian-di-install
+++ b/ts-debian-di-install
@@ -64,7 +64,7 @@  $gn ||= 'debian';
 
 our $ho= selecthost($whhost);
 
-our $ram_mb=    512;
+our $ram_mb= $r{arch} =~ m/^armhf/ ? 768 : 2048;
 our $disk_mb= 10000;
 
 our $guesthost= $gn.
diff --git a/ts-debian-fixup b/ts-debian-fixup
index dfeb4d39..528fb03b 100755
--- a/ts-debian-fixup
+++ b/ts-debian-fixup
@@ -104,7 +104,7 @@  sub console () {
 
 sub randomseed () {
     my $cmd = debian_write_random_seed_command($mountpoint);
-    target_cmd_root($ho, "set -ex\n".cmd);
+    target_cmd_root($ho, "set -ex\n".$cmd);
 }
 
 sub filesystems () {