From bd0c8f5b87b57f47f7fb5e6481a5f2e40d557847 Mon Sep 17 00:00:00 2001 From: Michael Buesch Date: Mon, 5 Apr 2010 21:19:30 +0200 Subject: testsuite: Set randomized testfiles to read-only mode Signed-off-by: Michael Buesch --- tests/run-tests.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/run-tests.sh b/tests/run-tests.sh index 5c3bd9b..39ad135 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -106,8 +106,10 @@ function request_TOP # $1=TOPxxxx function create_random_file # $1=file $2=bs $3=count { - dd if=/dev/urandom of=$1 bs=$2 count=$3 >/dev/null 2>&1 + dd if=/dev/urandom of="$1" bs="$2" count="$3" >/dev/null 2>&1 [ $? -eq 0 ] || die "Failed to create $1" + chmod 444 "$1" + [ $? -eq 0 ] || die "Failed to set $1 read-only" } function compare_files # $1=file1 $2=file2 -- cgit v1.2.3