aboutsummaryrefslogtreecommitdiffstats
path: root/test.c
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-05-03 23:05:20 +0200
committerMattias Andrée <m@maandree.se>2026-05-03 23:05:20 +0200
commit027fc4547c7a18b20972809964029621d4bdbe3b (patch)
treeeb4eebf229ce3d209095386c950fa16384330d41 /test.c
parentEnsure HWCAP_SHA1-check does not modify errno (diff)
downloadlibsha1-77cb578e8ab14d101b623706bd77e273633e2551.tar.gz
libsha1-77cb578e8ab14d101b623706bd77e273633e2551.tar.bz2
libsha1-77cb578e8ab14d101b623706bd77e273633e2551.tar.xz
test.c: let libsha1_sum_fd (malloc) modify errno1.1.5
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'test.c')
-rw-r--r--test.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/test.c b/test.c
index 862f14f..7db60e6 100644
--- a/test.c
+++ b/test.c
@@ -209,7 +209,9 @@ main(int argc, char *argv[])
exit(0);
}
close(fds[1]);
+ test(!errno);
test(!libsha1_sum_fd(fds[0], LIBSHA1_1, buf));
+ errno = 0; /* malloc(3) as been found to set errno=ENOENT on success */
test(waitpid(pid, &status, 0) == pid);
test(!status);
close(fds[0]);