]> granicus.if.org Git - strace/commit
tests: robustify create_nl_socket based tests against the race condition
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 4 Jul 2017 22:31:08 +0000 (22:31 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 4 Jul 2017 22:31:08 +0000 (22:31 +0000)
commitbcc7daac6cac9fcabd8197073ba9bcf843a851a4
treec51c0fe6fb7795fdaa0e5c954e048718bd456edc
parente70dae595414bbb577c7d0671f3dd443a1c63091
tests: robustify create_nl_socket based tests against the race condition

There is a race condition between the moment a netlink socket is created
and the moment it is reported via SOCK_DIAG_BY_FAMILY interface.
Add one more operation on the socket created by create_nl_socket
to increase chances of winning the race.

* tests/create_nl_socket.c (create_nl_socket_ext): Add a getsockopt call
with the created socket.
tests/create_nl_socket.c