Re: [PATCH] kunit: tool: show list of valid --arch options when invalid

From: Brendan Higgins
Date: Tue Oct 05 2021 - 17:28:00 EST


On Wed, Sep 29, 2021 at 4:26 PM Daniel Latypov <dlatypov@xxxxxxxxxx> wrote:
>
> Consider this attempt to run KUnit in QEMU:
> $ ./tools/testing/kunit/kunit.py run --arch=x86
>
> Before you'd get this error message:
> kunit_kernel.ConfigError: x86 is not a valid arch
>
> After:
> kunit_kernel.ConfigError: x86 is not a valid arch, options are ['alpha', 'arm', 'arm64', 'i386', 'powerpc', 'riscv', 's390', 'sparc', 'x86_64']
>
> This should make it a bit easier for people to notice when they make
> typos, etc. Currently, one would have to dive into the python code to
> figure out what the valid set is.
>
> Signed-off-by: Daniel Latypov <dlatypov@xxxxxxxxxx>

Yes! Thank you for fixing this!

Reviewed-by: Brendan Higgins <brendanhiggins@xxxxxxxxxx>