GCC Code Coverage Report


Directory: cvmfs/
File: cvmfs/ingestion/task_hash.cc
Date: 2026-09-27 02:40:09
Exec Total Coverage
Lines: 12 14 85.7%
Branches: 3 5 60.0%

Line Branch Exec Source
1 /**
2 * This file is part of the CernVM File System.
3 */
4
5
6 #include "task_hash.h"
7
8 #include <cstdlib>
9
10 #include "crypto/hash.h"
11 #include "util/exception.h"
12
13
14 16546810 void TaskHash::Process(BlockItem *input_block) {
15 16546810 ChunkItem *chunk = input_block->chunk_item();
16
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 16545562 times.
16545562 assert(chunk != NULL);
17
18
2/3
✓ Branch 1 taken 10036426 times.
✓ Branch 2 taken 6511866 times.
✗ Branch 3 not taken.
16545562 switch (input_block->type()) {
19 10036426 case BlockItem::kBlockData:
20 10036426 shash::Update(input_block->data(), input_block->size(),
21 chunk->hash_ctx());
22 10038974 break;
23 6511866 case BlockItem::kBlockStop:
24 6511866 shash::Final(chunk->hash_ctx(), chunk->hash_ptr());
25 6511788 break;
26 ✗ default:
27 ✗ PANIC(NULL);
28 }
29
30 16550762 tubes_out_->Dispatch(input_block);
31 16549202 }
32