VirtualBox

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

Last change on this file was 98103, checked in by vboxsync, 16 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.7 KB
Line 
1/* $Id: tstVDIo.vd 98103 2023-01-17 14:15:46Z vboxsync $ */
2/**
3 * Storage: Simple I/O testing for most backends.
4 */
5
6/*
7 * Copyright (C) 2011-2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28void tstIo(string strMessage, string strBackend)
29{
30 print(strMessage);
31 createdisk("test", true /* fVerify */);
32 create("test", "base", "tst.disk", "dynamic", strBackend, 200M, false /* fIgnoreFlush */, false);
33 io("test", true, 32, "seq", 64K, 0, 200M, 200M, 100, "none");
34 io("test", false, 1, "seq", 64K, 0, 200M, 200M, 100, "none");
35 io("test", true, 32, "seq", 64K, 0, 200M, 200M, 0, "none");
36 io("test", false, 1, "seq", 64K, 0, 200M, 200M, 0, "none");
37 create("test", "diff", "tst2.disk", "dynamic", strBackend, 200M, false /* fIgnoreFlush */, false);
38 io("test", true, 32, "rnd", 64K, 0, 200M, 200M, 50, "none");
39 io("test", false, 1, "rnd", 64K, 0, 200M, 200M, 50, "none");
40 create("test", "diff", "tst3.disk", "dynamic", strBackend, 200M, false /* fIgnoreFlush */, false);
41 io("test", true, 32, "rnd", 64K, 0, 200M, 200M, 50, "none");
42 io("test", false, 1, "rnd", 64K, 0, 200M, 200M, 50, "none");
43 close("test", "single", true /* fDelete */);
44 close("test", "single", true /* fDelete */);
45 close("test", "single", true /* fDelete */);
46 destroydisk("test");
47}
48
49void tstIoUnaligned(string strMessage, string strBackend)
50{
51 print(strMessage);
52 createdisk("test", true);
53 create("test", "base", "tst.disk", "dynamic", strBackend, 2G, false);
54 io("test", false, 1, "seq", 512, 3584, 4096, 512, 100, "none");
55 io("test", false, 1, "seq", 512, 3584, 4096, 512, 0, "none");
56 destroydisk("test");
57}
58
59void main()
60{
61 /* Init I/O RNG for generating random data for writes */
62 iorngcreate(10M, "manual", 1234567890);
63
64 tstIo("Testing VDI", "VDI");
65 tstIo("Testing VMDK", "VMDK");
66 tstIo("Testing VHD", "VHD");
67 tstIo("Testing Parallels", "Parallels");
68 tstIo("Testing QED", "QED");
69 tstIo("Testing QCOW", "QCOW");
70
71 iorngdestroy();
72}
73
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use