diff mbox series

[1/4] automation: make console options configurable via variables

Message ID e0504797d1b3758c035cd82b2dc3b00d747ddcc8.1683943670.git-series.marmarek@invisiblethingslab.com (mailing list archive)
State New, archived
Headers show
Series automation: add AMD hw runner | expand

Commit Message

Marek Marczykowski-Górecki May 13, 2023, 2:12 a.m. UTC
This makes the test script easier reusable for different runners, where
console may be connected differently. Include both console= option and
configuration for specific chosen console too (like com1= here) in the
'CONSOLE_OPTS' variable.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
---
This will conflict with Stefano's patch, as both modify multiboot2 line,
but it shouldn't be too hard to resolve the conflict manually (both
replace console opts with a variable, and add extra opts at the end).
---
 automation/gitlab-ci/test.yaml     | 1 +
 automation/scripts/qubes-x86-64.sh | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

Comments

Stefano Stabellini May 15, 2023, 10:21 p.m. UTC | #1
On Sat, 13 May 2023, Marek Marczykowski-Górecki wrote:
> This makes the test script easier reusable for different runners, where
> console may be connected differently. Include both console= option and
> configuration for specific chosen console too (like com1= here) in the
> 'CONSOLE_OPTS' variable.
> 
> Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


> ---
> This will conflict with Stefano's patch, as both modify multiboot2 line,
> but it shouldn't be too hard to resolve the conflict manually (both
> replace console opts with a variable, and add extra opts at the end).
> ---
>  automation/gitlab-ci/test.yaml     | 1 +
>  automation/scripts/qubes-x86-64.sh | 6 +++---
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml
> index 55ca0c27dc49..cb7fd5c272e9 100644
> --- a/automation/gitlab-ci/test.yaml
> +++ b/automation/gitlab-ci/test.yaml
> @@ -96,6 +96,7 @@
>      LOGFILE: smoke-test.log
>      PCIDEV: "03:00.0"
>      PCIDEV_INTR: "MSI-X"
> +    CONSOLE_OPTS: "console=com1 com1=115200,8n1"
>    artifacts:
>      paths:
>        - smoke.serial
> diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh
> index 056faf9e6de8..ae766395d184 100755
> --- a/automation/scripts/qubes-x86-64.sh
> +++ b/automation/scripts/qubes-x86-64.sh
> @@ -184,11 +184,11 @@ cd ..
>  TFTP=/scratch/gitlab-runner/tftp
>  CONTROLLER=control@thor.testnet
>  
> -echo '
> -multiboot2 (http)/gitlab-ci/xen console=com1 com1=115200,8n1 loglvl=all guest_loglvl=all dom0_mem=4G
> +echo "
> +multiboot2 (http)/gitlab-ci/xen $CONSOLE_OPTS loglvl=all guest_loglvl=all dom0_mem=4G
>  module2 (http)/gitlab-ci/vmlinuz console=hvc0 root=/dev/ram0
>  module2 (http)/gitlab-ci/initrd-dom0
> -' > $TFTP/grub.cfg
> +" > $TFTP/grub.cfg
>  
>  cp -f binaries/xen $TFTP/xen
>  cp -f binaries/bzImage $TFTP/vmlinuz
> -- 
> git-series 0.9.1
>
Jiamei Xie May 16, 2023, 1:51 a.m. UTC | #2
On 2023/5/13 10:12, Marek Marczykowski-Górecki wrote:
> This makes the test script easier reusable for different runners, where
> console may be connected differently. Include both console= option and
> configuration for specific chosen console too (like com1= here) in the
> 'CONSOLE_OPTS' variable.
>
> Signed-off-by: Marek Marczykowski-Górecki<marmarek@invisiblethingslab.com>

Reviewed-by: Jiamei Xie <jiamei.xie@arm.com>
diff mbox series

Patch

diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml
index 55ca0c27dc49..cb7fd5c272e9 100644
--- a/automation/gitlab-ci/test.yaml
+++ b/automation/gitlab-ci/test.yaml
@@ -96,6 +96,7 @@ 
     LOGFILE: smoke-test.log
     PCIDEV: "03:00.0"
     PCIDEV_INTR: "MSI-X"
+    CONSOLE_OPTS: "console=com1 com1=115200,8n1"
   artifacts:
     paths:
       - smoke.serial
diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh
index 056faf9e6de8..ae766395d184 100755
--- a/automation/scripts/qubes-x86-64.sh
+++ b/automation/scripts/qubes-x86-64.sh
@@ -184,11 +184,11 @@  cd ..
 TFTP=/scratch/gitlab-runner/tftp
 CONTROLLER=control@thor.testnet
 
-echo '
-multiboot2 (http)/gitlab-ci/xen console=com1 com1=115200,8n1 loglvl=all guest_loglvl=all dom0_mem=4G
+echo "
+multiboot2 (http)/gitlab-ci/xen $CONSOLE_OPTS loglvl=all guest_loglvl=all dom0_mem=4G
 module2 (http)/gitlab-ci/vmlinuz console=hvc0 root=/dev/ram0
 module2 (http)/gitlab-ci/initrd-dom0
-' > $TFTP/grub.cfg
+" > $TFTP/grub.cfg
 
 cp -f binaries/xen $TFTP/xen
 cp -f binaries/bzImage $TFTP/vmlinuz