LCOV - code coverage report
Current view: top level - fuzz - fuzz-nspawn-oci.c (source / functions) Hit Total Coverage
Test: systemd_full.info Lines: 0 11 0.0 %
Date: 2019-08-23 13:36:53 Functions: 0 1 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 6 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* SPDX-License-Identifier: LGPL-2.1+ */
       2                 :            : 
       3                 :            : #include "alloc-util.h"
       4                 :            : #include "fd-util.h"
       5                 :            : #include "fileio.h"
       6                 :            : #include "fuzz.h"
       7                 :            : #include "nspawn-oci.h"
       8                 :            : 
       9                 :          0 : int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
      10                 :          0 :         _cleanup_fclose_ FILE *f = NULL;
      11                 :          0 :         _cleanup_(settings_freep) Settings *s = NULL;
      12                 :            : 
      13         [ #  # ]:          0 :         if (size == 0)
      14                 :          0 :                 return 0;
      15                 :            : 
      16                 :          0 :         f = fmemopen_unlocked((char*) data, size, "re");
      17         [ #  # ]:          0 :         assert_se(f);
      18                 :            : 
      19                 :            :         /* We don't want to fill the logs with messages about parse errors.
      20                 :            :          * Disable most logging if not running standalone */
      21         [ #  # ]:          0 :         if (!getenv("SYSTEMD_LOG_LEVEL"))
      22                 :          0 :                 log_set_max_level(LOG_CRIT);
      23                 :            : 
      24                 :          0 :         (void) oci_load(f, "/dev/null", &s);
      25                 :            : 
      26                 :          0 :         return 0;
      27                 :            : }

Generated by: LCOV version 1.14