1#!/bin/sh
2
3. ./functions.sh
4
5echo "NFSv${VERS} Basic creat path tests."
6
7start_share
8
9mkdir "${TESTDIR}/subdir"
10mkdir "${TESTDIR}/subdir2"
11
12echo -n "Create a file in root (abs) (1) ... "
13./prog_create "${TESTURL}/?version=${VERS}" "." /creat1 0750 || failure
14success
15
16echo -n "Stat the new file ... "
17./prog_stat "${TESTURL}/?version=${VERS}" "." creat1 > "${TESTDIR}/output" || failure
18success
19
20echo -n "Verifying it is a regular file ... "
21grep "nfs_mode:100750" "${TESTDIR}/output" >/dev/null || failure
22success
23
24echo -n "Remove the file ... "
25./prog_unlink "${TESTURL}/?version=${VERS}" "." /creat1 || failure
26success
27
28echo -n "Create a file in root (rel) (2) ... "
29./prog_create "${TESTURL}/?version=${VERS}" "." creat2 0750 || failure
30success
31
32echo -n "Create a file in subdirectory (abs) (3) ... "
33./prog_create "${TESTURL}/?version=${VERS}" "." /subdir/creat3 0750 || failure
34success
35
36echo -n "Create a file in subdirectory (rel) (4) ... "
37./prog_create "${TESTURL}/?version=${VERS}" "." subdir/creat4 0750 || failure
38success
39
40echo -n "Create a file from a different cwd (rel) (5) ... "
41./prog_create "${TESTURL}/?version=${VERS}" "subdir" ../subdir2/creat5 0750 || failure
42success
43
44echo -n "Create a file outside the share (rel) (6) ... "
45./prog_create "${TESTURL}/?version=${VERS}" "subdir" ../../subdir2/creat6 0750 2>/dev/null && failure
46success
47
48
49stop_share
50
51exit 0
52