LCOV - code coverage report
Current view: top level - test - test-os-util.c (source / functions) Hit Total Coverage
Test: systemd_full.info Lines: 9 9 100.0 %
Date: 2019-08-23 13:36:53 Functions: 2 2 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 3 6 50.0 %

           Branch data     Line data    Source code
       1                 :            : /* SPDX-License-Identifier: LGPL-2.1+ */
       2                 :            : 
       3                 :            : #include <errno.h>
       4                 :            : 
       5                 :            : #include "log.h"
       6                 :            : #include "os-util.h"
       7                 :            : #include "tests.h"
       8                 :            : 
       9                 :          4 : static void test_path_is_os_tree(void) {
      10         [ -  + ]:          4 :         assert_se(path_is_os_tree("/") > 0);
      11         [ -  + ]:          4 :         assert_se(path_is_os_tree("/etc") == 0);
      12         [ -  + ]:          4 :         assert_se(path_is_os_tree("/idontexist") == -ENOENT);
      13                 :          4 : }
      14                 :            : 
      15                 :          4 : int main(int argc, char *argv[]) {
      16                 :          4 :         test_setup_logging(LOG_DEBUG);
      17                 :            : 
      18                 :          4 :         test_path_is_os_tree();
      19                 :            : 
      20                 :          4 :         return 0;
      21                 :            : }

Generated by: LCOV version 1.14