diff options
| author | Inès Varhol <ines.varhol@telecom-paris.fr> | 2024-04-14 19:28:21 +0200 |
|---|---|---|
| committer | Thomas Huth <thuth@redhat.com> | 2024-04-25 07:03:04 +0200 |
| commit | 58045186fccaf400d3938fad220a99b1b5f3da6d (patch) | |
| tree | 52c20b0b22092cf10274811ee92154beb9f27872 /tests/qtest/libqos/ahci.c | |
| parent | cbd58e7cc26cef811bd947f48345ec930481e4e2 (diff) | |
| download | focaccia-qemu-58045186fccaf400d3938fad220a99b1b5f3da6d.tar.gz focaccia-qemu-58045186fccaf400d3938fad220a99b1b5f3da6d.zip | |
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>
Diffstat (limited to 'tests/qtest/libqos/ahci.c')
| -rw-r--r-- | tests/qtest/libqos/ahci.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |