[PATCH v3 03/16] tests: check decoding of AF_UNIX diag attribute
JingPiao Chen
chenjingpiao at gmail.com
Tue Jun 20 05:11:51 UTC 2017
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.
--
JingPiao Chen
More information about the Strace-devel
mailing list