From 0672bb3c88f6393493cfd08b1176e09a892e5133 Mon Sep 17 00:00:00 2001 From: yangsheng <yangsheng> Date: Fri, 30 May 2008 08:24:03 +0000 Subject: [PATCH] Branch b1_6 b=15594 i=adilger, shadow The dd has a change of behaviour in 2.6.22 kernel. It might return a partial read from read() system-call in some case. --- lustre/tests/sanityN.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lustre/tests/sanityN.sh b/lustre/tests/sanityN.sh index afd4e48e81..43310233da 100644 --- a/lustre/tests/sanityN.sh +++ b/lustre/tests/sanityN.sh @@ -201,17 +201,19 @@ test_10a() { run_test 10a "write of file with sub-page size on multiple mounts " test_10b() { - yes "R" | dd of=$DIR1/f10b bs=3k count=1 || error "dd $DIR1" + # create a seed file + yes "R" | head -c 4000 >$TMP/f10b-seed + dd if=$TMP/f10b-seed of=$DIR1/f10b bs=3k count=1 || error "dd $DIR1" truncate $DIR1/f10b 4096 || error "truncate 4096" dd if=$DIR2/f10b of=$TMP/f10b-lustre bs=4k count=1 || error "dd $DIR2" # create a test file locally to compare - yes "R" | dd of=$TMP/f10b bs=3k count=1 || error "dd random" + dd if=$TMP/f10b-seed of=$TMP/f10b bs=3k count=1 || error "dd random" truncate $TMP/f10b 4096 || error "truncate 4096" cmp $TMP/f10b $TMP/f10b-lustre || error "file miscompare" - rm $TMP/f10b $TMP/f10b-lustre + rm $TMP/f10b $TMP/f10b-lustre $TMP/f10b-seed } run_test 10b "write of file with sub-page size on multiple mounts " -- GitLab