diff options
| author | Jeff Lane <jeffrey.lane@canonical.com> | 2016-03-07 08:31:31 +0000 |
|---|---|---|
| committer | Sylvain Pineau <> | 2016-03-07 08:31:31 +0000 |
| commit | e6a35c530dd07399f0237ddef912b1dea7938ad6 (patch) | |
| tree | 773361aae9863fc88a279006cf20ba521c124582 | |
| parent | 5cd636ac7575998ff19701bbd0dec70d7d4b0f88 (diff) | |
| parent | 51eba7c05515473abb47ca27947b611bf61ec1d8 (diff) | |
"automatic merge of lp:~bladernr/checkbox/revamp-gic_version-support/ by tarmac [r=sylvain-pineau][bug=1544651,1548539][author=bladernr]"
| -rwxr-xr-x | bin/virtualization | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/bin/virtualization b/bin/virtualization index f32c7ce3..532bef88 100755 --- a/bin/virtualization +++ b/bin/virtualization @@ -133,11 +133,8 @@ class QemuRunner(object): # If arch is arm64, add the machine type for gicv3, or default to old # type if self.arch == 'arm64': - if glob("/sys/firmware/devicetree/base/interrupt-controller@*/compatible"): - self.config['qemu_extra_args'].extend( - ['-machine', 'virt,gic_version=3']) - else: - self.config['qemu_extra_args'].extend(['-machine', 'virt']) + (self.config['qemu_extra_args']. + extend(['-machine', 'virt,gic_version=host'])) # Add any architecture-specific parameters if 'qemu_extra_args' in self.config: self.params = self.params + self.config['qemu_extra_args'] @@ -324,6 +321,22 @@ final_message: CERTIFICATION BOOT COMPLETE logging.exception("Cloud data disk creation failed") def start(self): + if self.arch == 'arm64': + # lp:1548539 - For arm64, we need to make sure we're using qemu + # later than 2.0.0 to enable gic_version functionality + logging.debug('Checking QEMU version for arm64 arch') + cmd = 'apt-cache policy qemu-system-arm | grep Installed' + installed_version = (check_output(['/bin/bash', '-c', cmd]). + decode().split(':', 1)[1].strip()) + + cmd = ('dpkg --compare-versions \"2.0.0\" \"lt\" \"{}\"' + .format(installed_version)) + retcode = call(['/bin/bash', '-c', cmd]) + if retcode != 0: + logging.error('arm64 needs qemu-system version later than ' + '2.0.0') + return 1 + logging.debug('Starting KVM Test') status = 1 # Create temp directory: |
