diff mbox series

[ovs-dev] tests: Allow valgrind check for afxdp testsuite.

Message ID 20191009143649.13334-1-i.maximets@ovn.org
State Accepted
Headers show
Series [ovs-dev] tests: Allow valgrind check for afxdp testsuite. | expand

Commit Message

Ilya Maximets Oct. 9, 2019, 2:36 p.m. UTC
New 'make' target 'check-afxdp-valgrind'.

Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
---
 tests/automake.mk | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Ben Pfaff Oct. 9, 2019, 6:20 p.m. UTC | #1
On Wed, Oct 09, 2019 at 04:36:49PM +0200, Ilya Maximets wrote:
> New 'make' target 'check-afxdp-valgrind'.
> 
> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>

Makes sense to me.  I did not test it.

Acked-by: Ben Pfaff <blp@ovn.org>
William Tu Oct. 9, 2019, 11:18 p.m. UTC | #2
On Wed, Oct 09, 2019 at 11:20:00AM -0700, Ben Pfaff wrote:
> On Wed, Oct 09, 2019 at 04:36:49PM +0200, Ilya Maximets wrote:
> > New 'make' target 'check-afxdp-valgrind'.
> > 
> > Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
> 
> Makes sense to me.  I did not test it.
> 
> Acked-by: Ben Pfaff <blp@ovn.org>

Thanks, I tested the script and it works ok.
(Although some test cases fail, I'm looking at it).

I applied to master.
William Tu Oct. 10, 2019, 8:51 p.m. UTC | #3
On Wed, Oct 09, 2019 at 04:18:38PM -0700, William Tu wrote:
> On Wed, Oct 09, 2019 at 11:20:00AM -0700, Ben Pfaff wrote:
> > On Wed, Oct 09, 2019 at 04:36:49PM +0200, Ilya Maximets wrote:
> > > New 'make' target 'check-afxdp-valgrind'.
> > > 
> > > Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
> > 
> > Makes sense to me.  I did not test it.
> > 
> > Acked-by: Ben Pfaff <blp@ovn.org>
> 
> Thanks, I tested the script and it works ok.
> (Although some test cases fail, I'm looking at it).
>

The valgrind-3.11 does not support bpf syscall wrapper, so
makce check-afxdp-valgrind always fails, 

 |netdev_afxdp|ERR|xsk_socket__create failed (Function not implemented) mode: SKB qid: 0
 |netdev_afxdp|ERR|Failed to create AF_XDP socket on queue 0.

 + ovs-vsctl add-port br0 afxdp-p0
 + ovs-vsctl -- set interface afxdp-p0 options:n_rxq=1 type=afxdp options:xdpmode=skb
 --16877-- WARNING: unhandled amd64-linux syscall: 321
 --16877-- You may be able to write your own handler.
 --16877-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
 --16877-- Nevertheless we consider this a bug.  Please report
 --16877-- it at http://valgrind.org/support/bug_reports.html.

Upgrade valgrind to 3.14+ works ok.

--Wiliam
Ilya Maximets Oct. 11, 2019, 11:11 a.m. UTC | #4
On 10.10.2019 22:51, William Tu wrote:
> On Wed, Oct 09, 2019 at 04:18:38PM -0700, William Tu wrote:
>> On Wed, Oct 09, 2019 at 11:20:00AM -0700, Ben Pfaff wrote:
>>> On Wed, Oct 09, 2019 at 04:36:49PM +0200, Ilya Maximets wrote:
>>>> New 'make' target 'check-afxdp-valgrind'.
>>>>
>>>> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
>>>
>>> Makes sense to me.  I did not test it.
>>>
>>> Acked-by: Ben Pfaff <blp@ovn.org>
>>
>> Thanks, I tested the script and it works ok.
>> (Although some test cases fail, I'm looking at it).
>>
> 
> The valgrind-3.11 does not support bpf syscall wrapper, so
> makce check-afxdp-valgrind always fails,
> 
>   |netdev_afxdp|ERR|xsk_socket__create failed (Function not implemented) mode: SKB qid: 0
>   |netdev_afxdp|ERR|Failed to create AF_XDP socket on queue 0.
> 
>   + ovs-vsctl add-port br0 afxdp-p0
>   + ovs-vsctl -- set interface afxdp-p0 options:n_rxq=1 type=afxdp options:xdpmode=skb
>   --16877-- WARNING: unhandled amd64-linux syscall: 321
>   --16877-- You may be able to write your own handler.
>   --16877-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
>   --16877-- Nevertheless we consider this a bug.  Please report
>   --16877-- it at http://valgrind.org/support/bug_reports.html.
> 
> Upgrade valgrind to 3.14+ works ok.
> 
> --Wiliam
> 

Hmm. OK. Thanks for the information.
I'm using fedora image for testing with valgrind 3.15.
So I had no such issues.

Best regards, Ilya Maximets.
diff mbox series

Patch

diff --git a/tests/automake.mk b/tests/automake.mk
index 9dd07a2d9..4bf8f00d5 100644
--- a/tests/automake.mk
+++ b/tests/automake.mk
@@ -282,6 +282,12 @@  check-userspace-valgrind: all $(valgrind_wrappers) $(check_DATA)
 	@echo '----------------------------------------------------------------------'
 	@echo 'Valgrind output can be found in tests/system-userspace-testsuite.dir/*/valgrind.*'
 	@echo '----------------------------------------------------------------------'
+check-afxdp-valgrind: all $(valgrind_wrappers) $(check_DATA)
+	$(SHELL) '$(SYSTEM_AFXDP_TESTSUITE)' -C tests VALGRIND='$(VALGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS) -j1
+	@echo
+	@echo '----------------------------------------------------------------------'
+	@echo 'Valgrind output can be found in tests/system-afxdp-testsuite.dir/*/valgrind.*'
+	@echo '----------------------------------------------------------------------'
 check-helgrind: all $(valgrind_wrappers) $(check_DATA)
 	-$(SHELL) '$(TESTSUITE)' -C tests CHECK_VALGRIND=true VALGRIND='$(HELGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS)