diff mbox series

[2/5] automation: hide timeout countdown in log

Message ID 126f25fd791aa1f3e32463e600c59967504e19b6.1696557834.git-series.marmarek@invisiblethingslab.com (mailing list archive)
State New, archived
Headers show
Series automation: cleanup hardware based tests | expand

Commit Message

Marek Marczykowski-Górecki Oct. 6, 2023, 2:05 a.m. UTC
grep+sleep message every 1s makes job log unnecessary hard to read.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
---
I know I can download serial log file, but that's 3 more clicks...
---
 automation/scripts/qubes-x86-64.sh | 2 ++
 1 file changed, 2 insertions(+)

Comments

Andrew Cooper Oct. 18, 2023, 5:45 p.m. UTC | #1
On 06/10/2023 3:05 am, Marek Marczykowski-Górecki wrote:
> grep+sleep message every 1s makes job log unnecessary hard to read.
>
> Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
> ---
> I know I can download serial log file, but that's 3 more clicks...
> ---
>  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 1e84e40a4afc..5464d10fc343 100755
> --- a/automation/scripts/qubes-x86-64.sh
> +++ b/automation/scripts/qubes-x86-64.sh
> @@ -222,10 +222,12 @@ if [ -n "$wait_and_wakeup" ]; then
>      ssh $CONTROLLER wake
>  fi
>  
> +set +x
>  until grep "^Welcome to Alpine Linux" smoke.serial || [ $timeout -le 0 ]; do
>      sleep 1;
>      : $((--timeout))
>  done
> +set -x
>  
>  tail -n 100 smoke.serial
>  

This wants repeating in dom0_check= when looking for "Welcome to Alpine"
in guest-domU.log because the scrool is still visible in

https://gitlab.com/xen-project/people/marmarek/xen/-/jobs/5235487317

Happy to fix on commit, as this is the only comment I have on the series.

Alternatively, would it be worth writing a "wait_until $msg $file"
function to abstract this away?

~Andrew
Marek Marczykowski-Górecki Oct. 18, 2023, 10:16 p.m. UTC | #2
On Wed, Oct 18, 2023 at 06:45:03PM +0100, Andrew Cooper wrote:
> On 06/10/2023 3:05 am, Marek Marczykowski-Górecki wrote:
> > grep+sleep message every 1s makes job log unnecessary hard to read.
> >
> > Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
> > ---
> > I know I can download serial log file, but that's 3 more clicks...
> > ---
> >  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 1e84e40a4afc..5464d10fc343 100755
> > --- a/automation/scripts/qubes-x86-64.sh
> > +++ b/automation/scripts/qubes-x86-64.sh
> > @@ -222,10 +222,12 @@ if [ -n "$wait_and_wakeup" ]; then
> >      ssh $CONTROLLER wake
> >  fi
> >  
> > +set +x
> >  until grep "^Welcome to Alpine Linux" smoke.serial || [ $timeout -le 0 ]; do
> >      sleep 1;
> >      : $((--timeout))
> >  done
> > +set -x
> >  
> >  tail -n 100 smoke.serial
> >  
> 
> This wants repeating in dom0_check= when looking for "Welcome to Alpine"
> in guest-domU.log because the scrool is still visible in
> 
> https://gitlab.com/xen-project/people/marmarek/xen/-/jobs/5235487317
> 
> Happy to fix on commit, as this is the only comment I have on the series.

Fine with me, thanks!

> Alternatively, would it be worth writing a "wait_until $msg $file"
> function to abstract this away?

Can refactor it later, maybe when adding more tests.
diff mbox series

Patch

diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh
index 1e84e40a4afc..5464d10fc343 100755
--- a/automation/scripts/qubes-x86-64.sh
+++ b/automation/scripts/qubes-x86-64.sh
@@ -222,10 +222,12 @@  if [ -n "$wait_and_wakeup" ]; then
     ssh $CONTROLLER wake
 fi
 
+set +x
 until grep "^Welcome to Alpine Linux" smoke.serial || [ $timeout -le 0 ]; do
     sleep 1;
     : $((--timeout))
 done
+set -x
 
 tail -n 100 smoke.serial