Commit 0feb432b authored by Andrei Emeltchenko's avatar Andrei Emeltchenko Committed by Anas Nashif
Browse files

ibecc: tests: Update test logging



Make logging more clear.

Signed-off-by: default avatarAndrei Emeltchenko <andrei.emeltchenko@intel.com>
parent 6c6645bf
Loading
Loading
Loading
Loading
+10 −9
Original line number Diff line number Diff line
@@ -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 */