Victor Kaplansky | 4e08256 | 2016-02-14 18:59:27 +0200 | [diff] [blame] | 1 | /* |
| 2 | * QEMU boot sector testing helpers. |
| 3 | * |
| 4 | * Copyright (c) 2016 Red Hat Inc. |
| 5 | * |
| 6 | * Authors: |
| 7 | * Michael S. Tsirkin <mst@redhat.com> |
Eric Blake | 8b19f2b | 2017-09-11 12:20:07 -0500 | [diff] [blame] | 8 | * Victor Kaplansky <victork@redhat.com> |
Victor Kaplansky | 4e08256 | 2016-02-14 18:59:27 +0200 | [diff] [blame] | 9 | * |
| 10 | * This work is licensed under the terms of the GNU GPL, version 2 or later. |
| 11 | * See the COPYING file in the top-level directory. |
| 12 | */ |
| 13 | |
Markus Armbruster | 2a6a407 | 2016-06-29 13:47:03 +0200 | [diff] [blame] | 14 | #ifndef TEST_BOOT_SECTOR_H |
| 15 | #define TEST_BOOT_SECTOR_H |
Victor Kaplansky | 4e08256 | 2016-02-14 18:59:27 +0200 | [diff] [blame] | 16 | |
Eric Blake | 8b19f2b | 2017-09-11 12:20:07 -0500 | [diff] [blame] | 17 | #include "libqtest.h" |
| 18 | |
Thomas Huth | 3e35377 | 2016-10-11 17:19:36 +0200 | [diff] [blame] | 19 | /* Create boot disk file. fname must be a suitable string for mkstemp() */ |
| 20 | int boot_sector_init(char *fname); |
Victor Kaplansky | 4e08256 | 2016-02-14 18:59:27 +0200 | [diff] [blame] | 21 | |
| 22 | /* Loop until signature in memory is OK. */ |
Eric Blake | 8b19f2b | 2017-09-11 12:20:07 -0500 | [diff] [blame] | 23 | void boot_sector_test(QTestState *qts); |
Victor Kaplansky | 4e08256 | 2016-02-14 18:59:27 +0200 | [diff] [blame] | 24 | |
| 25 | /* unlink boot disk file. */ |
| 26 | void boot_sector_cleanup(const char *fname); |
| 27 | |
Markus Armbruster | 2a6a407 | 2016-06-29 13:47:03 +0200 | [diff] [blame] | 28 | #endif /* TEST_BOOT_SECTOR_H */ |