Re: No care given to GDB scripts..

From: Andrew Morton
Date: Wed Nov 29 2023 - 20:12:42 EST


On Wed, 29 Nov 2023 16:23:55 -0800 Florian Fainelli <f.fainelli@xxxxxxxxx> wrote:

> > Is there any way of scripting the scripts so we can have some sort of
> > automated testing down under tools/testing/selftests/?
>
> That might be a bit difficult to do as this would mean that we can self
> debug and introspect using gdb the live kernel. Testing using QEMU is
> definitively doable however. Of course, I just found another script that
> broke (device.py)!

Oh. That sounds quite the exercise in the context of tools/selftests.

One can of course just fire up gdb against the vmlinux elf file and
play around, but I assume this won't permit a useful amount of the
scripts to be exercised.

Suppose someone has set up qemu or whatever and has attached gdb to it.
Could we provide that person with a script or a canned set of commands
which exercise the gdb scripts to a useful extent? So rather than
attempting automated testing under the seltests umbrella, we provide
less skilled individuals with the means to easily and quickly check for
regressions. I'd expect that such a toolset would be particularly
helpful for regression testing the scripts across all the supported
architectures?