diff options
author | Hervé Poussineau <hpoussin@reactos.org> | 2012-09-18 22:48:48 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-11-14 18:19:22 +0100 |
commit | 1f507913762c03332a06232930ebb1f753992660 (patch) | |
tree | a7dd918680c7d2dfc95d3457a273aae09f5cb5bc /tests | |
parent | 34abf9a7d82cd959622996733884469a33f7e2e0 (diff) | |
download | qemu-1f507913762c03332a06232930ebb1f753992660.tar.gz qemu-1f507913762c03332a06232930ebb1f753992660.tar.bz2 qemu-1f507913762c03332a06232930ebb1f753992660.zip |
fdc-test: split test_media_change() test, so insert part can be reused
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fdc-test.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/fdc-test.c b/tests/fdc-test.c index fa7441110d..a4303d19d8 100644 --- a/tests/fdc-test.c +++ b/tests/fdc-test.c @@ -217,7 +217,7 @@ static void test_read_without_media(void) g_assert(ret == 0); } -static void test_media_change(void) +static void test_media_insert(void) { uint8_t dir; @@ -245,6 +245,13 @@ static void test_media_change(void) assert_bit_clear(dir, DSKCHG); dir = inb(FLOPPY_BASE + reg_dir); assert_bit_clear(dir, DSKCHG); +} + +static void test_media_change(void) +{ + uint8_t dir; + + test_media_insert(); /* Eject the floppy and check that DSKCHG is set. Reading it out doesn't * reset the bit. */ |