#!/bin/sh # Basic script to make sure that cifsdd can do both local and remote I/O. if [ $# -lt 4 ]; then cat </dev/null ls -l $sourcepath for bs in 512 4k 48k; do echo "Testing $bs block size ..." # Check whether we can do local IO runcopy "Testing local -> local copy" if=$sourcepath of=$destpath bs=$bs compare "Checking local differences" $sourcepath $destpath # Check whether we can do a round trip runcopy "Testing local -> remote copy" \ if=$sourcepath of=//$SERVER/$SHARE/$sourcefile bs=$bs runcopy "Testing remote -> local copy" \ if=//$SERVER/$SHARE/$sourcefile of=$destpath bs=$bs compare "Checking differences" $sourcepath $destpath # Check that copying within the remote server works runcopy "Testing local -> remote copy" \ if=//$SERVER/$SHARE/$sourcefile of=//$SERVER/$SHARE/$sourcefile bs=$bs runcopy "Testing remote -> remote copy" \ if=//$SERVER/$SHARE/$sourcefile of=//$SERVER/$SHARE/$destfile bs=$bs runcopy "Testing remote -> local copy" \ if=//$SERVER/$SHARE/$destfile of=$destpath bs=$bs compare "Checking differences" $sourcepath $destpath done rm -f $sourcepath $destpath exit $failed