Skip to contentSkip to conversation

tests/functional/test_arm_sx1: Check whether the serial console is working

PATCH Applied Thomas Huth 4 participants 4 messages Feb 26, 2025 – Mar 4, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/functional/test_arm_sx1: Check whether the serial console is working

The kernel that is used in the sx1 test prints the usual Linux log onto the serial console, but this test currently ignores it. To make sure that the serial device is working properly, let's check for some strings in the output here.

While we're at it, also add the test to the corresponding section in the MAINTAINERS file.

---
Based-on: <[email protected]>

 MAINTAINERS                      | 1 +
 tests/functional/test_arm_sx1.py | 7 ++++---
 2 files changed, 5 insertions(+), 3 deletions(-)
MAINTAINERS +1 -0
index 05ec99adfd0..098daea6f24 100644
@@ -2000,6 +2000,7 @@ S: Maintained
 F: hw/*/omap*
 F: include/hw/arm/omap.h
 F: docs/system/arm/sx1.rst
+F: tests/functional/test_arm_sx1.py
 
 IPack
 M: Alberto Garcia <[email protected]>
tests/functional/test_arm_sx1.py +4 -3
index 4dd1e1859fa..25800b388c9 100755
@@ -43,7 +43,8 @@ def test_arm_sx1_initrd(self):
         self.vm.add_args('-append', f'kunit.enable=0 rdinit=/sbin/init {self.CONSOLE_ARGS}')
         self.vm.add_args('-no-reboot')
         self.launch_kernel(zimage_path,
-                           initrd=initrd_path)
+                           initrd=initrd_path,
+                           wait_for='Boot successful')
         self.vm.wait(timeout=120)
 
     def test_arm_sx1_sd(self):
@@ -54,7 +55,7 @@ def test_arm_sx1_sd(self):
         self.vm.add_args('-no-reboot')
         self.vm.add_args('-snapshot')
         self.vm.add_args('-drive', f'format=raw,if=sd,file={sd_fs_path}')
-        self.launch_kernel(zimage_path)
+        self.launch_kernel(zimage_path, wait_for='Boot successful')
         self.vm.wait(timeout=120)
 
     def test_arm_sx1_flash(self):
@@ -65,7 +66,7 @@ def test_arm_sx1_flash(self):
         self.vm.add_args('-no-reboot')
         self.vm.add_args('-snapshot')
         self.vm.add_args('-drive', f'format=raw,if=pflash,file={flash_path}')
-        self.launch_kernel(zimage_path)
+        self.launch_kernel(zimage_path, wait_for='Boot successful')
         self.vm.wait(timeout=120)
 
 if __name__ == '__main__':
Signature · 1 line
2.48.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Thomas Huth

The kernel that is used in the sx1 test prints the usual Linux log onto the serial console, but this test currently ignores it. To make sure that the serial device is working properly, let's check for some strings in the output here.

While we're at it, also add the test to the corresponding section in the MAINTAINERS file.

Quoted 7 lines

---
Based-on: <[email protected]>

  MAINTAINERS                      | 1 +
  tests/functional/test_arm_sx1.py | 7 ++++---
  2 files changed, 5 insertions(+), 3 deletions(-)
#2 lore raw
In reply to Thomas Huth
Quoted 6 lines · Thomas Huth

The kernel that is used in the sx1 test prints the usual Linux log onto the serial console, but this test currently ignores it. To make sure that the serial device is working properly, let's check for some strings in the output here.

Quoted 6 lines

While we're at it, also add the test to the corresponding section in the MAINTAINERS file.

---
Based-on: <[email protected]>

Applied to target-arm.next, thanks. (If you'd rather take this via your own test tree let me know and I'll drop it on my end.)

-- PMM

Tested-by Reviewed-by on v1 1/1
#3 lore raw
In reply to Thomas Huth
Quoted 9 lines · Thomas Huth

The kernel that is used in the sx1 test prints the usual Linux log onto the serial console, but this test currently ignores it. To make sure that the serial device is working properly, let's check for some strings in the output here.

While we're at it, also add the test to the corresponding section in the MAINTAINERS file.

Thanks,

C.

Quoted 51 lines

---
Based-on: <[email protected]>

  MAINTAINERS                      | 1 +
  tests/functional/test_arm_sx1.py | 7 ++++---
  2 files changed, 5 insertions(+), 3 deletions(-)
MAINTAINERS +1 -0
index 05ec99adfd0..098daea6f24 100644
@@ -2000,6 +2000,7 @@ S: Maintained
  F: hw/*/omap*
  F: include/hw/arm/omap.h
  F: docs/system/arm/sx1.rst
+F: tests/functional/test_arm_sx1.py
 
  IPack
  M: Alberto Garcia <[email protected]>
tests/functional/test_arm_sx1.py +4 -3
index 4dd1e1859fa..25800b388c9 100755
@@ -43,7 +43,8 @@ def test_arm_sx1_initrd(self):
          self.vm.add_args('-append', f'kunit.enable=0 rdinit=/sbin/init {self.CONSOLE_ARGS}')
          self.vm.add_args('-no-reboot')
          self.launch_kernel(zimage_path,
-                           initrd=initrd_path)
+                           initrd=initrd_path,
+                           wait_for='Boot successful')
          self.vm.wait(timeout=120)
 
      def test_arm_sx1_sd(self):
@@ -54,7 +55,7 @@ def test_arm_sx1_sd(self):
          self.vm.add_args('-no-reboot')
          self.vm.add_args('-snapshot')
          self.vm.add_args('-drive', f'format=raw,if=sd,file={sd_fs_path}')
-        self.launch_kernel(zimage_path)
+        self.launch_kernel(zimage_path, wait_for='Boot successful')
          self.vm.wait(timeout=120)
 
      def test_arm_sx1_flash(self):
@@ -65,7 +66,7 @@ def test_arm_sx1_flash(self):
          self.vm.add_args('-no-reboot')
          self.vm.add_args('-snapshot')
          self.vm.add_args('-drive', f'format=raw,if=pflash,file={flash_path}')
-        self.launch_kernel(zimage_path)
+        self.launch_kernel(zimage_path, wait_for='Boot successful')
          self.vm.wait(timeout=120)
 
  if __name__ == '__main__':