Re: [PATCH bpf-next] selftests/bpf: Add verbosity to ima_setup.sh

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

 



[...]

> > ---
> >  tools/testing/selftests/bpf/ima_setup.sh      | 36 ++++++++++++++++---
> >  .../selftests/bpf/prog_tests/test_ima.c       | 11 ++++--
> >  2 files changed, 40 insertions(+), 7 deletions(-)
> >
> > diff --git a/tools/testing/selftests/bpf/ima_setup.sh b/tools/testing/selftests/bpf/ima_setup.sh
> > index 2bfc646bc230..d8d063fa7781 100755
> > --- a/tools/testing/selftests/bpf/ima_setup.sh
> > +++ b/tools/testing/selftests/bpf/ima_setup.sh
> > @@ -10,7 +10,7 @@ TEST_BINARY="/bin/true"
> >
> >  usage()
> >  {
> > -       echo "Usage: $0 <setup|cleanup|run> <existing_tmp_dir>"
> > +       echo "Usage: $0 -a <setup|cleanup|run> -d <existing_tmp_dir> -v <yes|no>"
>
> why -v <yes|no> vs common -v for verbose, and lack of -v for
> non-verbose? Seems much cleaner? Yes, C code will need to deal with it
> in a bit different way than you implemented it currently.

I did not care much about convention since it was a helper that was only
used by this particular test.

>
> But honestly, even just setting envvar would do. This script is for
> selftests only, so test_progs could have a convention of
> SELFTESTS_VERBOSE=1 for verbose mode or something. No arguments
> needed.

I like this better, and will send in an update.

- KP

>
> >         exit 1
> >  }
> >
>
> [...]



[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