Skip to content

Commit

Permalink
multiple devices test: verify volumes have been truncated
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz committed Jun 9, 2021
1 parent ed3d95a commit f2c193a
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions systemtests/tests/multiplied-device/testrunner
Expand Up @@ -106,9 +106,9 @@ fi


#make sure all volumes are correctly truncated with the correct drive
grep "3000 OK label. VolBytes=223 Volume=\"Full-0001\" Device=\"MultiFileStorage0001\" (storage)" "${tmp}"/log3.out >/dev/null 2>&1 &&
grep "3000 OK label. VolBytes=223 Volume=\"Full-0002\" Device=\"MultiFileStorage0002\" (storage)" "${tmp}"/log3.out >/dev/null 2>&1 &&
grep "3000 OK label. VolBytes=223 Volume=\"Full-0003\" Device=\"MultiFileStorage0003\" (storage)" "${tmp}"/log3.out >/dev/null 2>&1 &&
grep "3000 OK label. VolBytes=... Volume=\"Full-0001\" Device=\"MultiFileStorage0001\" (storage)" "${tmp}"/log3.out >/dev/null 2>&1 &&
grep "3000 OK label. VolBytes=... Volume=\"Full-0002\" Device=\"MultiFileStorage0002\" (storage)" "${tmp}"/log3.out >/dev/null 2>&1 &&
grep "3000 OK label. VolBytes=... Volume=\"Full-0003\" Device=\"MultiFileStorage0003\" (storage)" "${tmp}"/log3.out >/dev/null 2>&1 &&
grep "The volume 'Full-0001' has been truncated." "${tmp}"/log3.out >/dev/null 2>&1 &&
grep "The volume 'Full-0002' has been truncated." "${tmp}"/log3.out >/dev/null 2>&1 &&
grep "The volume 'Full-0003' has been truncated." "${tmp}"/log3.out >/dev/null 2>&1
Expand All @@ -117,4 +117,12 @@ if test $? -ne 0 ; then
estat=1;
fi

# make sure the devices really have been truncated
for i in 1 2 3; do
size=$(wc -c < "storage/Full-000${i}")
if [ "$size" -ge 300 ]; then
echo "file storage/Full-000$i" was not truncated
estat=3
fi
done
end_test

0 comments on commit f2c193a

Please sign in to comment.