aboutsummaryrefslogtreecommitdiff
path: root/tests/hd-geo-test.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2012-07-10 11:12:49 +0200
committerKevin Wolf <kwolf@redhat.com>2012-07-17 16:48:31 +0200
commit856dcba23ad2aeea4d98d5d3c97cd46aac0cd073 (patch)
tree4e2829f75441fc46f865af0fa6f529b724006bf5 /tests/hd-geo-test.c
parent6e6f61a66aa45a15c9f411ad000a8d3d57272f8a (diff)
qtest: Cover qdev property for BIOS CHS translation
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/hd-geo-test.c')
-rw-r--r--tests/hd-geo-test.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/hd-geo-test.c b/tests/hd-geo-test.c
index a47b94507f..5d9d2e4c6d 100644
--- a/tests/hd-geo-test.c
+++ b/tests/hd-geo-test.c
@@ -321,15 +321,16 @@ static void test_ide_drive_user(const char *dev, bool trans)
const CHST expected_chst = { secs / (4 * 32) , 4, 32, trans };
argc = setup_common(argv, ARRAY_SIZE(argv));
- opts = g_strdup_printf("%s,cyls=%d,heads=%d,secs=%d%s",
- dev && !trans ? dev : "",
+ opts = g_strdup_printf("%s,%s%scyls=%d,heads=%d,secs=%d",
+ dev ?: "",
+ trans && dev ? "bios-chs-" : "",
+ trans ? "trans=lba," : "",
expected_chst.cyls, expected_chst.heads,
- expected_chst.secs,
- trans ? ",trans=lba" : "");
+ expected_chst.secs);
cur_ide[0] = &expected_chst;
argc = setup_ide(argc, argv, ARRAY_SIZE(argv),
- 0, dev && !trans ? opts : NULL, backend_small, mbr_chs,
- dev && !trans ? "" : opts);
+ 0, dev ? opts : NULL, backend_small, mbr_chs,
+ dev ? "" : opts);
g_free(opts);
qtest_start(g_strjoinv(" ", argv));
test_cmos();