On Wed, 22 Jun 2016 08:59:14 -0700 Alexei Starovoitov <[email protected]> wrote:
> On Wed, Jun 22, 2016 at 8:54 AM, Jesper Dangaard Brouer > <[email protected]> wrote: > > On Tue, 21 Jun 2016 18:54:53 -0700 > > Alexei Starovoitov <[email protected]> wrote: > > > >> On Tue, Jun 21, 2016 at 11:48 AM, William Tu via iovisor-dev > >> <[email protected]> wrote: > >> > Hi, > >> > > >> > I'm running test_maps under net-next/samples/bpf/, commit > >> > 601009780635. The code logic all make sense but I got the assertion > >> > errors / coredump for some unknown reason under different compiler > >> > optimization flags (-O0 and -O2). The test_hashmap_sanity() works fine > >> > but fails at test_percpu_hashmap_sanity(). > >> > > >> > First run with normal build (which has -O2) > >> > [root@vm-dev bpf]# ./test_maps > >> > test_maps: samples/bpf/test_maps.c:137: test_percpu_hashmap_sanity: > >> > Assertion `bpf_lookup_elem(map_fd, &key, value) == -1 && > >> > (*__errno_location ()) == 2' failed. > > [...] > > > > Strange I get: > > > > $ sudo ./test_maps > > failed to create per-cpu arraymap 'Operation not permitted' > > yes. that's expected. Make sure to do 'ulimit -l unlimited' # ulimit -l unlimited # ./test_maps test_maps: OK Then it works, thanks. Maybe we could provide some better feedback from the test program, as this might be a common/expected behavior. -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat Author of http://www.iptv-analyzer.org LinkedIn: http://www.linkedin.com/in/brouer _______________________________________________ iovisor-dev mailing list [email protected] https://lists.iovisor.org/mailman/listinfo/iovisor-dev
