Re: [PATCH] fault-injection: Enhance failcmd to exit on non-hex address input

From: Akinobu Mita
Date: Tue Jul 30 2024 - 10:09:35 EST


2024年7月29日(月) 17:59 Breno Leitao <leitao@xxxxxxxxxx>:
>
> Hello Akinobu,
>
> On Sun, Jul 28, 2024 at 06:00:14PM +0900, Akinobu Mita wrote:
> > 2024年7月26日(金) 19:50 Breno Leitao <leitao@xxxxxxxxxx>:
>
> > > +exit_if_not_hex() {
> > > + local value="$1"
> > > + if ! [[ $value =~ ^0x[0-9a-fA-F]+$ ]]; then
> > > + echo "Error: The provided value '$value' is not a valid hexadecimal number."
> >
> > It is better to write error messages to standard error rather than
> > standard output.
>
> Agree. I've sent a V2 with your proposed change. Thanks!
>
> > Other than that I think it's good.
>
> Thanks.
>
> By the way, this file seems unmaintained by looking at MAINTAINERS.
> Would you mind if I send something as:

No problem.

> Author: Breno Leitao <leitao@xxxxxxxxxx>
> Date: Mon Jul 29 01:53:44 2024 -0700
>
> failcmd: Add script file in MAINTAINERS
>
> failcmd is one of the main interfaces to fault injection framework, but,
> it is not listed under FAULT INJECTION SUPPORT entry in MAINTAINERS.
> This is unfortunate, since git-send-email doesn't find emails to send
> the patches to, forcing the user to try to guess who maintains it.
>
> Akinobu Mita seems to be actively maintaining it, so, let's add the file
> under FAULT INJECTION SUPPORT section.
>
> Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>

Reviewed-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>

> diff --git a/MAINTAINERS b/MAINTAINERS
> index 0748d6bd0c4f..11f3ef0b5ffd 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -8388,6 +8388,7 @@ M: Akinobu Mita <akinobu.mita@xxxxxxxxx>
> S: Supported
> F: Documentation/fault-injection/
> F: lib/fault-inject.c
> +F: tools/testing/fault-injection/
>
> FBTFT Framebuffer drivers
> L: dri-devel@xxxxxxxxxxxxxxxxxxxxx