aboutsummaryrefslogtreecommitdiffstats
path: root/test/test-chroot-symlink.sh
blob: 91092c1695641ed05ee17c12a2e8ebb3e940d9be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
#
# Test that stat'ing absolute/relative symlinks in a chroot environment works
# SPDX-License-Identifier: LGPL-2.1-only
#

set -e

touch symlink_target
trap "rm -f symlink_target symlink" 0

# Absolute symlink
ln -s /symlink_target symlink
./test/test-chroot-symlink `pwd`
rm symlink

# Relative symlink
ln -s symlink_target symlink
./test/test-chroot-symlink `pwd`