test/assemblers: do not fail on modprobe failure
This changes the `modprobe nbd` invocation to be non-fatal on failure, since it might very well fail on reasonable setups. `modprobe` fails if it cannot find a module in `/lib/modules`, even if it could reasonably well figure out whether a module is already loaded. The reason is that it needs the metadata from the module file to find the required modules parameters. If you have `nbd` already loaded but not mapped in `/lib/modules`, the current call will cause test failures, even though the test would run smoothly. Fix this by never requiring `modprobe nbd` to succeed, but instead rely on the tests failing if accessing `nbd` fails.
This commit is contained in:
parent
ad50259ace
commit
15e4d0d3a1
1 changed files with 1 additions and 1 deletions
|
|
@ -14,7 +14,7 @@ class TestAssemblers(osbuildtest.TestCase):
|
|||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
subprocess.run(["modprobe", "nbd"], check=True)
|
||||
subprocess.run(["modprobe", "nbd"], check=False)
|
||||
|
||||
def run_assembler(self, name, options):
|
||||
with open("test/pipelines/f30-base.json") as f:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue