From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin KaFai Lau Subject: Re: [PATCH bpf-next 4/5] selftests/bpf: Prepare test_sock_addr for extension Date: Tue, 22 May 2018 15:34:40 -0700 Message-ID: <20180522223440.m642ayslniijsapc@kafai-mbp.dhcp.thefacebook.com> References: <20964d7ac85e40bb2393bcdfefc556e44c0483cf.1526694154.git.rdna@fb.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: , , , , To: Andrey Ignatov Return-path: Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:41166 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751420AbeEVWfG (ORCPT ); Tue, 22 May 2018 18:35:06 -0400 Content-Disposition: inline In-Reply-To: <20964d7ac85e40bb2393bcdfefc556e44c0483cf.1526694154.git.rdna@fb.com> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, May 18, 2018 at 07:21:12PM -0700, Andrey Ignatov wrote: > test_sock_addr was not easy to extend since it was focused on sys_bind > and sys_connect quite a bit. > > Reorganized it so that it'll be easier to cover new test-cases for > `BPF_PROG_TYPE_CGROUP_SOCK_ADDR`: > > - decouple test-cases so that only one BPF prog is tested at a time; > > - check programmatically that local IP:port for sys_bind, source IP and > destination IP:port for sys_connect are rewritten property by tested > BPF programs. > > The output of new version: > # test_sock_addr.sh 2>/dev/null > Wait for testing IPv4/IPv6 to become available ... OK > Test case: bind4: load prog with wrong expected attach type .. [PASS] > Test case: bind4: attach prog with wrong attach type .. [PASS] > Test case: bind4: rewrite IP & TCP port in .. [PASS] > Test case: bind4: rewrite IP & UDP port in .. [PASS] > Test case: bind6: load prog with wrong expected attach type .. [PASS] > Test case: bind6: attach prog with wrong attach type .. [PASS] > Test case: bind6: rewrite IP & TCP port in .. [PASS] > Test case: bind6: rewrite IP & UDP port in .. [PASS] > Test case: connect4: load prog with wrong expected attach type .. [PASS] > Test case: connect4: attach prog with wrong attach type .. [PASS] > Test case: connect4: rewrite IP & TCP port .. [PASS] > Test case: connect4: rewrite IP & UDP port .. [PASS] > Test case: connect6: load prog with wrong expected attach type .. [PASS] > Test case: connect6: attach prog with wrong attach type .. [PASS] > Test case: connect6: rewrite IP & TCP port .. [PASS] > Test case: connect6: rewrite IP & UDP port .. [PASS] > Summary: 16 PASSED, 0 FAILED > > (stderr contains errors from libbpf when testing load/attach with > invalid arguments) > > Signed-off-by: Andrey Ignatov > Acked-by: Alexei Starovoitov Acked-by: Martin KaFai Lau