Changeset 52379 in vbox for trunk/src/VBox/Storage/testcase
- Timestamp:
- Aug 14, 2014 12:08:18 PM (10 years ago)
- Location:
- trunk/src/VBox/Storage/testcase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Storage/testcase/Makefile.kmk
r52111 r52379 48 48 tstVDCopy_LIBS = $(LIB_DDU) 49 49 50 ifn1of ($(KBUILD_TARGET),win) 51 PROGRAMS += tstVDIo 50 PROGRAMS += tstVDIo 52 51 53 54 55 56 57 58 59 60 61 62 63 64 65 52 # 53 # VD I/O test scripts to built in -> .cpp 54 # 55 TSTVDIO_BUILTIN_TESTS_FILE = $(tstVDIo_0_OUTDIR)/BuiltinTests.cpp 56 TSTVDIO_BUILTIN_TESTS := \ 57 tstVDIo=tstVDIo.vd \ 58 tstVDResize=tstVDResize.vd \ 59 tstVDCompact=tstVDCompact.vd \ 60 tstVDCopy=tstVDCopy.vd \ 61 tstVDDiscard=tstVDDiscard.vd \ 62 tstVDShareable=tstVDShareable.vd 63 TSTVDIO_BUILTIN_TEST_NAMES := $(foreach test,$(TSTVDIO_BUILTIN_TESTS),$(firstword $(subst =,$(SPACE) ,$(test)))) 64 TSTVDIO_PATH_TESTS := $(PATH_SUB_CURRENT) 66 65 67 68 66 # 1=name, 2=filter 67 TSTVDIO_GEN_TEST_MACRO = 'TSTVDIOTESTENTRY const g_a$(1)[] =' '{' \ 69 68 $(foreach testnm,$(filter $(2),$(TSTVDIO_BUILTIN_TEST_NAMES)), ' TSTVDIOTESTENTRY_GEN(g_ab$(testnm)),') \ 70 69 '};' 'unsigned const g_c$(1) = RT_ELEMENTS(g_a$(1));' '' '' 71 70 72 71 $$(TSTVDIO_BUILTIN_TESTS_FILE): $(MAKEFILE_CURRENT) \ 73 72 $(foreach test,$(TSTVDIO_BUILTIN_TESTS),$(TSTVDIO_PATH_TESTS)/$(lastword $(subst =,$(SPACE) ,$(test)))) \ 74 73 $(VBOX_BIN2C) \ … … 76 75 $(QUIET)$(RM) -f -- $@ [email protected] 77 76 $(QUIET)$(APPEND) -n "$@" \ 78 79 77 '' \ 78 '#include "BuiltinTests.h"' \ 80 79 '' 81 80 $(foreach test,$(TSTVDIO_BUILTIN_TESTS), $(NLTAB)$(VBOX_BIN2C) -ascii --append \ … … 84 83 "$@") 85 84 86 # Generate certificatelists.85 # Generate test lists. 87 86 $(QUIET)$(APPEND) -n "$@" '' \ 88 87 $(call TSTVDIO_GEN_TEST_MACRO,VDIoTests,%) \ 89 88 90 tstVDIo_TEMPLATE = VBOXR3TSTEXE 91 tstVDIo_INCS := $(PATH_SUB_CURRENT) 92 tstVDIo_SOURCES = tstVDIo.cpp \ 93 VDIoBackend.cpp \ 94 VDIoBackendMem.cpp \ 95 VDMemDisk.cpp \ 96 VDIoRnd.cpp \ 97 VDScript.cpp \ 98 VDScriptAst.cpp \ 99 VDScriptChecker.cpp \ 100 VDScriptInterp.cpp \ 101 $(TSTVDIO_BUILTIN_TESTS_FILE) 102 tstVDIo_LIBS = \ 103 $(LIB_DDU) \ 89 ifn1of ($(KBUILD_TARGET), win) 90 VBOX_TSTVDIO_WITH_LOG_REPLAY = 1 91 endif 92 93 tstVDIo_TEMPLATE = VBOXR3TSTEXE 94 tstVDIo_INCS := $(PATH_SUB_CURRENT) 95 96 ifdef VBOX_TSTVDIO_WITH_LOG_REPLAY 97 tstVDIo_DEFS += VBOX_TSTVDIO_WITH_LOG_REPLAY 98 endif 99 100 tstVDIo_SOURCES = tstVDIo.cpp \ 101 VDIoBackend.cpp \ 102 VDIoBackendMem.cpp \ 103 VDMemDisk.cpp \ 104 VDIoRnd.cpp \ 105 VDScript.cpp \ 106 VDScriptAst.cpp \ 107 VDScriptChecker.cpp \ 108 VDScriptInterp.cpp \ 109 $(TSTVDIO_BUILTIN_TESTS_FILE) 110 tstVDIo_LIBS = \ 111 $(LIB_DDU) 112 113 ifdef VBOX_TSTVDIO_WITH_LOG_REPLAY 114 tstVDIo_LIBS += \ 104 115 $(PATH_STAGE_LIB)/StorageDbgLib$(VBOX_SUFF_LIB) 105 116 endif -
trunk/src/VBox/Storage/testcase/tstVDIo.cpp
r52378 r52379 18 18 #define LOGGROUP LOGGROUP_DEFAULT 19 19 #include <VBox/vd.h> 20 #include <VBox/vddbg.h>21 20 #include <VBox/err.h> 22 21 #include <VBox/log.h> … … 35 34 #include <iprt/test.h> 36 35 #include <iprt/system.h> 36 37 #ifdef VBOX_TSTVDIO_WITH_LOG_REPLAY 38 # include <VBox/vddbg.h> 39 #endif 37 40 38 41 #include "VDMemDisk.h" … … 238 241 static DECLCALLBACK(int) vdScriptHandlerClose(PVDSCRIPTARG paScriptArgs, void *pvUser); 239 242 static DECLCALLBACK(int) vdScriptHandlerPrintFileSize(PVDSCRIPTARG paScriptArgs, void *pvUser); 240 static DECLCALLBACK(int) vdScriptHandlerIoLogReplay(PVDSCRIPTARG paScriptArgs, void *pvUser);241 243 static DECLCALLBACK(int) vdScriptHandlerIoRngCreate(PVDSCRIPTARG paScriptArgs, void *pvUser); 242 244 static DECLCALLBACK(int) vdScriptHandlerIoRngDestroy(PVDSCRIPTARG paScriptArgs, void *pvUser); … … 256 258 static DECLCALLBACK(int) vdScriptHandlerSetFileBackend(PVDSCRIPTARG paScriptArgs, void *pvUser); 257 259 260 #ifdef VBOX_TSTVDIO_WITH_LOG_REPLAY 261 static DECLCALLBACK(int) vdScriptHandlerIoLogReplay(PVDSCRIPTARG paScriptArgs, void *pvUser); 262 #endif 263 258 264 /* create action */ 259 265 const VDSCRIPTTYPE g_aArgCreate[] = … … 357 363 }; 358 364 365 #ifdef VBOX_TSTVDIO_WITH_LOG_REPLAY 359 366 /* print file size action */ 360 367 const VDSCRIPTTYPE g_aArgIoLogReplay[] = … … 363 370 VDSCRIPTTYPE_STRING /* iolog */ 364 371 }; 372 #endif 365 373 366 374 /* I/O RNG create action */ … … 472 480 {"close", VDSCRIPTTYPE_VOID, g_aArgClose, RT_ELEMENTS(g_aArgClose), vdScriptHandlerClose}, 473 481 {"printfilesize", VDSCRIPTTYPE_VOID, g_aArgPrintFileSize, RT_ELEMENTS(g_aArgPrintFileSize), vdScriptHandlerPrintFileSize}, 482 #ifdef VBOX_TSTVDIO_WITH_LOG_REPLAY 474 483 {"ioreplay", VDSCRIPTTYPE_VOID, g_aArgIoLogReplay, RT_ELEMENTS(g_aArgIoLogReplay), vdScriptHandlerIoLogReplay}, 484 #endif 475 485 {"merge", VDSCRIPTTYPE_VOID, g_aArgMerge, RT_ELEMENTS(g_aArgMerge), vdScriptHandlerMerge}, 476 486 {"compact", VDSCRIPTTYPE_VOID, g_aArgCompact, RT_ELEMENTS(g_aArgCompact), vdScriptHandlerCompact}, … … 1393 1403 1394 1404 1405 #ifdef VBOX_TSTVDIO_WITH_LOG_REPLAY 1395 1406 static DECLCALLBACK(int) vdScriptHandlerIoLogReplay(PVDSCRIPTARG paScriptArgs, void *pvUser) 1396 1407 { … … 1543 1554 return rc; 1544 1555 } 1556 #endif 1545 1557 1546 1558
Note:
See TracChangeset
for help on using the changeset viewer.