tests/qtest/ide-test: add a multi-sector ATAPI DMA read test
test_cdrom_pio_large() already exercises a multi-sector PIO read. Add the DMA counterpart through the same cdrom_read_impl() helper so the multi-block ATAPI DMA read path gets equivalent coverage. Signed-off-by: Denis V. Lunev <den@openvz.org>
Denis V. Lunev committed
Jun 19, 2026 at 02:28 UTC
fe543c2d787a611f1efa34107818a8eee90bb5dc
1 file changed
+6
tests/qtest/ide-test.c
+6
@@ -1158,6 +1158,11 @@ static void test_cdrom_dma(void)
1158
cdrom_read_impl(1, CDROM_DMA);
1159
}
1160
1161
+static void test_cdrom_dma_large(void)
1162
+{
1163
+ cdrom_read_impl(BYTE_COUNT_LIMIT * 4 / ATAPI_BLOCK_SIZE, CDROM_DMA);
1164
+}
1165
+
1166
int main(int argc, char **argv)
1167
{
1168
const char *base;
@@ -1217,6 +1222,7 @@ int main(int argc, char **argv)
1222
qtest_add_func("/ide/cdrom/pio", test_cdrom_pio);
1223
qtest_add_func("/ide/cdrom/pio_large", test_cdrom_pio_large);
1224
qtest_add_func("/ide/cdrom/dma", test_cdrom_dma);
1225
+ qtest_add_func("/ide/cdrom/dma_large", test_cdrom_dma_large);
1226
1227
ret = g_test_run();
1228