From 1f507913762c03332a06232930ebb1f753992660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Tue, 18 Sep 2012 22:48:48 +0200 Subject: fdc-test: split test_media_change() test, so insert part can be reused MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Hervé Poussineau Signed-off-by: Kevin Wolf --- tests/fdc-test.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests/fdc-test.c') diff --git a/tests/fdc-test.c b/tests/fdc-test.c index fa74411..a4303d1 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. */ -- cgit v1.1