selftest: txtimestamp: fix net ns entry logic
authorPaolo Pisati <paolo.pisati@canonical.com>
Tue, 21 Jul 2020 16:17:10 +0000 (18:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Aug 2020 07:58:49 +0000 (09:58 +0200)
commit7c89f1dbef3366cb4e1055550ff19d48bd22bfe1
treeaae056e330d6026ca355a4901100799fca8d9bee
parent705beef22791a98f953ea719bd7b32274ac073ac
selftest: txtimestamp: fix net ns entry logic

[ Upstream commit b346c0c85892cb8c53e8715734f71ba5bbec3387 ]

According to 'man 8 ip-netns', if `ip netns identify` returns an empty string,
there's no net namespace associated with current PID: fix the net ns entrance
logic.

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/net/txtimestamp.sh