Re: [PATCH] tests: shell: Add a test case to verify the limit statement.

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

 



Yi Chen <yiche@xxxxxxxxxx> wrote:
> > export NFT_TEST_LIBRARY_FILE="$NFT_TEST_BASEDIR/helpers/lib.sh"
> > or whatever.  Then tests can do
> > . $NFT_TEST_LIBRARY_FILE
> 
> I prefer a single test script that can be executed independently.

Why?  Its possible to execute only one test via
tests/shell/run-tests.sh $filename

There is one exeception in the tree:
  tests/shell/testcases/transactions/30s-stress

... because that script can be passed a run-time, when
executed as part of the tests it runs for 30s but one
can do "tests/shell/testcases/transactions/30s-stress 600" etc.

Thats also why it does this:
  if [ x = x"$NFT" ] ; then
        NFT=nft
  fi

I missed this earlier when reviewing nft_nat test:

+       ip netns exec $R nft -f - <<-EOF

*ALL* "nft" should be replaced by "$NFT", so when the tests are executed
the locally built nft version, i.e. src/nft, is used, not the system binary.

Also:
tools/check-tree.sh |grep ftp
ERR:  "tests/shell/testcases/packetpath/nat_ftp" has no "tests/shell/testcases/packetpath/dumps/nat_ftp.{nft,nodump}" file

In this case it makes sense to add

  tests/shell/testcases/packetpath/dumps/nat_ftp.nodump

Can you send a followup patch?
Thanks, and sorry for missing this earlier.

> So, Would you accept something like:
> . $NFT_TEST_LIBRARY_FILE || . ${PWD%%/testcases*}/helpers/lib.sh?

Yes, but only if there is a compelling reason for the stand-alone
requirement.




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

  Powered by Linux