diff --git a/debian/changelog b/debian/changelog
index ed549c2..b2fbada 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,20 @@
+open-iscsi (2.0.873+git0.3b4b4500-14ubuntu16) zesty; urgency=medium
+
+ * debian/tests: many improvements to the open-iscsi and tgt boot test.
+ - only run test on amd64. just avoid timeout errors or other unrelated
+ issues causing failure.
+ - debian/tests/README-boot-test.md: add doc describing the tgt-boot-test
+ - rename get-maas-eph to get-image
+ - use a cloud image instead of a maas image for booting. The value in
+ this is that we can then install open-iscsi inside the image and get an
+ updated initramfs.
+ - use subprocess.check_call rather than subprocess.call so that we
+ actually catch errors.
+ - update xkvm to what is in curtin/tools/xkvm
+ - improve updating of images to consider ADT_TEST_TRIGGERS if set.
+
+ -- Scott Moser <smoser@ubuntu.com> Tue, 14 Feb 2017 17:07:00 -0500
+
open-iscsi (2.0.873+git0.3b4b4500-14ubuntu15) zesty; urgency=medium
* debian/tests/tgt-boot-test: set HOST_IP harder for the testsuite test.
...
def test_tgt_boot(self):
tgt_boot_cmd = os.path.join(self.here, 'tgt-boot-test')
- env = os.environ
- env['HOST_IP'] = self.get_default_route_ip()
# Add self.here to PATH so xkvm will be available to tgt-boot-test
- env['PATH'] = env['PATH'] + ":%s" % self.here
- env['OUTPUT_DISK'] = self.output_disk_path
- rel_dir = '{}.d'.format(self.release)
- subprocess.call([
- tgt_boot_cmd,
- os.path.join(self.here, rel_dir, 'root-image'),
- os.path.join(self.here, rel_dir, self.subarch, 'boot-kernel'),
- os.path.join(self.here, rel_dir, self.subarch, 'boot-initrd')],
- env=env)
- files = self.extract_files(self.output_disk_path)
- for f in files:
- if f.endswith('resolv.conf'):
- resolvconf_contents = open(f).read()
+ dns_addr = '10.1.1.4'
+ rel_dir = '{}.d'.format(self.info['release'])
+ info = {'host': '10.1.1.2', 'dns': dns_addr,
+ 'dnssearch': 'example.com', 'network': '10.1.1.0/24'}
+ netdev = ("--netdev=user,net={network},host={host},dns={dns},"
+ "dnssearch={dnssearch}").format(**info)
+
+ output_disk = self.create_output_disk()
+ cmd = [
+ tgt_boot_cmd, '-v', netdev,
+ '--disk=%s,serial=output-disk' % output_disk,
+ '--user-data-add=%s' % self.info['user-data'],
+ self.info['root_image'], self.info['kernel'],
+ self.info['initrd']]
+ sys.stderr.write(' '.join(cmd) + "\n")
+
+ subprocess.check_call(cmd)
+ files = self.extract_files(output_disk)
+ print("files: %s" % files)
+ resolvconf_contents = "NO_RESOLVCONF_FOUND"
+ for name, contents in files.items():
+ if name.endswith('resolv.conf'):
+ resolvconf_contents = contents
self.assertIn(
- '10.0.2.3', resolvconf_contents,
- msg="10.0.2.3 not in resolvconf contents: \n{}".format(
- resolvconf_contents))
+ dns_addr, resolvconf_contents,
+ msg = ("%s not in resolvconf contents: \n%s" %
+ (dns_addr, resolvconf_contents)))