diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2019-06-28 14:59:19 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2019-06-28 14:59:24 +0200 |
commit | d4414495113cfd1780589d6fd2ae90bd08fe3835 (patch) | |
tree | 0f139867ec53dc600b3b53221e55219f9b57f59c | |
parent | 91ac4d74130cb51b8de5f67f420a4810c9b1044b (diff) | |
download | gnutls-tmp-fix-gnutls_x509_crt_list_import2.tar.gz |
tests: gnutls_x509_crt_list_import: verify that return code is as documentedtmp-fix-gnutls_x509_crt_list_import2
That checks whether the return code of gnutls_x509_crt_list_import()
contains the number of loaded certificates.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r-- | tests/gnutls_x509_crt_list_import.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/gnutls_x509_crt_list_import.c b/tests/gnutls_x509_crt_list_import.c index a8cad7fbf2..51fdfcb9f4 100644 --- a/tests/gnutls_x509_crt_list_import.c +++ b/tests/gnutls_x509_crt_list_import.c @@ -80,6 +80,9 @@ static void load_list(const char *name, const gnutls_datum_t *txt, if (max != ncerts) testfail("imported number (%d) doesn't match expected (%d)\n", max, ncerts); + if (ret != (int)ncerts) + testfail("imported number (%d) doesn't match return value (%d)\n", ncerts, ret); + return; } |