mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
tests/qtest : Use g_assert_cmphex
instead of g_assert_cmpuint
The messages for assertions using hexadecimal numbers will be easier to understand with `g_assert_cmphex`. Cases changed : "cmpuint.*0x", "cmpuint.*<<" Signed-off-by: Inès Varhol <ines.varhol@telecom-paris.fr> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Ninad Palsule <ninad@linux.ibm.com> Message-ID: <20240414173349.31194-1-ines.varhol@telecom-paris.fr> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
cbd58e7cc2
commit
58045186fc
10 changed files with 151 additions and 151 deletions
|
@ -63,22 +63,22 @@ static void test_fsi_setup(QTestState *s, uint32_t base_addr)
|
|||
/* Unselect FSI1 */
|
||||
aspeed_fsi_writel(s, ASPEED_FSI_OPB1_BUS_SELECT, 0x0);
|
||||
curval = aspeed_fsi_readl(s, ASPEED_FSI_OPB1_BUS_SELECT);
|
||||
g_assert_cmpuint(curval, ==, 0x0);
|
||||
g_assert_cmphex(curval, ==, 0x0);
|
||||
|
||||
/* Select FSI0 */
|
||||
aspeed_fsi_writel(s, ASPEED_FSI_OPB0_BUS_SELECT, 0x1);
|
||||
curval = aspeed_fsi_readl(s, ASPEED_FSI_OPB0_BUS_SELECT);
|
||||
g_assert_cmpuint(curval, ==, 0x1);
|
||||
g_assert_cmphex(curval, ==, 0x1);
|
||||
} else if (base_addr == AST2600_OPB_FSI1_BASE_ADDR) {
|
||||
/* Unselect FSI0 */
|
||||
aspeed_fsi_writel(s, ASPEED_FSI_OPB0_BUS_SELECT, 0x0);
|
||||
curval = aspeed_fsi_readl(s, ASPEED_FSI_OPB0_BUS_SELECT);
|
||||
g_assert_cmpuint(curval, ==, 0x0);
|
||||
g_assert_cmphex(curval, ==, 0x0);
|
||||
|
||||
/* Select FSI1 */
|
||||
aspeed_fsi_writel(s, ASPEED_FSI_OPB1_BUS_SELECT, 0x1);
|
||||
curval = aspeed_fsi_readl(s, ASPEED_FSI_OPB1_BUS_SELECT);
|
||||
g_assert_cmpuint(curval, ==, 0x1);
|
||||
g_assert_cmphex(curval, ==, 0x1);
|
||||
} else {
|
||||
g_assert_not_reached();
|
||||
}
|
||||
|
@ -145,11 +145,11 @@ static void test_fsi0_getcfam_addr0(const void *data)
|
|||
aspeed_fsi_writel(s, ASPEED_FSI_ENGINER_TRIGGER, 0x1);
|
||||
|
||||
curval = aspeed_fsi_readl(s, ASPEED_FSI_INTRRUPT_STATUS);
|
||||
g_assert_cmpuint(curval, ==, 0x10000);
|
||||
g_assert_cmphex(curval, ==, 0x10000);
|
||||
curval = aspeed_fsi_readl(s, ASPEED_FSI_OPB0_BUS_STATUS);
|
||||
g_assert_cmpuint(curval, ==, 0x0);
|
||||
g_assert_cmphex(curval, ==, 0x0);
|
||||
curval = aspeed_fsi_readl(s, ASPEED_FSI_OPB0_READ_DATA);
|
||||
g_assert_cmpuint(curval, ==, 0x152d02c0);
|
||||
g_assert_cmphex(curval, ==, 0x152d02c0);
|
||||
}
|
||||
|
||||
static void test_fsi1_getcfam_addr0(const void *data)
|
||||
|
@ -168,11 +168,11 @@ static void test_fsi1_getcfam_addr0(const void *data)
|
|||
aspeed_fsi_writel(s, ASPEED_FSI_ENGINER_TRIGGER, 0x1);
|
||||
|
||||
curval = aspeed_fsi_readl(s, ASPEED_FSI_INTRRUPT_STATUS);
|
||||
g_assert_cmpuint(curval, ==, 0x20000);
|
||||
g_assert_cmphex(curval, ==, 0x20000);
|
||||
curval = aspeed_fsi_readl(s, ASPEED_FSI_OPB1_BUS_STATUS);
|
||||
g_assert_cmpuint(curval, ==, 0x0);
|
||||
g_assert_cmphex(curval, ==, 0x0);
|
||||
curval = aspeed_fsi_readl(s, ASPEED_FSI_OPB1_READ_DATA);
|
||||
g_assert_cmpuint(curval, ==, 0x152d02c0);
|
||||
g_assert_cmphex(curval, ==, 0x152d02c0);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue