Merge ~bladernr/plainbox-provider-checkbox:1883761-dont-load-power-ipmi-driver-on-nonpower into plainbox-provider-checkbox:master

Proposed by Jeff Lane 
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 4f8707b2a247ffb34adebcb5500cc67749dd9646
Merged at revision: 938e3877004d10c973d8300739c633a6a89032ff
Proposed branch: ~bladernr/plainbox-provider-checkbox:1883761-dont-load-power-ipmi-driver-on-nonpower
Merge into: plainbox-provider-checkbox:master
Diff against target: 35 lines (+8/-2)
1 file modified
bin/ipmi_test.py (+8/-2)
Reviewer Review Type Date Requested Status
Sylvain Pineau Approve
Review via email: mp+385840@code.launchpad.net

Commit message

bin/ipmi_test.py: Don't bother loading ipmi_powernv driver on non-power systems

Description of the change

bin/ipmi_test.py: Don't bother loading ipmi_powernv driver on non-power systems

Tested on Power and NonPower hardware

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/ipmi_test.py b/bin/ipmi_test.py
2index 0aefea1..91f3524 100755
3--- a/bin/ipmi_test.py
4+++ b/bin/ipmi_test.py
5@@ -4,7 +4,7 @@ Copyright (C) 2020 Canonical Ltd.
6
7 Authors
8 Adrian Lane <adrian.lane@canonical.com>
9-
10+ Jeff Lane <jeff@ubuntu.com>
11 This program is free software: you can redistribute it and/or modify
12 it under the terms of the GNU General Public License version 3,
13 as published by the Free Software Foundation.
14@@ -23,6 +23,7 @@ Tests IPMI subsystem on SUT.
15 import re
16 import shutil
17 import sys
18+import platform
19 import argparse
20 import logging
21 from subprocess import (
22@@ -136,7 +137,12 @@ class FreeIpmiTest:
23 if module in output:
24 logging.info('- %s already loaded' % module)
25 else:
26- self._modprobe_hlpr(module)
27+ if (module == 'ipmi_powernv' and
28+ platform.machine() != 'ppc64le'):
29+ logging.info(' * Skipping module %s, incorrect '
30+ 'system architecture' % module)
31+ else:
32+ self._modprobe_hlpr(module)
33 logging.info('')
34 except self._sub_process_excs as exc:
35 self._process_exc(exc, self.load_kernel_mods.__qualname__)

Subscribers

People subscribed via source and target branches