aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/test
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-09-02 12:34:29 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-09-02 12:34:29 +0530
commitf6cb248975083d58ae3af83bdfb39535e12db422 (patch)
tree74bc870df7730cbf6ad96b1bb584fc850783f3cd /scripts/test
parent0cc3198ceb072838a9d2171d1645c69be6ac3780 (diff)
downloadnnn-f6cb248975083d58ae3af83bdfb39535e12db422.tar.gz
Re-arrange artifacts
Diffstat (limited to 'scripts/test')
-rwxr-xr-xscripts/test/mktest.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/scripts/test/mktest.sh b/scripts/test/mktest.sh
new file mode 100755
index 0000000..c808d38
--- /dev/null
+++ b/scripts/test/mktest.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# Create test files and directories
+
+test -e test && {
+ echo "Remove test and try again"
+ exit 1
+}
+
+mkdir test && cd test
+
+echo 'It works!' > normal.txt
+echo 'Με δουλέβει;' > 'κοινό.txt'
+ln -s normal.txt ln-normal.txt
+ln -s normal.txt ln-normal
+mkdir normal-dir
+ln -s normal-dir ln-normal-dir
+ln -s nowhere ln-nowhere
+mkfifo mk-fifo
+touch no-access && chmod 000 no-access
+mkdir no-access-dir && chmod 000 no-access-dir
+ln -s ../normal.txt normal-dir/ln-normal.txt
+ln -s ../normal.txt normal-dir/ln-normal
+echo 'int main(void) { *((char *)0) = 0; }' > ill.c
+make ill > /dev/null
+echo 'test/ill' > ill.sh
+mkdir empty-dir
+mkdir cage
+echo 'chmod 000 test/cage' > cage/lock.sh
+echo 'chmod 755 test/cage' > cage-unlock.sh
+mkdir cage/lion
+echo 'chmod 000 test/cage' > cage/lion/lock.sh