Skip to content

Commit

Permalink
tests: fix slirp flake v2
Browse files Browse the repository at this point in the history
Commit 4a45167 points at the correct error source however the fix
for it was not working. ls -l will alwys look differnt when called on
different paths. We only want to compare the actual link target. Fix
this by using readlink.

Fixes containers#110

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
  • Loading branch information
Luap99 committed Mar 31, 2022
1 parent ba3abf5 commit 9c8cdbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ function create_netns() {
# we have to wait for unshare and check that we have a new ns before returning
local timeout=2
while [[ $timeout -gt 1 ]]; do
if [[ "$(ls -l /proc/self/ns/net)" != "$(ls -l /proc/$pid/ns/net)" ]]; then
if [ "$(readlink /proc/self/ns/net)" != "$(readlink /proc/$pid/ns/net)" ]; then
echo $pid
return
fi
Expand Down

0 comments on commit 9c8cdbd

Please sign in to comment.