1#!/bin/sh
2
3. ./functions.sh
4
5echo "NFSv${VERS} Basic nfs_fstat64() test."
6
7start_share
8
9mkdir "${TESTDIR}/subdir"
10mkdir "${TESTDIR}/subdir2"
11
12echo -n "test nfs_fstat64() for a root file (abs) (1)... "
13touch "${TESTDIR}/fstat1"
14./prog_fstat "${TESTURL}/?version=${VERS}" "." /fstat1 >/dev/null || failure
15success
16
17echo -n "test nfs_fstat64() for a root file (rel) (2)... "
18./prog_fstat "${TESTURL}/?version=${VERS}" "." fstat1 >/dev/null || failure
19success
20
21echo -n "test nfs_fstat64() for a subdir file (abs) (3)... "
22touch "${TESTDIR}/subdir/fstat3"
23./prog_fstat "${TESTURL}/?version=${VERS}" "." /subdir/fstat3 >/dev/null || failure
24success
25
26echo -n "test nfs_fstat64() for a subdir file (rel) (4)... "
27./prog_fstat "${TESTURL}/?version=${VERS}" "." subdir/fstat3 >/dev/null || failure
28success
29
30echo -n "test nfs_fstat64() from a different cwd (rel) (5)... "
31./prog_fstat "${TESTURL}/?version=${VERS}" "subdir2" ../subdir/fstat3 >/dev/null || failure
32success
33
34echo -n "test nfs_fstat64() outside the share (rel) (6)... "
35./prog_fstat "${TESTURL}/?version=${VERS}" "subdir2" ../../subdir/fstat3 >/dev/null 2>&1 && failure
36success
37
38stop_share
39
40exit 0
41