If a test.img file was left over from a previous run, then it
would cause the subsequent test to fail. Therefore remove any
old test.img file.
(cherry picked from commit
80aad709954cc4a3a294200e242876599047cef8)
public static void main (String[] argv)
{
try {
+ // Delete any previous test file if one was left around.
+ File old = new File ("test.img");
+ old.delete ();
+
RandomAccessFile f = new RandomAccessFile ("test.img", "rw");
f.setLength (500 * 1024 * 1024);
f.close ();