linux/tools/testing/selftests/mount/run_unprivileged_remount.sh
Ross Zwisler 8ec90bfd1a selftests: mount: add nosymfollow tests
Add tests for the new 'nosymfollow' mount option.  We test to make sure
that symlink traversal fails with ELOOP when 'nosymfollow' is set, but
that readlink(2) and realpath(3) still work as expected.  We also verify
that statfs(2) correctly returns ST_NOSYMFOLLOW when we are mounted with
the 'nosymfollow' option.

Signed-off-by: Ross Zwisler <zwisler@google.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2020-08-27 16:06:47 -04:00

13 lines
285 B
Bash
Executable File

#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
# Kselftest framework requirement - SKIP code is 4.
ksft_skip=4
# Run mount selftests
if [ -f /proc/self/uid_map ] ; then
./unprivileged-remount-test ;
else
echo "WARN: No /proc/self/uid_map exist, test skipped." ;
exit $ksft_skip
fi