@@ -49,6 +49,7 @@ BEGIN {
di_installcmdline_core
di_vg_name
debian_dhcp_rofs_fix
+ debian_write_random_seed
);
%EXPORT_TAGS = ( );
@@ -1612,4 +1613,17 @@ mv '$script.new' '$script'
END
}
+sub debian_write_random_seed ($) {
+ my ($gho) = @_;
+ my $mountpoint = '/mnt';
+ my $ho = $gho->{Host};
+ target_cmd_root($ho, <<END);
+ set -ex
+ mount /dev/$gho->{Vg}/$gho->{Lv} $mountpoint
+ umask 077
+ dd if=/dev/urandom of=$mountpoint/var/lib/systemd/random-seed bs=1k count=1
+END
+ guest_umount_lv($ho, $gho);
+}
+
1;
@@ -511,6 +511,7 @@ proc run-job/test-debian {} {
proc install-guest-debian-di {} {
run-ts . = ts-debian-di-install
+ run-ts . = ts-debian-di-fixup + debian
run-ts . = ts-guest-start + debian
}
new file mode 100755
@@ -0,0 +1,29 @@
+#!/usr/bin/perl -w
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2009-2013 Citrix Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+use strict qw(vars);
+use DBI;
+BEGIN { unshift @INC, qw(.); }
+use Osstest;
+use Osstest::TestSupport;
+use Osstest::Debian;
+
+tsreadconfig();
+
+our ($ho,$gho) = ts_get_host_guest(@ARGV);
+
+debian_write_random_seed($gho);
@@ -202,6 +202,7 @@ sub writecfg () {
target_putfile_root($ho,10, $cfgstash, $cfgfile);
}
+debian_write_random_seed($gho);
savecfg();
ether();
target_kernkind_check($gho);
This involves a new ts-debian-di-fixup script, which runs after xen-tools. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> --- Osstest/Debian.pm | 14 ++++++++++++++ sg-run-job | 1 + ts-debian-di-fixup | 29 +++++++++++++++++++++++++++++ ts-debian-fixup | 1 + 4 files changed, 45 insertions(+) create mode 100755 ts-debian-di-fixup