Skip to contentSkip to conversation

Add serial test

PATCH In review Glenn Washburn 2 participants 4 messages Aug 15, 2023 – Aug 17, 2023 Kbuild

lore
Share & tools
lore
#2 lore raw

PATCH 2/2 tests: Add serial_test

In reply to Glenn Washburn

This test is meant to test output via various serial devices. Currently, only the PCI serial device is tested.

---
 Makefile.util.def    |  6 +++++
 tests/serial_test.in | 55 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)
 create mode 100644 tests/serial_test.in
Makefile.util.def +6 -0
index a7cf53111221..42b6288dc809 100644
@@ -1130,6 +1130,12 @@ script = {
   common = tests/netboot_test.in;
 };
 
+script = {
+  testcase = nonnative;
+  name = serial_test;
+  common = tests/serial_test.in;
+};
+
 script = {
   testcase = nonnative;
   name = pseries_test;
tests/serial_test.in new file +55 -0

55 lines not on this page · raw message

Signature · 7 lines
2.34.1


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#1 lore raw

PATCH 1/2 tests/util/grub-shell: Allow explicitly using other serial ports for output

In reply to Glenn Washburn

While here, move "-qemu=*" case to be next to the "--qemu-opts=*" case. This causes no change in logic, but is more logically located.

---
 tests/util/grub-shell.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
tests/util/grub-shell.in +4 -2
index 462099bdc4d0..d0de8ae581a2 100644
@@ -267,8 +267,6 @@ for option in "$@"; do
     --mkrescue-arg=*)
 	mkr=`echo "$option" | sed -e 's/--mkrescue-arg=//' -e 's/,/ /g'`
 	mkrescue_args="$mkrescue_args $mkr" ;;
-    --qemu=*)
-	qemu=`echo "$option" | sed -e 's/--qemu=//' -e 's/,/ /g'`;;
     --pseries)
 	qemu=qemu-system-ppc64
 	serial_port=ieee1275/hvterm
@@ -277,6 +275,10 @@ for option in "$@"; do
 	trim=1
 	pseries=y
 	    ;;
+    --serial=*)
+	serial_port=`echo "$option" | sed -e 's/--serial=//'`;;
+    --qemu=*)
+	qemu=`echo "$option" | sed -e 's/--qemu=//' -e 's/,/ /g'`;;
     --qemu-opts=*)
 	qs=`echo "$option" | sed -e 's/--qemu-opts=//'`
 	qemuopts="$qemuopts $qs" ;;
Signature · 7 lines
2.34.1


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#0 lore raw

cover Add serial test

Pretty self explanatory. The first patch allows explicitly telling grub-shell which terminal output device to use so we can test that the right bytes are getting written there. The second patch, which is the serial test, runs grub-shell once before the real test to identify the PCI id of the serial device that shouldbe used in the real test. This is needed because the id varys across targets.

Glenn

Glenn Washburn (2):
tests/util/grub-shell: Allow explicitly using other serial ports for
output
tests: Add serial_test

 Makefile.util.def        |  6 +++++
 tests/serial_test.in     | 55 ++++++++++++++++++++++++++++++++++++++++
 tests/util/grub-shell.in |  6 +++--
 3 files changed, 65 insertions(+), 2 deletions(-)
 create mode 100644 tests/serial_test.in
Signature · 7 lines
2.34.1


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#3 lore raw
Quoted 7 lines · Glenn Washburn

Pretty self explanatory. The first patch allows explicitly telling grub-shell which terminal output device to use so we can test that the right bytes are getting written there. The second patch, which is the serial test, runs grub-shell once before the real test to identify the PCI id of the serial device that shouldbe used in the real test. This is needed because the id varys across targets.

Quoted 6 lines

Glenn

Glenn Washburn (2):
tests/util/grub-shell: Allow explicitly using other serial ports for
output
tests: Add serial_test

For both patches Reviewed-by: Daniel Kiper <[email protected]>...

Daniel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel