tests: allow empty expected files

An empty expected file is a handy way to seed the files
without creating merge conflicts.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Michael S. Tsirkin 2019-10-05 17:09:17 -04:00
parent 6c35ed68c6
commit 4eb74c4f43
1 changed files with 4 additions and 1 deletions

View File

@ -334,7 +334,10 @@ try_again:
g_assert(ret);
g_assert_no_error(error);
g_assert(exp_sdt.aml);
g_assert(exp_sdt.aml_len);
if (!exp_sdt.aml_len) {
fprintf(stderr, "Warning! zero length expected file '%s'\n",
aml_file);
}
g_array_append_val(exp_tables, exp_sdt);
}