Table of Contents
Code Coverage
pgBackRest aims to have complete function/branch/line coverage for the core C code in /src.
Function/line coverage is complete with no exceptions.
Branch coverage excludes branches inside macros and assert() calls. Macros have their own unit tests so they do not need to be tested everywhere they appear. Asserts are not expected to have complete branch coverage since they test cases that should always be true.
Directory Functions Branches Lines
build/common 23/23 (100.0%) 56/56 (100.0%) 211/211 (100.0%)
build/config 35/35 (100.0%) 468/468 (100.0%) 977/977 (100.0%)
build/error 6/6 (100.0%) 26/26 (100.0%) 78/78 (100.0%)
build/help 13/13 (100.0%) 134/134 (100.0%) 262/262 (100.0%)
build/postgres 8/8 (100.0%) 60/60 (100.0%) 151/151 (100.0%)
command 15/15 (100.0%) 94/94 (100.0%) 192/192 (100.0%)
command/annotate 1/1 (100.0%) 12/12 (100.0%) 31/31 (100.0%)
command/archive 15/15 (100.0%) 104/104 (100.0%) 204/204 (100.0%)
command/archive/get 9/9 (100.0%) 200/200 (100.0%) 434/434 (100.0%)
command/archive/push 12/12 (100.0%) 130/130 (100.0%) 350/350 (100.0%)
command/backup 50/50 (100.0%) 796/796 (100.0%) 1660/1660 (100.0%)
command/check 13/13 (100.0%) 106/106 (100.0%) 217/217 (100.0%)
command/control 4/4 (100.0%) 34/34 (100.0%) 51/51 (100.0%)
command/expire 10/10 (100.0%) 240/240 (100.0%) 362/362 (100.0%)
command/help 7/7 (100.0%) 164/164 (100.0%) 261/261 (100.0%)
command/info 13/13 (100.0%) 366/366 (100.0%) 669/669 (100.0%)
command/local 1/1 (100.0%) --- 5/5 (100.0%)
command/remote 1/1 (100.0%) 6/6 (100.0%) 19/19 (100.0%)
command/repo 9/9 (100.0%) 110/110 (100.0%) 210/210 (100.0%)
command/restore 33/33 (100.0%) 684/684 (100.0%) 1258/1258 (100.0%)
command/server 6/6 (100.0%) 24/24 (100.0%) 81/81 (100.0%)
command/stanza 5/5 (100.0%) 106/106 (100.0%) 128/128 (100.0%)
command/verify 21/21 (100.0%) 314/314 (100.0%) 660/660 (100.0%)
common 144/144 (100.0%) 614/614 (100.0%) 1331/1331 (100.0%)
common/compress 13/13 (100.0%) 24/24 (100.0%) 75/75 (100.0%)
common/compress/bz2 13/13 (100.0%) 20/20 (100.0%) 133/133 (100.0%)
common/compress/gz 13/13 (100.0%) 26/26 (100.0%) 135/135 (100.0%)
common/compress/lz4 15/15 (100.0%) 24/24 (100.0%) 127/127 (100.0%)
common/compress/zst 13/13 (100.0%) 12/12 (100.0%) 106/106 (100.0%)
common/crypto 32/32 (100.0%) 88/88 (100.0%) 432/432 (100.0%)
common/error 33/33 (100.0%) 62/62 (100.0%) 178/178 (100.0%)
common/io 59/59 (100.0%) 174/174 (100.0%) 512/512 (100.0%)
common/io/filter 31/31 (100.0%) 92/92 (100.0%) 282/282 (100.0%)
common/io/http 57/57 (100.0%) 274/274 (100.0%) 673/673 (100.0%)
common/io/socket 28/28 (100.0%) 110/110 (100.0%) 343/343 (100.0%)
common/io/tls 36/36 (100.0%) 114/114 (100.0%) 399/399 (100.0%)
common/type 327/327 (100.0%) 898/898 (100.0%) 3032/3032 (100.0%)
config 93/93 (100.0%) 1000/1000 (100.0%) 1626/1626 (100.0%)
db 23/23 (100.0%) 118/118 (100.0%) 322/322 (100.0%)
info 92/92 (100.0%) 938/938 (100.0%) 2043/2043 (100.0%)
postgres 36/36 (100.0%) 130/130 (100.0%) 335/335 (100.0%)
postgres/interface 5/5 (100.0%) 12/12 (100.0%) 40/40 (100.0%)
protocol 62/62 (100.0%) 264/264 (100.0%) 891/891 (100.0%)
storage 56/56 (100.0%) 250/250 (100.0%) 628/628 (100.0%)
storage/azure 25/25 (100.0%) 138/138 (100.0%) 399/399 (100.0%)
storage/cifs 2/2 (100.0%) --- 6/6 (100.0%)
storage/gcs 34/34 (100.0%) 176/176 (100.0%) 578/578 (100.0%)
storage/posix 28/28 (100.0%) 167/168 (99.40%) 334/334 (100.0%)
storage/remote 38/38 (100.0%) 128/128 (100.0%) 581/581 (100.0%)
storage/s3 29/29 (100.0%) 184/184 (100.0%) 586/586 (100.0%)
storage/sftp 32/32 (100.0%) 404/404 (100.0%) 722/722 (100.0%)
TOTAL 1679/1679 (100.0%) 10675/10676 (99.99%) 25320/25320 (100.0%)
The C unit test modules in /test/src/module also have complete function/line coverage but are not included in the report.