diff options
Diffstat (limited to 'tools/testing/selftests/kvm/lib/kvm_util.c')
| -rw-r--r-- | tools/testing/selftests/kvm/lib/kvm_util.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/testing/selftests/kvm/lib/kvm_util.c b/tools/testing/selftests/kvm/lib/kvm_util.c index 41c7d04d32bd..f3a80057816e 100644 --- a/tools/testing/selftests/kvm/lib/kvm_util.c +++ b/tools/testing/selftests/kvm/lib/kvm_util.c @@ -37,9 +37,10 @@ int __open_path_or_exit(const char *path, int flags, const char *enoent_help) return fd; error: - if (errno == ENOENT) + if (errno == EACCES || errno == ENOENT) ksft_exit_skip("- Cannot open '%s': %s. %s\n", - path, strerror(errno), enoent_help); + path, strerror(errno), + errno == EACCES ? "Root required?" : enoent_help); TEST_FAIL("Failed to open '%s'", path); } |
