Skip to contentSkip to conversation

test/functional: Fix Aspeed buildroot tests

PATCH In review Cédric Le Goater 3 participants 5 messages Nov 5, 2024 Arm/Aspeed machine support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test/functional: Fix Aspeed buildroot tests

Since commit 786bc2255256, cached asset files are read-only. Adjust the QEMU command line for buildroot tests to reflect the new constraint on the flash drive.

Fixes f04cb2d00d5c ("tests/functional: Convert most Aspeed machine tests")
---
 tests/functional/test_arm_aspeed.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/functional/test_arm_aspeed.py +1 -1
index 9761fc06a454..19853161b267 100644
@@ -125,7 +125,7 @@ def test_arm_ast2500_romulus_openbmc_v2_9_0(self):
     def do_test_arm_aspeed_buildroot_start(self, image, cpu_id, pattern='Aspeed EVB'):
         self.require_netdev('user')
         self.vm.set_console()
-        self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw',
+        self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw,read-only=true',
                          '-net', 'nic', '-net', 'user')
         self.vm.launch()
 
Signature · 1 line
2.47.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 16 lines · Cédric Le Goater

Since commit 786bc2255256, cached asset files are read-only. Adjust the QEMU command line for buildroot tests to reflect the new constraint on the flash drive.

Fixes f04cb2d00d5c ("tests/functional: Convert most Aspeed machine tests")
---
  tests/functional/test_arm_aspeed.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
tests/functional/test_arm_aspeed.py +0 -0
index 9761fc06a454..19853161b267 100644

tests/functional/test_arm_aspeed.py def test_arm_ast2500_romulus_openbmc_v2_9_0(self): · line 131

Quoted 8 lines
tests/functional/test_arm_aspeed.py +1 -1
@@ -125,7 +125,7 @@ def test_arm_ast2500_romulus_openbmc_v2_9_0(self):
      def do_test_arm_aspeed_buildroot_start(self, image, cpu_id, pattern='Aspeed EVB'):
          self.require_netdev('user')
          self.vm.set_console()
-        self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw',
+        self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw,read-only=true',
                           '-net', 'nic', '-net', 'user')
          self.vm.launch()
 
#2 lore raw
In reply to Cédric Le Goater
Quoted 17 lines · Cédric Le Goater

Since commit 786bc2255256, cached asset files are read-only. Adjust the QEMU command line for buildroot tests to reflect the new constraint on the flash drive.

Fixes f04cb2d00d5c ("tests/functional: Convert most Aspeed machine tests")
---
 tests/functional/test_arm_aspeed.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/functional/test_arm_aspeed.py +0 -0
index 9761fc06a454..19853161b267 100644

tests/functional/test_arm_aspeed.py def test_arm_ast2500_romulus_openbmc_v2_9_0(self): · line 129

Quoted 6 lines
tests/functional/test_arm_aspeed.py +1 -1
@@ -125,7 +125,7 @@ def test_arm_ast2500_romulus_openbmc_v2_9_0(self):
     def do_test_arm_aspeed_buildroot_start(self, image, cpu_id, pattern='Aspeed EVB'):
         self.require_netdev('user')
         self.vm.set_console()
-        self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw',
+        self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw,read-only=true',
                          '-net', 'nic', '-net', 'user')

There are a couple of other places in this file where we add a '-drive' option pointing to a file -- do they also need read-only=true adding ?

thanks
-- PMM

#3 lore raw
Quoted 13 lines · Peter Maydell
Quoted 12 lines · Cédric Le Goater

Since commit 786bc2255256, cached asset files are read-only. Adjust the QEMU command line for buildroot tests to reflect the new constraint on the flash drive.

Fixes f04cb2d00d5c ("tests/functional: Convert most Aspeed machine tests")
---
  tests/functional/test_arm_aspeed.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines

tests/functional/test_arm_aspeed.py def test_arm_ast2500_romulus_openbmc_v2_9_0(self): · line 129

Quoted 11 lines
tests/functional/test_arm_aspeed.py +1 -1
index 9761fc06a454..19853161b267 100644
@@ -125,7 +125,7 @@ def test_arm_ast2500_romulus_openbmc_v2_9_0(self):
      def do_test_arm_aspeed_buildroot_start(self, image, cpu_id, pattern='Aspeed EVB'):
          self.require_netdev('user')
          self.vm.set_console()
-        self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw',
+        self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw,read-only=true',
                           '-net', 'nic', '-net', 'user')

There are a couple of other places in this file where we add a '-drive' option pointing to a file -- do they also need read-only=true adding ?

I'm seeing problems with the ppc64_hv and the ppc_40p tests, but fortunately they are hidden behind some @skipUnless decorators. I'm working on a patch...

Thomas

#4 lore raw
In reply to Peter Maydell
Quoted 13 lines · Peter Maydell
Quoted 12 lines · Cédric Le Goater

Since commit 786bc2255256, cached asset files are read-only. Adjust the QEMU command line for buildroot tests to reflect the new constraint on the flash drive.

Fixes f04cb2d00d5c ("tests/functional: Convert most Aspeed machine tests")
---
  tests/functional/test_arm_aspeed.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines

tests/functional/test_arm_aspeed.py def test_arm_ast2500_romulus_openbmc_v2_9_0(self): · line 129

Quoted 11 lines
tests/functional/test_arm_aspeed.py +1 -1
index 9761fc06a454..19853161b267 100644
@@ -125,7 +125,7 @@ def test_arm_ast2500_romulus_openbmc_v2_9_0(self):
      def do_test_arm_aspeed_buildroot_start(self, image, cpu_id, pattern='Aspeed EVB'):
          self.require_netdev('user')
          self.vm.set_console()
-        self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw',
+        self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw,read-only=true',
                           '-net', 'nic', '-net', 'user')

There are a couple of other places in this file where we add a '-drive' option pointing to a file -- do they also need read-only=true adding ?

The other tests use an OpenBMC drive image which is modified at boot and so they have a '-snapshot' option on the command line.

The buildroot drive image shouldn't be modified although 'rw' access is required. I am not sure why.

Thanks,

C.