VirtualBox

source: vbox/trunk/src/VBox/Storage/testcase/tstVDIo.vd@ 77807

Last change on this file since 77807 was 76553, checked in by vboxsync, 6 years ago

scm --update-copyright-year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 KB
Line 
1/* $Id: tstVDIo.vd 76553 2019-01-01 01:45:53Z vboxsync $ */
2/**
3 * Storage: Simple I/O testing for most backends.
4 */
5
6/*
7 * Copyright (C) 2011-2019 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18void tstIo(string strMessage, string strBackend)
19{
20 print(strMessage);
21 createdisk("test", true /* fVerify */);
22 create("test", "base", "tst.disk", "dynamic", strBackend, 200M, false /* fIgnoreFlush */, false);
23 io("test", true, 32, "seq", 64K, 0, 200M, 200M, 100, "none");
24 io("test", false, 1, "seq", 64K, 0, 200M, 200M, 100, "none");
25 io("test", true, 32, "seq", 64K, 0, 200M, 200M, 0, "none");
26 io("test", false, 1, "seq", 64K, 0, 200M, 200M, 0, "none");
27 create("test", "diff", "tst2.disk", "dynamic", strBackend, 200M, false /* fIgnoreFlush */, false);
28 io("test", true, 32, "rnd", 64K, 0, 200M, 200M, 50, "none");
29 io("test", false, 1, "rnd", 64K, 0, 200M, 200M, 50, "none");
30 create("test", "diff", "tst3.disk", "dynamic", strBackend, 200M, false /* fIgnoreFlush */, false);
31 io("test", true, 32, "rnd", 64K, 0, 200M, 200M, 50, "none");
32 io("test", false, 1, "rnd", 64K, 0, 200M, 200M, 50, "none");
33 close("test", "single", true /* fDelete */);
34 close("test", "single", true /* fDelete */);
35 close("test", "single", true /* fDelete */);
36 destroydisk("test");
37}
38
39void tstIoUnaligned(string strMessage, string strBackend)
40{
41 print(strMessage);
42 createdisk("test", true);
43 create("test", "base", "tst.disk", "dynamic", strBackend, 2G, false);
44 io("test", false, 1, "seq", 512, 3584, 4096, 512, 100, "none");
45 io("test", false, 1, "seq", 512, 3584, 4096, 512, 0, "none");
46 destroydisk("test");
47}
48
49void main()
50{
51 /* Init I/O RNG for generating random data for writes */
52 iorngcreate(10M, "manual", 1234567890);
53
54 tstIo("Testing VDI", "VDI");
55 tstIo("Testing VMDK", "VMDK");
56 tstIo("Testing VHD", "VHD");
57 tstIo("Testing Parallels", "Parallels");
58 tstIo("Testing QED", "QED");
59 tstIo("Testing QCOW", "QCOW");
60
61 iorngdestroy();
62}
63
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette