Commit 8cc9063d authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

test: Cleanup timing.txt



Remove extra time() calls which are not necessary for code blocks
which are executed under run_test().

Also, drop random timing_exit() - the "exit" flow is not testname-based,
hence it always affects current stack (i.e. it simply pops the last
test without caring if it matches the testname argument or not)
tainting the time accounting.

Case in point, for nvme test suit, this rogue timing_exit() call was
causing "autotest;lib" time to be < 0 under the nvme-phy-autotest job
since the "autotest;lib;nvme" was being put on the test stack twice
(so the total child time for "autotest;lib" was bigger then the actual
time that passed between "autotest;lib" push and pop).

Change-Id: Iaa491a8117cb656f81c0979ccd1fa98e275bb7f9
Signed-off-by: default avatarMichal Berger <michal.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18296


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarPawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent 81cfac61
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -13,7 +13,6 @@ function nvme_identify() {
	for bdf in $(get_nvme_bdfs); do
		$SPDK_EXAMPLE_DIR/identify -r "trtype:PCIe traddr:${bdf}" -i 0
	done
	timing_exit identify
}

function nvme_perf() {
+18 −22
Original line number Diff line number Diff line
@@ -9,7 +9,6 @@ source $rootdir/test/common/autotest_common.sh

# simply check if rpc commands have any effect on spdk
function rpc_integrity() {
	time {
	bdevs=$($rpc bdev_get_bdevs)
	[ "$(jq length <<< "$bdevs")" == "0" ]

@@ -26,10 +25,8 @@ function rpc_integrity() {
	bdevs=$($rpc bdev_get_bdevs)
	[ "$(jq length <<< "$bdevs")" == "0" ]
}
}

function rpc_plugins() {
	time {
	malloc=$($rpc --plugin rpc_plugin create_malloc)
	bdevs=$($rpc bdev_get_bdevs)
	[ "$(jq length <<< "$bdevs")" == "1" ]
@@ -38,7 +35,6 @@ function rpc_plugins() {
	bdevs=$($rpc bdev_get_bdevs)
	[ "$(jq length <<< "$bdevs")" == "0" ]
}
}

function rpc_trace_cmd_test() {
	local info