1#!/bin/sh 2 3. ./functions.sh 4 5echo "NFSv${VERS} Basic fchmod tests." 6 7start_share 8 9dd if=/dev/zero of=testdata/testfile count=1 bs=32768 2>/dev/null 10 11echo -n "test fchmod(0600) ... " 12./prog_fchmod "${TESTURL}/?version=${VERS}" "." /testfile 0600 || failure 13success 14 15echo -n "Stat the file ... " 16./prog_stat "${TESTURL}/?version=${VERS}" "." testfile > "${TESTDIR}/output" || failure 17success 18 19echo -n "Verifying the mode is 0600 ... " 20grep "nfs_mode:100600" "${TESTDIR}/output" >/dev/null || failure 21success 22 23echo -n "test fchmod(0755) ... " 24./prog_fchmod "${TESTURL}/?version=${VERS}" "." /testfile 0755 || failure 25success 26 27echo -n "Stat the file ... " 28./prog_stat "${TESTURL}/?version=${VERS}" "." testfile > "${TESTDIR}/output" || failure 29success 30 31echo -n "Verifying the mode is 0755 ... " 32grep "nfs_mode:100755" "${TESTDIR}/output" >/dev/null || failure 33success 34 35 36stop_share 37 38exit 0 39