| 1 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 |
|
| 3 |
#include <linux/audit.h> |
| 4 |
#include <stdio.h> |
| 5 |
|
| 6 |
#include "audit-type.h" |
| 7 |
#include "tests.h" |
| 8 |
|
| 9 |
static void print_audit_label(int i) { |
| 10 |
const char *name; |
| 11 |
|
| 12 |
name = audit_type_name_alloca(i); |
| 13 |
/* This is a separate function only because of alloca */ |
| 14 |
printf("%i → %s → %s\n", i, audit_type_to_string(i), name); |
| 15 |
} |
| 16 |
|
| 17 |
TEST(audit_type) { |
| 18 |
int i; |
| 19 |
|
| 20 |
for (i = 0; i <= AUDIT_KERNEL; i++) |
| 21 |
print_audit_label(i); |
| 22 |
} |
| 23 |
|
| 24 |
DEFINE_TEST_MAIN(LOG_INFO); |