[PATCH v1 6/6] [DO NOT MERGE] CI: example how to use ssh to extract logs

Marek Marczykowski-Górecki posted 6 patches 5 months, 4 weeks ago
[PATCH v1 6/6] [DO NOT MERGE] CI: example how to use ssh to extract logs
Posted by Marek Marczykowski-Górecki 5 months, 4 weeks ago
---
 automation/scripts/qubes-x86-64.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh
index cf040a29856b..944d0c6d383f 100755
--- a/automation/scripts/qubes-x86-64.sh
+++ b/automation/scripts/qubes-x86-64.sh
@@ -292,6 +292,8 @@ export TEST_LOG="smoke.serial"
 export TEST_TIMEOUT="$timeout"
 ./automation/scripts/console.exp | sed 's/\r\+$//'
 TEST_RESULT=$?
+ssh -o StrictHostKeyChecking=no root@$SUT_ADDR xl dmesg || :
+ssh -o StrictHostKeyChecking=no root@$SUT_ADDR dmesg || :
 
 if [ -n "$retrieve_xml" ]; then
     nc -w 10 "$SUT_ADDR" 8080 > tests-junit.xml </dev/null
-- 
git-series 0.9.1
Re: [PATCH v1 6/6] [DO NOT MERGE] CI: example how to use ssh to extract logs
Posted by Stefano Stabellini 5 months, 4 weeks ago
Nice!

On Mon, 23 Jun 2025, Marek Marczykowski-Górecki wrote:
> ---
>  automation/scripts/qubes-x86-64.sh | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh
> index cf040a29856b..944d0c6d383f 100755
> --- a/automation/scripts/qubes-x86-64.sh
> +++ b/automation/scripts/qubes-x86-64.sh
> @@ -292,6 +292,8 @@ export TEST_LOG="smoke.serial"
>  export TEST_TIMEOUT="$timeout"
>  ./automation/scripts/console.exp | sed 's/\r\+$//'
>  TEST_RESULT=$?
> +ssh -o StrictHostKeyChecking=no root@$SUT_ADDR xl dmesg || :
> +ssh -o StrictHostKeyChecking=no root@$SUT_ADDR dmesg || :
>  
>  if [ -n "$retrieve_xml" ]; then
>      nc -w 10 "$SUT_ADDR" 8080 > tests-junit.xml </dev/null
> -- 
> git-series 0.9.1
> 
Re: [PATCH v1 6/6] [DO NOT MERGE] CI: example how to use ssh to extract logs
Posted by Demi Marie Obenour 5 months, 4 weeks ago
On 6/23/25 09:47, Marek Marczykowski-Górecki wrote:
> ---
>  automation/scripts/qubes-x86-64.sh | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh
> index cf040a29856b..944d0c6d383f 100755
> --- a/automation/scripts/qubes-x86-64.sh
> +++ b/automation/scripts/qubes-x86-64.sh
> @@ -292,6 +292,8 @@ export TEST_LOG="smoke.serial"
>  export TEST_TIMEOUT="$timeout"
>  ./automation/scripts/console.exp | sed 's/\r\+$//'
>  TEST_RESULT=$?
> +ssh -o StrictHostKeyChecking=no root@$SUT_ADDR xl dmesg || :
> +ssh -o StrictHostKeyChecking=no root@$SUT_ADDR dmesg || :
>  
>  if [ -n "$retrieve_xml" ]; then
>      nc -w 10 "$SUT_ADDR" 8080 > tests-junit.xml </dev/null

StrictHostKeyChecking=no is generally a bad idea.
Is there a better option?
-- 
Sincerely,
Demi Marie Obenour (she/her/hers)
Re: [PATCH v1 6/6] [DO NOT MERGE] CI: example how to use ssh to extract logs
Posted by Marek Marczykowski-Górecki 5 months, 4 weeks ago
On Mon, Jun 23, 2025 at 02:28:47PM -0400, Demi Marie Obenour wrote:
> On 6/23/25 09:47, Marek Marczykowski-Górecki wrote:
> > ---
> >  automation/scripts/qubes-x86-64.sh | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh
> > index cf040a29856b..944d0c6d383f 100755
> > --- a/automation/scripts/qubes-x86-64.sh
> > +++ b/automation/scripts/qubes-x86-64.sh
> > @@ -292,6 +292,8 @@ export TEST_LOG="smoke.serial"
> >  export TEST_TIMEOUT="$timeout"
> >  ./automation/scripts/console.exp | sed 's/\r\+$//'
> >  TEST_RESULT=$?
> > +ssh -o StrictHostKeyChecking=no root@$SUT_ADDR xl dmesg || :
> > +ssh -o StrictHostKeyChecking=no root@$SUT_ADDR dmesg || :
> >  
> >  if [ -n "$retrieve_xml" ]; then
> >      nc -w 10 "$SUT_ADDR" 8080 > tests-junit.xml </dev/null
> 
> StrictHostKeyChecking=no is generally a bad idea.
> Is there a better option?

It doesn't matter here. It's simply more convenient than a netcat that
is used few lines below.

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab