diff options
author | Mattias Andrée <maandree@kth.se> | 2022-02-21 23:00:24 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2022-02-21 23:00:24 +0100 |
commit | d127dd5cab51a869d6f6bb6c2a0860c458d3fecd (patch) | |
tree | 87d05afe908afa23afb3ede93ae2c1ec10672194 /test.c | |
parent | Add tests (diff) | |
download | blakesum-d127dd5cab51a869d6f6bb6c2a0860c458d3fecd.tar.gz blakesum-d127dd5cab51a869d6f6bb6c2a0860c458d3fecd.tar.bz2 blakesum-d127dd5cab51a869d6f6bb6c2a0860c458d3fecd.tar.xz |
Add coverage test
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'test.c')
-rw-r--r-- | test.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -235,20 +235,22 @@ hashx(unsigned char **msg, size_t msglen, size_t *msgsize, ERROR("Internal test error: %s\n", strerror(errno)); /* $covered$ */ if (!pid) { + /* $covered{$ */ close(input_pipe[1]); close(output_pipe[0]); if (input_pipe[0] != STDIN_FILENO) { if (dup2(input_pipe[0], STDIN_FILENO) != STDIN_FILENO) - ERROR("Internal test error: %s\n", strerror(errno)); /* $covered$ */ + ERROR("Internal test error: %s\n", strerror(errno)); close(input_pipe[0]); } if (output_pipe[1] != STDOUT_FILENO) { if (dup2(output_pipe[1], STDOUT_FILENO) != STDOUT_FILENO) - ERROR("Internal test error: %s\n", strerror(errno)); /* $covered$ */ + ERROR("Internal test error: %s\n", strerror(errno)); close(output_pipe[1]); } execv(argv[0], (void *const)argv); - ERROR("Internal test error: %s\n", strerror(errno)); /* $covered$ */ + ERROR("Internal test error: %s\n", strerror(errno)); + /* $covered}$ */ } else { close(input_pipe[0]); |