VirtualBox

source: vbox/trunk/src/VBox/Storage/testcase/tstVDMultBackends.vd@ 107044

Last change on this file since 107044 was 106061, checked in by vboxsync, 2 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.8 KB
Line 
1/* $Id: tstVDMultBackends.vd 106061 2024-09-16 14:03:52Z vboxsync $ */
2/**
3 * Storage: Simple I/O test with different backends in one chain.
4 */
5
6/*
7 * Copyright (C) 2011-2024 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, 2G, false /* fIgnoreFlush */, false);
33 io("test", true, 32, "seq", 64K, 0, 2G, 200M, 100, "none");
34 io("test", false, 1, "seq", 64K, 0, 2G, 200M, 100, "none");
35 io("test", true, 32, "seq", 64K, 0, 2G, 200M, 0, "none");
36 io("test", false, 1, "seq", 64K, 0, 2G, 200M, 0, "none");
37 create("test", "diff", "tst2.disk", "dynamic", "VMDK", 2G, false /* fIgnoreFlush */, false);
38 io("test", true, 32, "rnd", 64K, 0, 2G, 200M, 50, "none");
39 io("test", false, 1, "rnd", 64K, 0, 2G, 200M, 50, "none");
40 create("test", "diff", "tst3.disk", "dynamic", "VMDK", 2G, false /* fIgnoreFlush */, false);
41 io("test", true, 32, "rnd", 64K, 0, 2G, 200M, 50, "none");
42 io("test", false, 1, "rnd", 64K, 0, 2G, 200M, 50, "none");
43 create("test", "diff", "tst4.disk", "dynamic", "VMDK", 2G, false /* fIgnoreFlush */, false);
44 io("test", true, 32, "rnd", 64K, 0, 2G, 200M, 50, "none");
45 io("test", true, 32, "rnd", 64K, 0, 2G, 200M, 0, "none");
46
47 create("test", "diff", "tst5.disk", "dynamic", "VMDK", 2G, false /* fIgnoreFlush */, false);
48 io("test", true, 32, "rnd", 64K, 0, 2G, 200M, 50, "none");
49 io("test", true, 32, "rnd", 64K, 0, 2G, 200M, 0, "none");
50
51 create("test", "diff", "tst6.disk", "dynamic", "VMDK", 2G, false /* fIgnoreFlush */, false);
52 io("test", true, 32, "rnd", 64K, 0, 2G, 200M, 50, "none");
53 io("test", true, 32, "rnd", 64K, 0, 2G, 200M, 0, "none");
54
55 close("test", "single", true /* fDelete */);
56 close("test", "single", true /* fDelete */);
57 close("test", "single", true /* fDelete */);
58 destroydisk("test");
59}
60
61void main()
62{
63 /* Init I/O RNG for generating random data for writes */
64 iorngcreate(10M, "manual", 1234567890);
65
66 tstIo("Testing VDI", "VDI");
67
68 iorngdestroy();
69}
70
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