Skip to content

Commit

Permalink
bio chain test: make two errors noisy
Browse files Browse the repository at this point in the history
  • Loading branch information
tb committed Dec 9, 2022
1 parent ab735ec commit 8c9d176
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/regress/lib/libcrypto/bio/bio_chain.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: bio_chain.c,v 1.9 2022/12/09 07:47:59 tb Exp $ */
/* $OpenBSD: bio_chain.c,v 1.10 2022/12/09 07:53:06 tb Exp $ */
/*
* Copyright (c) 2022 Theo Buehler <[email protected]>
*
Expand Down Expand Up @@ -201,8 +201,12 @@ walk_forward(BIO *start, BIO *end, size_t expected_len, size_t i, size_t j,
int ret = 0;

if (start == NULL || end == NULL) {
if (expected_len != 0)
if (expected_len != 0) {
fprintf(stderr, "%s case (%zu, %zu) %s: empty chain "
"with expected length %zu > 0\n",
fn, i, j, description, expected_len);
goto err;
}
goto done;
}

Expand Down Expand Up @@ -244,8 +248,12 @@ walk_backward(BIO *start, BIO *end, size_t expected_len, size_t i, size_t j,
int ret = 0;

if (start == NULL || end == NULL) {
if (expected_len != 0)
if (expected_len != 0) {
fprintf(stderr, "%s case (%zu, %zu) %s: empty chain "
"with expected length %zu > 0\n",
fn, i, j, description, expected_len);
goto err;
}
goto done;
}

Expand Down

0 comments on commit 8c9d176

Please sign in to comment.