LCOV - code coverage report
Current view: top level - journal - test-audit-type.c (source / functions) Hit Total Coverage
Test: main_coverage.info Lines: 10 10 100.0 %
Date: 2019-08-22 15:41:25 Functions: 3 3 100.0 %

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

Generated by: LCOV version 1.14