forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/tools/testing/selftests/kvm/lib/assert.c
....@@ -1,9 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * tools/testing/selftests/kvm/lib/assert.c
34 *
45 * Copyright (C) 2018, Google LLC.
5
- *
6
- * This work is licensed under the terms of the GNU GPL, version 2.
76 */
87
98 #define _GNU_SOURCE /* for getline(3) and strchrnul(3)*/
....@@ -13,7 +12,7 @@
1312 #include <execinfo.h>
1413 #include <sys/syscall.h>
1514
16
-#include "../../kselftest.h"
15
+#include "kselftest.h"
1716
1817 /* Dumps the current stack trace to stderr. */
1918 static void __attribute__((noinline)) test_dump_stack(void);
....@@ -83,8 +82,10 @@
8382 }
8483 va_end(ap);
8584
86
- if (errno == EACCES)
87
- ksft_exit_skip("Access denied - Exiting.\n");
85
+ if (errno == EACCES) {
86
+ print_skip("Access denied - Exiting");
87
+ exit(KSFT_SKIP);
88
+ }
8889 exit(254);
8990 }
9091