From 58045186fccaf400d3938fad220a99b1b5f3da6d Mon Sep 17 00:00:00 2001 From: Inès Varhol Date: Sun, 14 Apr 2024 19:28:21 +0200 Subject: tests/qtest : Use `g_assert_cmphex` instead of `g_assert_cmpuint` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Ninad Palsule Message-ID: <20240414173349.31194-1-ines.varhol@telecom-paris.fr> Signed-off-by: Thomas Huth --- tests/qtest/libqos/ahci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/qtest/libqos/ahci.c') diff --git a/tests/qtest/libqos/ahci.c b/tests/qtest/libqos/ahci.c index 6d59c7551a..34a75b7f43 100644 --- a/tests/qtest/libqos/ahci.c +++ b/tests/qtest/libqos/ahci.c @@ -1046,7 +1046,7 @@ static void ahci_atapi_command_set_offset(AHCICommand *cmd, uint64_t lba) case CMD_ATAPI_REQUEST_SENSE: case CMD_ATAPI_TEST_UNIT_READY: case CMD_ATAPI_START_STOP_UNIT: - g_assert_cmpuint(lba, ==, 0x00); + g_assert_cmphex(lba, ==, 0x00); break; default: /* SCSI doesn't have uniform packet formats, @@ -1109,7 +1109,7 @@ static void ahci_atapi_set_size(AHCICommand *cmd, uint64_t xbytes) break; case CMD_ATAPI_READ_CD: /* 24bit BE store */ - g_assert_cmpuint(nsectors, <, 1ULL << 24); + g_assert_cmphex(nsectors, <, 1ULL << 24); tmp = nsectors; cbd[6] = (tmp & 0xFF0000) >> 16; cbd[7] = (tmp & 0xFF00) >> 8; -- cgit 1.4.1