Re: [PATCH bpf-next v2] selftests/bpf: Silence ima_setup.sh when not running in verbose mode.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[...]
> >
> > +       if [[ "${verbose}" -eq 0 ]]; then
> > +               exec 1> /dev/null
> > +               exec 2>&1
>
> can't this be done with one exec, though:
>
> exec 2>&1 1>/dev/null

Yep, fixed.

>
> ?
>
> It also actually would be nice to not completely discard the output,
> but rather redirect it to a temporary file and emit it on error with
> trap. test_progs behavior is no extra output on success, but emit it
> fully at the end if test is failing. Would be nice to preserve this
> for shell script as well, as otherwise debugging this in CI would be
> nearly impossible.
>

Yep, this is better for debuggability. I will update and send another version.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux