From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin KaFai Lau Subject: Re: [PATCH bpf-next 5/5] selftests/bpf: Selftest for sys_sendmsg hooks Date: Tue, 22 May 2018 15:35:01 -0700 Message-ID: <20180522223459.hogvcictv2om6ydv@kafai-mbp.dhcp.thefacebook.com> References: <586e6d24b012fb900d873b6441aaec13f6c5c79b.1526694154.git.rdna@fb.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: , , , , To: Andrey Ignatov Return-path: Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:51312 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753036AbeEVWfc (ORCPT ); Tue, 22 May 2018 18:35:32 -0400 Content-Disposition: inline In-Reply-To: <586e6d24b012fb900d873b6441aaec13f6c5c79b.1526694154.git.rdna@fb.com> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, May 18, 2018 at 07:21:13PM -0700, Andrey Ignatov wrote: > Add selftest for BPF_CGROUP_UDP4_SENDMSG and BPF_CGROUP_UDP6_SENDMSG > attach types. > > Try to sendmsg(2) to specific IP:port and test that: > * source IP is overridden as expected. > * remote IP:port pair is overridden as expected; > > Both UDPv4 and UDPv6 are tested. > > Output: > # test_sock_addr.sh 2>/dev/null > Wait for testing IPv4/IPv6 to become available ... OK > ... pre-existing test-cases skipped ... > Test case: sendmsg4: load prog with wrong expected attach type .. [PASS] > Test case: sendmsg4: attach prog with wrong attach type .. [PASS] > Test case: sendmsg4: rewrite IP & port (asm) .. [PASS] > Test case: sendmsg4: rewrite IP & port (C) .. [PASS] > Test case: sendmsg4: deny call .. [PASS] > Test case: sendmsg6: load prog with wrong expected attach type .. [PASS] > Test case: sendmsg6: attach prog with wrong attach type .. [PASS] > Test case: sendmsg6: rewrite IP & port (asm) .. [PASS] > Test case: sendmsg6: rewrite IP & port (C) .. [PASS] > Test case: sendmsg6: deny call .. [PASS] > Summary: 26 PASSED, 0 FAILED > > Signed-off-by: Andrey Ignatov > Acked-by: Alexei Starovoitov Acked-by: Martin KaFai Lau