summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2019-02-01 00:00:08 -0500
committerTavian Barnes <tavianator@tavianator.com>2019-02-01 12:50:29 -0500
commit30012351f6cadc25bf800c86f1431eade4ee0af5 (patch)
tree03529f68d39d3b2eb9971acd3e73b65c89178e01 /tests.sh
parent6a5c4c1161291a55b35151562a2d86c0a7a06606 (diff)
downloadbfs-30012351f6cadc25bf800c86f1431eade4ee0af5.tar.xz
tests: New utility for making and testing socket files
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests.sh b/tests.sh
index 302a4c2..57b19de 100755
--- a/tests.sh
+++ b/tests.sh
@@ -22,6 +22,16 @@ umask 022
export LC_ALL=C
export TZ=UTC
+function _realpath() {
+ (
+ cd "${1%/*}"
+ echo "$PWD/${1##*/}"
+ )
+}
+
+BFS="$(_realpath ./bfs)"
+TESTS="$(_realpath ./tests)"
+
# The temporary directory that will hold our test data
TMP="$(mktemp -d "${TMPDIR:-/tmp}"/bfs.XXXXXXXXXX)"
chown "$(id -u):$(id -g)" "$TMP"
@@ -177,7 +187,7 @@ function make_rainbow() {
# TODO: block
# TODO: chardev
ln -s nowhere "$1/broken"
- # TODO: socket
+ "$TESTS/mksock" "$1/socket"
touchp "$1"/s{u,g,ug}id
chmod u+s "$1"/su{,g}id
chmod g+s "$1"/s{u,}gid
@@ -195,16 +205,6 @@ function make_scratch() {
}
make_scratch "$TMP/scratch"
-function _realpath() {
- (
- cd "${1%/*}"
- echo "$PWD/${1##*/}"
- )
-}
-
-BFS="$(_realpath ./bfs)"
-TESTS="$(_realpath ./tests)"
-
posix_tests=(
# General parsing
test_basic