Skip to content

Commit 7c89f1d

Browse files
piso77gregkh
authored andcommitted
selftest: txtimestamp: fix net ns entry logic
[ Upstream commit b346c0c ] 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>
1 parent 705beef commit 7c89f1d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎tools/testing/selftests/net/txtimestamp.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ main() {
7575
fi
7676
}
7777

78-
if [[ "$(ip netns identify)" == "root" ]]; then
78+
if [[ -z "$(ip netns identify)" ]]; then
7979
./in_netns.sh $0 $@
8080
else
8181
main $@

0 commit comments

Comments
 (0)