On Wed, 10 Sep 2025 09:57:17 +0200 "Nico Boehr" <nrb@xxxxxxxxxxxxx> wrote: > On Tue Sep 9, 2025 at 6:58 AM CEST, Thomas Huth wrote: > > For checking whether a panic event occurred, a simple "grep" > > for the related text in the output is enough - it's very unlikely > > that the output of QEMU will change. This way we can drop the > > dependency on the program "jq" which might not be installed on > > some systems. > > Trying to understand which problem you're trying to solve here. > > Is there any major distribution which doesn't have jq in its repos? Or any > reason why you wouldn't install it? I think it's just a matter of trying to avoid too many dependencies, especially for something this trivial > > > diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash > > index 36222355..16417a1e 100644 > > --- a/scripts/arch-run.bash > > +++ b/scripts/arch-run.bash > > @@ -296,11 +296,6 @@ do_migration () > > > > run_panic () > > { > [...] > > - panic_event_count=$(jq -c 'select(.event == "GUEST_PANICKED")' < ${qmp}.out | wc -l) > > - if [ "$panic_event_count" -lt 1 ]; then > > + if ! grep -E -q '"event"[[:blank:]]*:[[:blank:]]*"GUEST_PANICKED"' ${qmp}.out ; then > > This changes behaviour. > > Now "event" can be arbitrarily deep nested in the JSON. It could even be > completely invalid JSON. in that case we have other issues > > Not saying we shouldn't do this, it just comes with a cost and we need to see if > it's worth paying that. I don't have a strong opinion on this, but in general I like the idea of having fewer dependencies