On Thu, Jul 06, 2017 at 02:53:56PM +0300, Dmitry V. Levin wrote:
> On Thu, Jul 06, 2017 at 09:57:32AM +0800, JingPiao Chen wrote:
[...]
> > +#ifdef HAVE_LINUX_FILTER_H
> > +   static const struct sock_filter filter[] = {
> > +           BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, 1, 0, 1)
> > +   };
> > +   TEST_NLATTR(fd, nlh0, hdrlen,
> > +               init_packet_diag_msg, print_packet_diag_msg,
> > +               PACKET_DIAG_FILTER, sizeof(filter),
> > +               filter, sizeof(filter),
> > +               printf("%p", RTA_DATA(NLATTR)));
> > +#endif
> 
> Something is wrong here if the filter is printed as a pointer
> instead of an array of bpf_filter structures.

In fact, the test failed to detect that the parser was wrong.
I changed it to print the program instead.


-- 
ldv

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to