summaryrefslogtreecommitdiffstats
path: root/tests/posix/overlayfs.sh
blob: a56b5b38c3769b94e78e0ffc1a9f8179918a6e1b (plain)
1
2
3
4
5
6
7
test "$UNAME" = "Linux" || skip
clean_scratch
"$XTOUCH" -p scratch/{lower/{foo,bar,baz},upper/{bar,baz/qux}}
mkdir -p scratch/{work,merged}
bfs_sudo mount -t overlay overlay -olowerdir=scratch/lower,upperdir=scratch/upper,workdir=scratch/work scratch/merged || skip
trap "bfs_sudo umount scratch/merged; bfs_sudo rm -rf scratch/work" EXIT
bfs_diff scratch/merged