[PATCH v3 03/16] tests: check decoding of AF_UNIX diag attribute

JingPiao Chen chenjingpiao at gmail.com
Tue Jun 20 10:09:17 UTC 2017


On Tue, Jun 20, 2017 at 12:47:39PM +0300, Dmitry V. Levin wrote:
> On Tue, Jun 20, 2017 at 01:11:51PM +0800, JingPiao Chen wrote:
> > On Tue, Jun 20, 2017 at 03:21:14AM +0300, Dmitry V. Levin wrote:
> > > On Mon, Jun 19, 2017 at 09:15:27AM +0800, JingPiao Chen wrote:
> > > > * tests/sock_diag_unix_attrs.c: New file.
> > > > * tests/gen_tests.in (sock_diag_unix_attrs): New entry.
> > > > * tests/pure_executables.list: Add sock_diag_unix_attrs.
> > > > * tests/.gitignore: Likewise.
> > >
> > > I don't see what's being checked by this test in addition to the
previous
> > > one, but anyway, I suggest a shorter name: nlattr_sock_diag.
> >
> > it test:
> > netlink_sock_diag.c: decode_unix_diag_msg():
> >
> > offset = NLMSG_ALIGN(sizeof(msg));
> > if (decode_nla && len > offset) {
> > tprints(", ");
> > decode_nlattr(tcp, addr + offset, len - offset,
> >      unix_diag_attrs, "UNIX_DIAG_???",
> >      NULL, 0, NULL);
> > }
> >
> > But when I add netlink_attribute test, this test it useless.
> > I remove the similar tests ([PATCH v3 05/16], [PATCH v3 07/16],
> > [PATCH v3 09/16], [PATCH v3 10/16], [PATCH v3 10/16]).
> > Because will test when attribute data decode are added.
>
> Other tests certainly tested something: in v4 at least the following
> functions are not fully covered by tests:
> decode_netlink_diag_msg
> decode_packet_diag_msg
> decode_inet_diag_req_compat
> decode_inet_diag_req_v2

Yes, if you want to test them now, I can send attribute data decode patch.
What do you think?

--
JingPiao Chen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20170620/b1995b25/attachment.html>


More information about the Strace-devel mailing list