LCOV - differential code coverage report
Current view: top level - src/interfaces/libpq/test - libpq_testclient.c (source / functions) Coverage Total Hit UBC GNC CBC DCB
Current: bed3ffbf9d952be6c7d739d068cdce44c046dfb7 vs 574581b50ac9c63dd9e4abebb731a3b67e5b50f6 Lines: 75.0 % 12 9 3 1 8 1
Current Date: 2026-05-05 10:23:31 +0900 Functions: 100.0 % 2 2 1 1 1
Baseline: lcov-20260505-025707-baseline Branches: 50.0 % 6 3 3 3
Baseline Date: 2026-05-05 10:27:06 +0900 Line coverage date bins:
Legend: Lines:     hit not hit
Branches: + taken - not taken # not executed
(30,360] days: 100.0 % 1 1 1
(360..) days: 72.7 % 11 8 3 8
Function coverage date bins:
(30,360] days: 100.0 % 1 1 1
(360..) days: 100.0 % 1 1 1
Branch coverage date bins:
(360..) days: 50.0 % 6 3 3 3

 Age         Owner                    Branch data    TLA  Line data    Source code
                                  1                 :                : /*
                                  2                 :                :  * libpq_testclient.c
                                  3                 :                :  *      A test program for the libpq public API
                                  4                 :                :  *
                                  5                 :                :  * Copyright (c) 2022-2026, PostgreSQL Global Development Group
                                  6                 :                :  *
                                  7                 :                :  * IDENTIFICATION
                                  8                 :                :  *      src/interfaces/libpq/test/libpq_testclient.c
                                  9                 :                :  */
                                 10                 :                : 
                                 11                 :                : #include "postgres_fe.h"
                                 12                 :                : 
                                 13                 :                : #include "libpq-fe.h"
                                 14                 :                : 
                                 15                 :                : static void
   50 peter@eisentraut.org       16                 :GNC           1 : print_ssl_library(void)
                                 17                 :                : {
 1498 dgustafsson@postgres       18                 :CBC           1 :     const char *lib = PQsslAttribute(NULL, "library");
                                 19                 :                : 
                                 20         [ -  + ]:              1 :     if (!lib)
 1498 dgustafsson@postgres       21                 :UBC           0 :         fprintf(stderr, "SSL is not enabled\n");
                                 22                 :                :     else
 1498 dgustafsson@postgres       23                 :CBC           1 :         printf("%s\n", lib);
                                 24                 :              1 : }
                                 25                 :                : 
                                 26                 :                : int
                                 27                 :              1 : main(int argc, char *argv[])
                                 28                 :                : {
                                 29   [ +  -  +  - ]:              1 :     if ((argc > 1) && !strcmp(argv[1], "--ssl"))
                                 30                 :                :     {
                                 31                 :              1 :         print_ssl_library();
                                 32                 :              1 :         return 0;
                                 33                 :                :     }
                                 34                 :                : 
 1498 dgustafsson@postgres       35                 :UBC           0 :     printf("currently only --ssl is supported\n");
                                 36                 :              0 :     return 1;
                                 37                 :                : }
        

Generated by: LCOV version 2.5.0-beta