tstVDCompact.vd revision 1839eb6c2f3526b276ac2dcf3deae74f6ef8af44
/* $Id$ */
/**
* Storage: Testcase for compacting disks.
*/
/*
* Copyright (C) 2011 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
{
/* Create disk containers, read verification is on. */
createdisk("disk", true);
/* Fill the disk with random data. */
/* Read the data to verify it once. */
/* Fill a part with 0's. */
/* Now compact. */
/* Read again to verify that the content hasn't changed. */
/* Fill everything with 0. */
/* Now compact again. */
/* Read again to verify that the content hasn't changed. */
destroydisk("disk");
}
void main()
{
/* Init I/O RNG for generating random data for writes. */
/* Create zero pattern */
/* Destroy RNG and pattern */
iopatterndestroy("zero");
iorngdestroy();
}