mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
lkl: tests: handler lkl_init failures
Check lkl_init for failures. Print the log buffer in case of failures, to make debugging easier. Signed-off-by: Octavian Purdila <tavip@google.com>
This commit is contained in:
@@ -780,7 +780,10 @@ int main(int argc, const char **argv)
|
||||
|
||||
lkl_host_ops.print = lkl_test_log;
|
||||
|
||||
lkl_init(&lkl_host_ops);
|
||||
if (lkl_init(&lkl_host_ops) < 0) {
|
||||
printf("%s\n", lkl_test_get_log());
|
||||
return 1;
|
||||
}
|
||||
|
||||
ret = lkl_test_run(tests, sizeof(tests)/sizeof(struct lkl_test),
|
||||
"boot");
|
||||
|
||||
@@ -109,7 +109,10 @@ int main(int argc, const char **argv)
|
||||
|
||||
lkl_host_ops.print = lkl_test_log;
|
||||
|
||||
lkl_init(&lkl_host_ops);
|
||||
if (lkl_init(&lkl_host_ops) < 0) {
|
||||
printf("%s\n", lkl_test_get_log());
|
||||
return 1;
|
||||
}
|
||||
|
||||
ret = lkl_test_run(tests, sizeof(tests) / sizeof(struct lkl_test),
|
||||
"disk-vfio-pci %s", cla.fstype);
|
||||
|
||||
@@ -189,7 +189,10 @@ int main(int argc, const char **argv)
|
||||
|
||||
lkl_host_ops.print = lkl_test_log;
|
||||
|
||||
lkl_init(&lkl_host_ops);
|
||||
if (lkl_init(&lkl_host_ops) < 0) {
|
||||
printf("%s\n", lkl_test_get_log());
|
||||
return 1;
|
||||
}
|
||||
|
||||
ret = lkl_test_run(tests, sizeof(tests)/sizeof(struct lkl_test),
|
||||
"disk %s", cla.fstype);
|
||||
|
||||
Reference in New Issue
Block a user