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>
This commit is contained in:
parent
34abf9a7d8
commit
1f50791376
|
@ -217,7 +217,7 @@ static void test_read_without_media(void)
|
||||||
g_assert(ret == 0);
|
g_assert(ret == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_media_change(void)
|
static void test_media_insert(void)
|
||||||
{
|
{
|
||||||
uint8_t dir;
|
uint8_t dir;
|
||||||
|
|
||||||
|
@ -245,6 +245,13 @@ static void test_media_change(void)
|
||||||
assert_bit_clear(dir, DSKCHG);
|
assert_bit_clear(dir, DSKCHG);
|
||||||
dir = inb(FLOPPY_BASE + reg_dir);
|
dir = inb(FLOPPY_BASE + reg_dir);
|
||||||
assert_bit_clear(dir, DSKCHG);
|
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
|
/* Eject the floppy and check that DSKCHG is set. Reading it out doesn't
|
||||||
* reset the bit. */
|
* reset the bit. */
|
||||||
|
|
Loading…
Reference in a new issue