Re: [PATCH nft 3/4] tests: shell: skip pipapo set backend in transactions/30s-stress

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

 



On Wed, 2023-11-15 at 10:42 +0100, Pablo Neira Ayuso wrote:
> 
>  
> +if [ "$NFT_TEST_HAVE_pipapo" != y ] ;then
> +	echo "Skipping pipapo set backend, kernel does not support
> it"
> +fi

It's good and useful to run a reduced subset of the test, if some
kernel feature is missing.

But in that case, the end of the test should have something like

  if [ "$NFT_TEST_HAVE_pipapo" = n ] ; then
      echo "Ran a partial test only, due to NFT_TEST_HAVE_pipapo=n"
      exit 77
  fi

so that it shows up as skipped. In other words, "partially skipped"
should also show up as skipped.




Btw, I find it better to compare the  $NFT_TEST_HAVE_ variables only
against "n", like:

  if [ "$NFT_TEST_HAVE_pipapo" = n ] ; then
  if [ "$NFT_TEST_HAVE_pipapo" != n ] ; then

so that the SKIPPING only happens after an explicit opt-out.

Then you wouldn't need the workaround

»·······if [ -z "${NFT_TEST_HAVE_pipapo+x}" ]; then
»·······»·······NFT_TEST_HAVE_pipapo=y
»·······fi

above.





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux