Skip to contentSkip to conversation

acpi unit-test: Remove temporary disk after test

PATCH Applied Fam Zheng 2 participants 2 messages Dec 26, 2013 – Dec 27, 2013

lore
Share & tools
lore

Fam Zheng

author
#0 lore raw

PATCH 1/1 acpi unit-test: Remove temporary disk after test

---
 tests/acpi-test.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
tests/acpi-test.c +4 -1
index ca83b1d6..df1af83 100644
@@ -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;
 }
Signature · 1 line
1.8.5.1
#1 lore raw

26.12.2013 08:53, Fam Zheng write:

Quoted 2 lines
---
 tests/acpi-test.c | 5 ++++-

Thanks, applied to the trivial-patches queue.

/mjt