From 0feb432b8ee0800c26ff7820dcc7efedf79e1b51 Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Thu, 18 Nov 2021 16:20:53 +0200 Subject: [PATCH] ibecc: tests: Update test logging Make logging more clear. Signed-off-by: Andrei Emeltchenko --- tests/subsys/edac/ibecc_cov/src/ibecc.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/subsys/edac/ibecc_cov/src/ibecc.c b/tests/subsys/edac/ibecc_cov/src/ibecc.c index 1c81f6b88a3..febf02f3437 100644 --- a/tests/subsys/edac/ibecc_cov/src/ibecc.c +++ b/tests/subsys/edac/ibecc_cov/src/ibecc.c @@ -14,31 +14,32 @@ static uint8_t mock_sys_in8(io_port_t port) { - TC_PRINT("Simulate sys_in8()\n"); - /* Needed for NMI handling simulation */ if (port == NMI_STS_CNT_REG) { + TC_PRINT("Simulate sys_in8(NMI_STS_CNT_REG)=>SERR\n"); return NMI_STS_SRC_SERR; } + TC_PRINT("Simulate sys_in8(0x%x)=>0\n", port); + return 0; } static void mock_sys_out8(uint8_t data, io_port_t port) { - TC_PRINT("Simulate sys_out8()\n"); + TC_PRINT("Simulate sys_out8() NOP\n"); } static uint64_t mock_sys_read64(uint64_t addr) { - TC_PRINT("Simulate sys_read64()\n"); + TC_PRINT("Simulate sys_read64(0x%llx)=>0\n", addr); return 0; } static void mock_sys_write64(uint64_t data, uint64_t reg) { - TC_PRINT("Simulate sys_write64()\n"); + TC_PRINT("Simulate sys_write64() NOP\n"); } static void mock_conf_write(pcie_bdf_t bdf, unsigned int reg, uint32_t data) @@ -48,8 +49,6 @@ static void mock_conf_write(pcie_bdf_t bdf, unsigned int reg, uint32_t data) static uint32_t mock_conf_read(pcie_bdf_t bdf, unsigned int reg) { - TC_PRINT("Simulate pcie_conf_read() zero return\n"); - #if defined(EMULATE_SKU) if (bdf == PCI_HOST_BRIDGE && reg == PCIE_CONF_ID) { TC_PRINT("Simulate PCI device, SKU 0x%x\n", EMULATE_SKU); @@ -66,6 +65,8 @@ static uint32_t mock_conf_read(pcie_bdf_t bdf, unsigned int reg) } #endif /* IBECC_ENABLED */ + TC_PRINT("Simulate pcie_conf_read()=>0\n"); + return 0; } @@ -92,11 +93,11 @@ static void test_static_functions(void) zassert_not_null(dev, "Device not found"); - /* Test failed PCIE probe */ + /* Catch failed PCIE probe case */ ret = edac_ibecc_init(dev); zassert_equal(ret, -ENODEV, ""); - /* Test pasring zero errlog case */ + /* Catch passing zero errlog case */ parse_ecclog(dev, 0, &error_data); /* Test errsts clear not set case */