diff options
Diffstat (limited to 'src/VBox/Storage/testcase/tstVDMultBackends.vd')
-rw-r--r-- | src/VBox/Storage/testcase/tstVDMultBackends.vd | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/VBox/Storage/testcase/tstVDMultBackends.vd b/src/VBox/Storage/testcase/tstVDMultBackends.vd new file mode 100644 index 00000000..eee31efc --- /dev/null +++ b/src/VBox/Storage/testcase/tstVDMultBackends.vd @@ -0,0 +1,60 @@ +/* $Id: tstVDMultBackends.vd $ */ +/** + * Storage: Simple I/O test with different backends in one chain. + */ + +/* + * Copyright (C) 2011-2020 Oracle Corporation + * + * This file is part of VirtualBox Open Source Edition (OSE), as + * available from http://www.virtualbox.org. This file is free software; + * you can redistribute it and/or modify it under the terms of the GNU + * 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. + */ + +void tstIo(string strMessage, string strBackend) +{ + print(strMessage); + createdisk("test", true /* fVerify */); + create("test", "base", "tst.disk", "dynamic", strBackend, 2G, false /* fIgnoreFlush */, false); + io("test", true, 32, "seq", 64K, 0, 2G, 200M, 100, "none"); + io("test", false, 1, "seq", 64K, 0, 2G, 200M, 100, "none"); + io("test", true, 32, "seq", 64K, 0, 2G, 200M, 0, "none"); + io("test", false, 1, "seq", 64K, 0, 2G, 200M, 0, "none"); + create("test", "diff", "tst2.disk", "dynamic", "VMDK", 2G, false /* fIgnoreFlush */, false); + io("test", true, 32, "rnd", 64K, 0, 2G, 200M, 50, "none"); + io("test", false, 1, "rnd", 64K, 0, 2G, 200M, 50, "none"); + create("test", "diff", "tst3.disk", "dynamic", "VMDK", 2G, false /* fIgnoreFlush */, false); + io("test", true, 32, "rnd", 64K, 0, 2G, 200M, 50, "none"); + io("test", false, 1, "rnd", 64K, 0, 2G, 200M, 50, "none"); + create("test", "diff", "tst4.disk", "dynamic", "VMDK", 2G, false /* fIgnoreFlush */, false); + io("test", true, 32, "rnd", 64K, 0, 2G, 200M, 50, "none"); + io("test", true, 32, "rnd", 64K, 0, 2G, 200M, 0, "none"); + + create("test", "diff", "tst5.disk", "dynamic", "VMDK", 2G, false /* fIgnoreFlush */, false); + io("test", true, 32, "rnd", 64K, 0, 2G, 200M, 50, "none"); + io("test", true, 32, "rnd", 64K, 0, 2G, 200M, 0, "none"); + + create("test", "diff", "tst6.disk", "dynamic", "VMDK", 2G, false /* fIgnoreFlush */, false); + io("test", true, 32, "rnd", 64K, 0, 2G, 200M, 50, "none"); + io("test", true, 32, "rnd", 64K, 0, 2G, 200M, 0, "none"); + + close("test", "single", true /* fDelete */); + close("test", "single", true /* fDelete */); + close("test", "single", true /* fDelete */); + destroydisk("test"); +} + +void main() +{ + /* Init I/O RNG for generating random data for writes */ + iorngcreate(10M, "manual", 1234567890); + + tstIo("Testing VDI", "VDI"); + + iorngdestroy(); +} + |