diff --git a/tests/ls/readdir-mountpoint-inode.sh
b/tests/ls/readdir-mountpoint-inode.sh
index dabd661..b8691ea 100755
--- a/tests/ls/readdir-mountpoint-inode.sh
+++ b/tests/ls/readdir-mountpoint-inode.sh
@@ -21,8 +21,8 @@ print_ver_ ls
# We use --local here so as to not activate
# potentially very many remote mounts.
-mount_points=$(df --local -P 2>&1 | sed -n 's,.*[0-9]% \(/.\),\1,p')
-test -z "$mount_points" &&
+df --local -P 2>&1 | sed -n 's,.*[0-9]% \(/.\),\1,p' > mount_points
+test -s mount_points ||
skip_ "this test requires a non-root mount point"