mbox series

[RFC,0/7] selftests: openvswitch: cleanups for running as selftests

Message ID 20240216152846.1850120-1-aconole@redhat.com (mailing list archive)
Headers show
Series selftests: openvswitch: cleanups for running as selftests | expand

Message

Aaron Conole Feb. 16, 2024, 3:28 p.m. UTC
The series is a host of cleanups to the openvswitch selftest suite
which should be ready to run under the netdev selftest runners using
vng.  For now, the testing has been done with RW directories, but
additional testing will be done to try and keep it all as RO to be
more friendly.

There is one more test case I plan which will print the debug log
details when a test case fails so that a developer can get a clear
picture why the test case failed.  That will be done for the proper
submission as another patch in this series.

Additionally, the timeout setting was just an arbitrary number that
I picked, but needs more testing to tune it properly (since 5
minutes may be a bit too long).

Tested on fedora 38 using virtme-ng with the following commandline:

../virtme-ng/vng -v --run . --user root --cpus 4 \
    --rwdir=/home/aconole/git/linux/tools/testing/selftests/net/openvswitch/ \
    -- \
    make -C tools/testing/selftests/net/openvswitch \
         TARGETS=openvswitch TEST_PROGS=openvswitch.sh run_tests

Aaron Conole (7):
  selftests: openvswitch: add test case error directories to clean list
  selftests: openvswitch: be more verbose with selftest debugging
  selftests: openvswitch: use non-graceful kills when needed
  selftests: openvswitch: delete previously allocated netns
  selftests: openvswitch: make arping test a bit 'slower'
  selftests: openvswitch: insert module when running the tests
  selftests: openvswitch: add config and timeout settings

 .../selftests/net/openvswitch/Makefile        | 12 ++++-
 .../testing/selftests/net/openvswitch/config  | 50 +++++++++++++++++++
 .../selftests/net/openvswitch/openvswitch.sh  | 33 +++++++++---
 .../selftests/net/openvswitch/settings        |  1 +
 4 files changed, 89 insertions(+), 7 deletions(-)
 create mode 100644 tools/testing/selftests/net/openvswitch/config
 create mode 100644 tools/testing/selftests/net/openvswitch/settings

Comments

Jakub Kicinski Feb. 19, 2024, 8:28 p.m. UTC | #1
On Fri, 16 Feb 2024 10:28:39 -0500 Aaron Conole wrote:
> The series is a host of cleanups to the openvswitch selftest suite
> which should be ready to run under the netdev selftest runners using
> vng.  For now, the testing has been done with RW directories, but
> additional testing will be done to try and keep it all as RO to be
> more friendly.

Would it be an option to make the output go into a dir in /tmp/ 
instead of in place, in the tree?

  mktemp -p /tmp/ -d ovs-test.XXXXXXXXX

or such?
Aaron Conole Feb. 20, 2024, 6:02 p.m. UTC | #2
Jakub Kicinski <kuba@kernel.org> writes:

> On Fri, 16 Feb 2024 10:28:39 -0500 Aaron Conole wrote:
>> The series is a host of cleanups to the openvswitch selftest suite
>> which should be ready to run under the netdev selftest runners using
>> vng.  For now, the testing has been done with RW directories, but
>> additional testing will be done to try and keep it all as RO to be
>> more friendly.
>
> Would it be an option to make the output go into a dir in /tmp/ 
> instead of in place, in the tree?
>
>   mktemp -p /tmp/ -d ovs-test.XXXXXXXXX

That's probably the best approach.  I'll switch to it.

> or such?