File: test_0290_read.sh

package info (click to toggle)
libnfs 5.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,648 kB
  • sloc: ansic: 39,600; sh: 1,654; makefile: 315; xml: 178
file content (25 lines) | stat: -rwxr-xr-x 539 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

. ./functions.sh

echo "basic read test"

start_share

echo -n "Create a 10M file ... "
dd if=/dev/urandom of="${TESTDIR}/orig" bs=1M count=10 2>/dev/null || failure
success

echo -n "Copy file from the NFS server ... "
../utils/nfs-cp "${TESTURL}/orig" "${TESTDIR}/copy" >/dev/null || failure
success

echo -n "Verify the files are identical  ... "
ORIGSUM=`md5sum "${TESTDIR}/orig" | cut -d " " -f 1`
COPYSUM=`md5sum "${TESTDIR}/copy" | cut -d " " -f 1`
[ "${ORIGSUM}" != "${COPYSUM}" ] && failure
success

stop_share

exit 0