mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-30 20:06:56 -05:00
Excludes handling of error condition from the coverage test.
This commit is contained in:
parent
f0cecf55c8
commit
24fd5ab318
17 changed files with 841 additions and 5 deletions
6
elem.c
6
elem.c
|
|
@ -244,8 +244,10 @@ int filter_existence(int filter_missing, const char* dir, const char* sub)
|
|||
/* if the file doesn't exist, we don't filter it out */
|
||||
if (errno == ENOENT)
|
||||
return 0;
|
||||
/* LCOV_EXCL_START */
|
||||
fprintf(stderr, "Error in stat file '%s'. %s.\n", path, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
/* the file is present, so we filter it out */
|
||||
|
|
@ -302,8 +304,10 @@ block_off_t block_file_pos(struct snapraid_block* block)
|
|||
struct snapraid_file* file = block_file_get(block);
|
||||
|
||||
if (block < file->blockvec || block >= file->blockvec + file->blockmax) {
|
||||
/* LCOV_EXCL_START */
|
||||
fprintf(stderr, "Internal inconsistency in block %u ownership\n", block->parity_pos);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
return block - file->blockvec;
|
||||
|
|
@ -599,8 +603,10 @@ int disk_is_empty(struct snapraid_disk* disk, block_off_t blockmax)
|
|||
/* if there is a deleted block, the disk is not empty */
|
||||
return 0;
|
||||
default:
|
||||
/* LCOV_EXCL_START */
|
||||
fprintf(stderr, "Internal inconsistency for used block in disk '%s' without files\n", disk->name);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue