lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190424234624.3swccvafxyna4diu@kafai-mbp.dhcp.thefacebook.com>
Date:   Wed, 24 Apr 2019 23:46:27 +0000
From:   Martin Lau <kafai@...com>
To:     "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:     Alexei Starovoitov <ast@...com>,
        Daniel Borkmann <daniel@...earbox.net>,
        John Fastabend <john.fastabend@...il.com>,
        Kernel Team <Kernel-team@...com>, Yonghong Song <yhs@...com>
Subject: Re: [PATCH bpf-next 5/6] bpf: Add BPF_MAP_TYPE_SK_STORAGE test to
 test_maps

On Wed, Apr 24, 2019 at 03:39:58PM -0700, Martin KaFai Lau wrote:
> This patch adds BPF_MAP_TYPE_SK_STORAGE test to test_maps.
> The src file is rather long, so it is put into another dir map_tests/
> and compile like the current prog_tests/ does.  Other existing
> tests in test_maps can also be re-factored into map_tests/ in the
> future.
> 
> Signed-off-by: Martin KaFai Lau <kafai@...com>
[ ... ]
> diff --git a/tools/testing/selftests/bpf/test_maps.c b/tools/testing/selftests/bpf/test_maps.c
> index 3c627771f965..246f745cb006 100644
> --- a/tools/testing/selftests/bpf/test_maps.c
> +++ b/tools/testing/selftests/bpf/test_maps.c
> @@ -27,6 +27,7 @@
>  
>  #include "bpf_util.h"
>  #include "bpf_rlimit.h"
> +#include "test_maps.h"
I forgot to add this new test_maps.h.  will fix.

Please continue the review on this set for now.

>  
>  #ifndef ENOTSUPP
>  #define ENOTSUPP 524
> @@ -36,15 +37,6 @@ static int skips;
>  
>  static int map_flags;
>  
> -#define CHECK(condition, tag, format...) ({				\
> -	int __ret = !!(condition);					\
> -	if (__ret) {							\
> -		printf("%s(%d):FAIL:%s ", __func__, __LINE__, tag);	\
> -		printf(format);						\
> -		exit(-1);						\
> -	}								\
> -})
> -
>  static void test_hashmap(unsigned int task, void *data)
>  {
>  	long long key, next_key, first_key, value;
> @@ -1703,6 +1695,10 @@ static void run_all_tests(void)
>  	test_map_in_map();
>  }
>  
> +#define DECLARE
> +#include <map_tests/tests.h>
> +#undef DECLARE
> +
>  int main(void)
>  {
>  	srand(time(NULL));
> @@ -1713,6 +1709,10 @@ int main(void)
>  	map_flags = BPF_F_NO_PREALLOC;
>  	run_all_tests();
>  
> +#define CALL
> +#include <map_tests/tests.h>
> +#undef CALL
> +
>  	printf("test_maps: OK, %d SKIPPED\n", skips);
>  	return 0;
>  }
> -- 
> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ