summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2013-12-26 12:53:39 +0800
committerMichael Tokarev <mjt@tls.msk.ru>2014-01-01 18:03:55 +0400
commit5862ad0f55fa54f3ed05774b538a7e862a10941f (patch)
tree2bdd051777792c58cbf8d0da1d34d92fc0beb9ce /tests
parent7dbc1158bc63fdbad849d21409eeeb53f5230445 (diff)
downloadqemu-5862ad0f55fa54f3ed05774b538a7e862a10941f.zip
acpi unit-test: Remove temporary disk after test
Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'tests')
-rw-r--r--tests/acpi-test.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/acpi-test.c b/tests/acpi-test.c
index ca83b1d6b6..df1af83158 100644
--- a/tests/acpi-test.c
+++ b/tests/acpi-test.c
@@ -382,6 +382,7 @@ int main(int argc, char *argv[])
{
const char *arch = qtest_get_arch();
FILE *f = fopen(disk, "w");
+ int ret;
fwrite(boot_sector, 1, sizeof boot_sector, f);
fclose(f);
@@ -390,5 +391,7 @@ int main(int argc, char *argv[])
if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
qtest_add_func("acpi/tcg", test_acpi_tcg);
}
- return g_test_run();
+ ret = g_test_run();
+ unlink(disk);
+ return ret;
}