|
smtp-client
SMTP Client C Library
|
Test seams for the smtp-client library. More...
#include <assert.h>#include <errno.h>#include <stdarg.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <time.h>#include <unistd.h>#include "test.h"
Include dependency graph for seams.c:Go to the source code of this file.
Functions | |
| int | smtp_test_seam_dec_err_ctr (int *const test_err_ctr) |
| BIO * | smtp_test_seam_bio_new_socket (int sock, int close_flag) |
| int | smtp_test_seam_bio_should_retry (BIO *bio) |
| void * | smtp_test_seam_calloc (size_t nelem, size_t elsize) |
| int | smtp_test_seam_close (int fildes) |
| int | smtp_test_seam_connect (int socket, const struct sockaddr *address, socklen_t address_len) |
| unsigned long | smtp_test_seam_err_peek_error (void) |
| int | smtp_test_seam_fclose (FILE *stream) |
| int | smtp_test_seam_ferror (FILE *stream) |
| struct tm * | smtp_test_seam_gmtime_r (const time_t *timep, struct tm *result) |
| unsigned char * | smtp_test_seam_hmac (const EVP_MD *evp_md, const void *key, int key_len, const unsigned char *d, size_t n, unsigned char *md, unsigned int *md_len) |
| struct tm * | smtp_test_seam_localtime_r (const time_t *timep, struct tm *result) |
| void * | smtp_test_seam_malloc (size_t size) |
| time_t | smtp_test_seam_mktime (struct tm *timeptr) |
| void * | smtp_test_seam_realloc (void *ptr, size_t size) |
| long | smtp_test_seam_recv (int socket, void *buffer, size_t length, int flags) |
| int | smtp_test_seam_select (int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *timeout) |
| ssize_t | smtp_test_seam_send (int socket, const void *buffer, size_t length, int flags) |
| int | smtp_test_seam_socket (int domain, int type, int protocol) |
| int | smtp_test_seam_ssl_connect (SSL *ssl) |
| SSL_CTX * | smtp_test_seam_ssl_ctx_new (const SSL_METHOD *method) |
| int | smtp_test_seam_ssl_do_handshake (SSL *ssl) |
| X509 * | smtp_test_seam_ssl_get_peer_certificate (const SSL *ssl) |
| int | smtp_test_seam_x509_check_host (X509 *cert, const char *name, size_t namelen, unsigned int flags, char **peername) |
| SSL * | smtp_test_seam_ssl_new (SSL_CTX *ctx) |
| int | smtp_test_seam_ssl_read (SSL *ssl, void *buf, int num) |
| int | smtp_test_seam_ssl_write (SSL *ssl, const void *buf, int num) |
| int | smtp_test_seam_sprintf (char *s, const char *format,...) |
| size_t | smtp_test_seam_strlen (const char *s) |
| time_t | smtp_test_seam_time (time_t *tloc) |
Test seams for the smtp-client library.
Used by the smtp-client testing framework to inject specific return values by some standard library functions. This makes it possible to test less common errors like out of memory conditions and input/output errors.
This software has been placed into the public domain using CC0.
Definition in file seams.c.
| BIO* smtp_test_seam_bio_new_socket | ( | int | sock, |
| int | close_flag | ||
| ) |
Allows the test harness to control when BIO_new_socket() fails.
| [in] | sock | Existing socket to attach the BIO to. |
| [in] | close_flag | Close flag for new BIO. |
| BIO* | New BIO created on existing socket. |
| NULL | Failed to create the new BIO. |
Definition at line 263 of file seams.c.
References BIO_new_socket, g_smtp_test_err_bio_new_socket_ctr, and smtp_test_seam_dec_err_ctr().
Here is the call graph for this function:| int smtp_test_seam_bio_should_retry | ( | BIO * | bio | ) |
Allows the test harness to control when BIO_should_retry() fails.
| [in] | bio | Existing BIO connection. |
| 0 | The error condition does not allow a retry. |
| 1 | The error condition allows a retry. |
Definition at line 279 of file seams.c.
References BIO_should_retry, g_smtp_test_err_bio_should_retry_ctr, g_smtp_test_err_bio_should_retry_rc, and smtp_test_seam_dec_err_ctr().
Here is the call graph for this function:| void* smtp_test_seam_calloc | ( | size_t | nelem, |
| size_t | elsize | ||
| ) |
Allows the test harness to control when calloc() fails.
| [in] | nelem | Number of elements to allocate. |
| [in] | elsize | Size of each element to allocate. |
| void* | Pointer to new allocated memory. |
| NULL | Memory allocation failed. |
Definition at line 298 of file seams.c.
References calloc, g_smtp_test_err_calloc_ctr, and smtp_test_seam_dec_err_ctr().
Here is the call graph for this function:| int smtp_test_seam_close | ( | int | fildes | ) |
Allows the test harness to control when close() fails.
| [in] | fildes | Socket file descriptor to close. |
| 0 | Successfully closed file descriptor. |
| -1 | Failed to close file descriptor. |
Definition at line 315 of file seams.c.
References close, g_smtp_test_err_close_ctr, and smtp_test_seam_dec_err_ctr().
Here is the call graph for this function:| int smtp_test_seam_connect | ( | int | socket, |
| const struct sockaddr * | address, | ||
| socklen_t | address_len | ||
| ) |
Allows the test harness to control when connect() fails.
| [in] | socket | Socket connection. |
| [in] | address | Network address of peer. |
| [in] | address_len | Number of bytes in address. |
| 0 | Successfully connected to the peer. |
| -1 | Failed to connect to the peer. |
Definition at line 333 of file seams.c.
References connect, g_smtp_test_err_connect_ctr, and smtp_test_seam_dec_err_ctr().
Here is the call graph for this function:| int smtp_test_seam_dec_err_ctr | ( | int *const | test_err_ctr | ) |
Decrement an error counter until it reaches -1.
Once a counter reaches -1, it will return a successful response (1). This typically gets used to denote when to cause a function to fail. For example, the unit test or functional test might need to cause the realloc() function to fail after calling it the third time.
| [in,out] | test_err_ctr | Integer counter to decrement. |
| 0 | The counter has been decremented, but did not reach -1 yet. |
| 1 | The counter has reached -1. |
Definition at line 244 of file seams.c.
Referenced by smtp_si_add_size_t(), smtp_si_mul_size_t(), smtp_si_sub_size_t(), smtp_test_seam_bio_new_socket(), smtp_test_seam_bio_should_retry(), smtp_test_seam_calloc(), smtp_test_seam_close(), smtp_test_seam_connect(), smtp_test_seam_err_peek_error(), smtp_test_seam_fclose(), smtp_test_seam_ferror(), smtp_test_seam_gmtime_r(), smtp_test_seam_hmac(), smtp_test_seam_localtime_r(), smtp_test_seam_malloc(), smtp_test_seam_mktime(), smtp_test_seam_realloc(), smtp_test_seam_recv(), smtp_test_seam_select(), smtp_test_seam_send(), smtp_test_seam_socket(), smtp_test_seam_sprintf(), smtp_test_seam_ssl_connect(), smtp_test_seam_ssl_ctx_new(), smtp_test_seam_ssl_do_handshake(), smtp_test_seam_ssl_get_peer_certificate(), smtp_test_seam_ssl_new(), smtp_test_seam_ssl_read(), smtp_test_seam_ssl_write(), and smtp_test_seam_x509_check_host().
Here is the caller graph for this function:| unsigned long smtp_test_seam_err_peek_error | ( | void | ) |
Allows the test harness to control when ERR_peek_error() returns a failure code.
| 0 | No error code on the error queue. |
| !0 | An error code exists on the error queue. |
Definition at line 351 of file seams.c.
References ERR_peek_error, g_smtp_test_err_err_peek_error_ctr, and smtp_test_seam_dec_err_ctr().
Here is the call graph for this function:| int smtp_test_seam_fclose | ( | FILE * | stream | ) |
Allows the test harness to control when fclose() fails.
| [in] | stream | File stream to close. |
| 0 | Successfully closed the file stream. |
| EOF | An error occurred while closing the file stream. |
Definition at line 365 of file seams.c.
References fclose, g_smtp_test_err_fclose_ctr, and smtp_test_seam_dec_err_ctr().
Here is the call graph for this function:| int smtp_test_seam_ferror | ( | FILE * | stream | ) |
Allows the test harness to control the file stream error indicator return value in ferror().
| [in] | stream | Check for errors on this file stream. |
| 0 | No errors detected on the file stream. |
| 1 | An error occurred during a file stream operation. |
Definition at line 382 of file seams.c.
References ferror, g_smtp_test_err_ferror_ctr, and smtp_test_seam_dec_err_ctr().
Here is the call graph for this function:| struct tm* smtp_test_seam_gmtime_r | ( | const time_t * | timep, |
| struct tm * | result | ||
| ) |
Allows the test harness to control when gmtime_r() fails.
| [in] | timep | Time value to convert to a struct tm. |
| [out] | result | Converts the timep value into a UTC tm structure value and stores the results in this pointer. |
| tm* | time_t value converted to a tm structure value. |
| NULL | An error occurred while converting the time. |
Definition at line 399 of file seams.c.
References g_smtp_test_err_gmtime_r_ctr, gmtime_r, and smtp_test_seam_dec_err_ctr().
Here is the call graph for this function:| unsigned char* smtp_test_seam_hmac | ( | const EVP_MD * | evp_md, |
| const void * | key, | ||
| int | key_len, | ||
| const unsigned char * | d, | ||
| size_t | n, | ||
| unsigned char * | md, | ||
| unsigned int * | md_len | ||
| ) |
Allows the test harness to control when HMAC() fails.
| [in] | evp_md | Hash function. |
| [in] | key | Hash key. |
| [in] | key_len | Number of bytes in key. |
| [in] | d | Message data. |
| [in] | n | Number of bytes in d. |
| [out] | md | The computed message authentication code. |
| [in] | md_len | Number of bytes in md. |
| uchar* | Pointer to md. |
| NULL | An error occurred. |
Definition at line 421 of file seams.c.
References g_smtp_test_err_hmac_ctr, HMAC, and smtp_test_seam_dec_err_ctr().
Here is the call graph for this function:| struct tm* smtp_test_seam_localtime_r | ( | const time_t * | timep, |
| struct tm * | result | ||
| ) |
Allows the test harness to control when localtime_r() fails.
| [in] | timep | Time value to convert to a struct tm. |
| [out] | result | Converts the timep value into a local time tm structure value and stores the results in this pointer. |
| tm* | time_t value converted to a tm structure value. |
| NULL | An error occurred while converting the time. |
Definition at line 444 of file seams.c.
References g_smtp_test_err_localtime_r_ctr, localtime_r, and smtp_test_seam_dec_err_ctr().
Here is the call graph for this function:| void* smtp_test_seam_malloc | ( | size_t | size | ) |
Allows the test harness to control when malloc() fails.
| [in] | size | Number of bytes to allocate. |
| void* | Pointer to new allocated memory. |
| NULL | Memory allocation failed. |
Definition at line 460 of file seams.c.
References g_smtp_test_err_malloc_ctr, malloc, and smtp_test_seam_dec_err_ctr().
Here is the call graph for this function:| time_t smtp_test_seam_mktime | ( | struct tm * | timeptr | ) |
Allows the test harness to control when mktime() fails.
| [in] | timeptr | tm data structure to convert to time_t. |
| >=0 | Time since the epoch. |
| -1 | Failed to convert the time. |
Definition at line 476 of file seams.c.
References g_smtp_test_err_mktime_ctr, mktime, and smtp_test_seam_dec_err_ctr().
Here is the call graph for this function:| void* smtp_test_seam_realloc | ( | void * | ptr, |
| size_t | size | ||
| ) |
Allows the test harness to control when realloc() fails.
| [in] | ptr | Previously allocated memory or NULL memory has not been allocated yet. |
| [in] | size | Number of bytes to reallocate. |
| void* | Pointer to new allocated memory. |
| NULL | Memory allocation failed. |
Definition at line 493 of file seams.c.
References g_smtp_test_err_realloc_ctr, realloc, and smtp_test_seam_dec_err_ctr().
Here is the call graph for this function:| long smtp_test_seam_recv | ( | int | socket, |
| void * | buffer, | ||
| size_t | length, | ||
| int | flags | ||
| ) |
Allows the test harness to control when recv() fails.
| [in] | socket | TCP network socket. |
| [in] | buffer | Store received data in this buffer. |
| [in] | length | Number of bytes in buffer. |
| [in] | flags | Set this to 0. |
| >=0 | Number of bytes received. |
| -1 | Failed to receive bytes over the network. |
Definition at line 513 of file seams.c.
References g_smtp_test_err_recv_bytes, g_smtp_test_err_recv_ctr, g_smtp_test_err_recv_rc, recv, smtp_test_seam_dec_err_ctr(), and strlen.
Here is the call graph for this function:| int smtp_test_seam_select | ( | int | nfds, |
| fd_set * | readfds, | ||
| fd_set * | writefds, | ||
| fd_set * | errorfds, | ||
| struct timeval * | timeout | ||
| ) |
Allows the test harness to control when select() fails.
| [in] | nfds | Check for file descriptors in range 0 to (nfds - 1) which have any of the read/write/error conditions. |
| [in] | readfds | Checks for file descriptors in fd_set that have bytes ready for reading. |
| [in] | writefds | Checks for file descriptors in fd_set that have bytes ready for writing. |
| [in] | errorfds | Checks for file descriptors in fd_set that have errors pending. |
| [in] | timeout | Wait for the read/write/error conditions in blocking mode until this timeout or an interrupt occurs. |
| >=0 | Number of bits set in the bitmask. |
| -1 | An error occurred. |
Definition at line 552 of file seams.c.
References g_smtp_test_err_select_ctr, select, and smtp_test_seam_dec_err_ctr().
Here is the call graph for this function:| ssize_t smtp_test_seam_send | ( | int | socket, |
| const void * | buffer, | ||
| size_t | length, | ||
| int | flags | ||
| ) |
Allows the test harness to control when send() fails.
| [in] | socket | TCP network socket. |
| [in] | buffer | Data to send over the network. |
| [in] | length | Number of bytes in buffer. |
| [in] | flags | Set this to 0. |
| >=0 | Number of bytes sent. |
| -1 | Failed to send bytes over the network. |
Definition at line 575 of file seams.c.
References g_smtp_test_err_send_ctr, g_smtp_test_send_one_byte, send, and smtp_test_seam_dec_err_ctr().
Here is the call graph for this function:| int smtp_test_seam_socket | ( | int | domain, |
| int | type, | ||
| int | protocol | ||
| ) |
Allows the test harness to control when socket() fails.
| [in] | domain | Socket domain. |
| [in] | type | Socket type. |
| [in] | protocol | Socket protocol. |
| !(-1) | The file descriptor for the new socket. |
| -1 | Failed to create the socket. |
Definition at line 606 of file seams.c.
References g_smtp_test_err_socket_ctr, smtp_test_seam_dec_err_ctr(), and socket.
Here is the call graph for this function:| int smtp_test_seam_sprintf | ( | char * | s, |
| const char * | format, | ||
| ... | |||
| ) |
Allows the test harness to control when sprintf() fails.
| [in] | s | Buffer to store the output contents to. |
| [in] | format | Format string defined in sprintf(). |
| >=0 | Number of bytes copied to s, excluding the null-terminator. |
| <0 | Output or formatting error. |
Definition at line 771 of file seams.c.
References g_smtp_test_err_sprintf_ctr, g_smtp_test_err_sprintf_rc, and smtp_test_seam_dec_err_ctr().
Here is the call graph for this function:| int smtp_test_seam_ssl_connect | ( | SSL * | ssl | ) |
Allows the test harness to control when SSL_connect() fails.
| [in] | ssl | OpenSSL handle. |
| 1 | TLS connection handshake successful. |
| <1 | TLS connection handshake failed. |
Definition at line 624 of file seams.c.
References g_smtp_test_err_ssl_connect_ctr, smtp_test_seam_dec_err_ctr(), and SSL_connect.
Here is the call graph for this function:| SSL_CTX* smtp_test_seam_ssl_ctx_new | ( | const SSL_METHOD * | method | ) |
Allows the test harness to control when SSL_CTX_new() fails.
| [in] | method | TLS connection method. |
| SSL_CTX* | Pointer to new TLS context. |
| NULL | Failed to create new TLS context. |
Definition at line 639 of file seams.c.
References g_smtp_test_err_ssl_ctx_new_ctr, smtp_test_seam_dec_err_ctr(), and SSL_CTX_new.
Here is the call graph for this function:| int smtp_test_seam_ssl_do_handshake | ( | SSL * | ssl | ) |
Allows the test harness to control when SSL_do_handshake() fails.
| [in] | ssl | OpenSSL handle. |
| 1 | TLS handshake successful. |
| <1 | TLS handshake failed. |
Definition at line 654 of file seams.c.
References g_smtp_test_err_ssl_do_handshake_ctr, smtp_test_seam_dec_err_ctr(), and SSL_do_handshake.
Here is the call graph for this function:| X509* smtp_test_seam_ssl_get_peer_certificate | ( | const SSL * | ssl | ) |
Allows the test harness to control when SSL_get_peer_certificate() fails.
| [in] | ssl | OpenSSL handle. |
| X509* | Peer certficate which must get freed by using X509_free(). |
| NULL | Failed to get the peer certificate. |
Definition at line 669 of file seams.c.
References g_smtp_test_err_ssl_get_peer_certificate_ctr, smtp_test_seam_dec_err_ctr(), and SSL_get_peer_certificate.
Here is the call graph for this function:| SSL* smtp_test_seam_ssl_new | ( | SSL_CTX * | ctx | ) |
Allows the test harness to control when SSL_new() fails.
| [in] | ctx | OpenSSL TLS context. |
| SSL* | Pointer to a new TLS context. |
| NULL | Failed to create new TLS context. |
Definition at line 709 of file seams.c.
References g_smtp_test_err_ssl_new_ctr, smtp_test_seam_dec_err_ctr(), and SSL_new.
Here is the call graph for this function:| int smtp_test_seam_ssl_read | ( | SSL * | ssl, |
| void * | buf, | ||
| int | num | ||
| ) |
Allows the test harness to control when SSL_read() fails.
| [in] | ssl | OpenSSL TLS object. |
| [in] | buf | Store received data in this buffer. |
| [in] | num | Number of bytes in buf. |
| >0 | Number of bytes successfully read from the TLS connection. |
| <=0 | Failed to read bytes on the TLS connection. |
Definition at line 726 of file seams.c.
References g_smtp_test_err_recv_bytes, g_smtp_test_err_ssl_read_ctr, smtp_test_seam_dec_err_ctr(), SSL_read, and strlen.
Here is the call graph for this function:| int smtp_test_seam_ssl_write | ( | SSL * | ssl, |
| const void * | buf, | ||
| int | num | ||
| ) |
Allows the test harness to control when SSL_write() fails.
| [in] | ssl | OpenSSL TLS object. |
| [in] | buf | Data to write to the TLS connection. |
| [in] | num | Number of bytes in buf. |
| >0 | Number of bytes successfully written to the TLS connection. |
| <=0 | Failed to write bytes to the TLS connection. |
Definition at line 753 of file seams.c.
References g_smtp_test_err_ssl_write_ctr, smtp_test_seam_dec_err_ctr(), and SSL_write.
Here is the call graph for this function:| size_t smtp_test_seam_strlen | ( | const char * | s | ) |
Allows the test harness to control the return value of strlen().
| [in] | s | Null-terminated string. |
s. Definition at line 793 of file seams.c.
References g_smtp_test_strlen_custom_ret, g_smtp_test_strlen_ret_value, and strlen.
| time_t smtp_test_seam_time | ( | time_t * | tloc | ) |
Allows the test harness to control when time() fails.
| [out] | tloc | Buffer to hold the time_t results. |
| >=0 | Time in seconds since the Epoch. |
| -1 | Failed to store the time in tloc. |
Definition at line 813 of file seams.c.
References g_smtp_test_time_custom_ret, g_smtp_test_time_ret_value, and time.
| int smtp_test_seam_x509_check_host | ( | X509 * | cert, |
| const char * | name, | ||
| size_t | namelen, | ||
| unsigned int | flags, | ||
| char ** | peername | ||
| ) |
Allows the test harness to control when X509_check_host() fails.
| [in] | cert | X509 certificate handle. |
| [in] | name | Server name. |
| [in] | namelen | Number of characters in name or 0 if null-terminated. |
| [in] | flags | Usually set to 0. |
| [in] | peername | Pointer to CN from certificate stored in this buffer if not NULL. |
| 1 | Successful host check. |
| 0 | Failed host check. |
| -1 | Internal error. |
Definition at line 690 of file seams.c.
References g_smtp_test_err_x509_check_host_ctr, smtp_test_seam_dec_err_ctr(), and X509_check_host.
Here is the call graph for this function:| int g_smtp_test_err_bio_new_socket_ctr = -1 |
See g_smtp_test_err_bio_new_socket_ctr and test_seams_countdown_global.
Definition at line 28 of file seams.c.
Referenced by smtp_test_seam_bio_new_socket(), and test_failure_open().
| int g_smtp_test_err_bio_should_retry_ctr = -1 |
See g_smtp_test_err_bio_should_retry_ctr and test_seams_countdown_global.
Definition at line 34 of file seams.c.
Referenced by smtp_test_seam_bio_should_retry(), and test_failure_open().
| int g_smtp_test_err_bio_should_retry_rc = -1 |
See g_smtp_test_err_bio_should_retry_rc.
Definition at line 39 of file seams.c.
Referenced by smtp_test_seam_bio_should_retry(), and test_failure_open().
| int g_smtp_test_err_calloc_ctr = -1 |
See g_smtp_test_err_calloc_ctr and test_seams_countdown_global.
Definition at line 44 of file seams.c.
Referenced by smtp_test_seam_calloc(), smtp_unit_test_all_base64_decode(), smtp_unit_test_all_base64_encode(), smtp_unit_test_all_chunk_split(), smtp_unit_test_all_str_getdelimfd(), test_failure_attachment_add(), test_failure_auth(), and test_failure_open().
| int g_smtp_test_err_close_ctr = -1 |
See g_smtp_test_err_close_ctr and test_seams_countdown_global.
Definition at line 49 of file seams.c.
Referenced by smtp_test_seam_close(), and test_failure_close().
| int g_smtp_test_err_connect_ctr = -1 |
See g_smtp_test_err_connect_ctr and test_seams_countdown_global.
Definition at line 54 of file seams.c.
Referenced by smtp_test_seam_connect(), and test_failure_open().
| int g_smtp_test_err_err_peek_error_ctr = -1 |
See g_smtp_test_err_err_peek_error_ctr and test_seams_countdown_global.
Definition at line 60 of file seams.c.
Referenced by smtp_test_seam_err_peek_error(), and test_failure_open().
| int g_smtp_test_err_fclose_ctr = -1 |
See g_smtp_test_err_fclose_ctr and test_seams_countdown_global.
Definition at line 65 of file seams.c.
Referenced by smtp_test_seam_fclose(), and smtp_unit_test_all_file_get_contents().
| int g_smtp_test_err_ferror_ctr = -1 |
See g_smtp_test_err_ferror_ctr and test_seams_countdown_global.
Definition at line 70 of file seams.c.
Referenced by smtp_test_seam_ferror(), smtp_unit_test_all_file_get_contents(), and test_failure_attachment_add().
| int g_smtp_test_err_gmtime_r_ctr = -1 |
See g_smtp_test_err_gmtime_r_ctr test_seams_countdown_global.
Definition at line 75 of file seams.c.
Referenced by smtp_test_seam_gmtime_r(), and smtp_unit_test_all_date_rfc_2822().
| int g_smtp_test_err_hmac_ctr = -1 |
See g_smtp_test_err_hmac_ctr test_seams_countdown_global.
Definition at line 80 of file seams.c.
Referenced by smtp_test_seam_hmac(), and test_failure_auth().
| int g_smtp_test_err_localtime_r_ctr = -1 |
See g_smtp_test_err_localtime_r_ctr and test_seams_countdown_global.
Definition at line 86 of file seams.c.
Referenced by smtp_test_seam_localtime_r(), smtp_unit_test_all_date_rfc_2822(), and test_failure_mail().
| int g_smtp_test_err_malloc_ctr = -1 |
See g_smtp_test_err_malloc_ctr and test_seams_countdown_global.
Definition at line 91 of file seams.c.
Referenced by smtp_test_seam_malloc(), smtp_unit_test_all_bin2hex(), smtp_unit_test_all_strdup(), test_failure_address_add(), test_failure_attachment_add(), test_failure_auth(), test_failure_header_add(), test_failure_mail(), and test_failure_misc().
| int g_smtp_test_err_mktime_ctr = -1 |
See g_smtp_test_err_mktime_ctr and test_seams_countdown_global.
Definition at line 96 of file seams.c.
Referenced by smtp_test_seam_mktime(), and smtp_unit_test_all_date_rfc_2822().
| int g_smtp_test_err_realloc_ctr = -1 |
See g_smtp_test_err_realloc_ctr and test_seams_countdown_global.
Definition at line 101 of file seams.c.
Referenced by smtp_test_seam_realloc(), smtp_unit_test_all_file_get_contents(), smtp_unit_test_all_fold_whitespace(), smtp_unit_test_all_reallocarray(), smtp_unit_test_all_str_getdelimfd(), smtp_unit_test_all_str_replace(), test_failure_address_add(), test_failure_attachment_add(), test_failure_header_add(), and test_failure_mail().
| char g_smtp_test_err_recv_bytes[90] = {0} |
See g_smtp_test_err_recv_bytes and test_seams_countdown_global.
Definition at line 116 of file seams.c.
Referenced by smtp_test_seam_recv(), smtp_test_seam_ssl_read(), and test_failure_auth().
| int g_smtp_test_err_recv_ctr = -1 |
See g_smtp_test_err_recv_ctr and test_seams_countdown_global.
Definition at line 106 of file seams.c.
Referenced by smtp_test_seam_recv(), test_failure_auth(), test_failure_mail(), and test_failure_open().
| int g_smtp_test_err_recv_rc = -1 |
Definition at line 111 of file seams.c.
Referenced by smtp_test_seam_recv(), and test_failure_open().
| int g_smtp_test_err_select_ctr = -1 |
See g_smtp_test_err_select_ctr and test_seams_countdown_global.
Definition at line 121 of file seams.c.
Referenced by smtp_test_seam_select(), and test_failure_timeout().
| int g_smtp_test_err_send_ctr = -1 |
See g_smtp_test_err_send_ctr and test_seams_countdown_global.
Definition at line 126 of file seams.c.
Referenced by smtp_test_seam_send(), test_failure_auth(), test_failure_close(), test_failure_mail(), and test_failure_open().
| int g_smtp_test_err_si_add_size_t_ctr = -1 |
See g_smtp_test_err_si_add_size_t_ctr and test_seams_countdown_global.
Definition at line 137 of file seams.c.
Referenced by smtp_si_add_size_t(), smtp_unit_test_all_base64_decode(), smtp_unit_test_all_bin2hex(), smtp_unit_test_all_chunk_split(), smtp_unit_test_all_file_get_contents(), smtp_unit_test_all_fold_whitespace(), smtp_unit_test_all_str_getdelimfd(), smtp_unit_test_all_str_replace(), test_failure_address_add(), test_failure_attachment_add(), test_failure_auth(), test_failure_header_add(), and test_failure_mail().
| int g_smtp_test_err_si_mul_size_t_ctr = -1 |
See g_smtp_test_err_si_mul_size_t_ctr and test_seams_countdown_global.
Definition at line 149 of file seams.c.
Referenced by smtp_si_mul_size_t(), and smtp_unit_test_all_chunk_split().
| int g_smtp_test_err_si_sub_size_t_ctr = -1 |
See g_smtp_test_err_si_sub_size_t_ctr and test_seams_countdown_global.
Definition at line 143 of file seams.c.
Referenced by smtp_si_sub_size_t(), and smtp_unit_test_all_str_getdelimfd().
| int g_smtp_test_err_socket_ctr = -1 |
See g_smtp_test_err_socket_ctr and test_seams_countdown_global.
Definition at line 154 of file seams.c.
Referenced by smtp_test_seam_socket(), and test_failure_open().
| int g_smtp_test_err_sprintf_ctr = -1 |
See g_smtp_test_err_sprintf_ctr and test_seams_countdown_global.
Definition at line 204 of file seams.c.
Referenced by smtp_test_seam_sprintf(), smtp_unit_test_all_bin2hex(), and smtp_unit_test_all_date_rfc_2822().
| int g_smtp_test_err_sprintf_rc = 0 |
See g_smtp_test_err_sprintf_rc.
Definition at line 209 of file seams.c.
Referenced by smtp_test_seam_sprintf(), smtp_unit_test_all_bin2hex(), and smtp_unit_test_all_date_rfc_2822().
| int g_smtp_test_err_ssl_connect_ctr = -1 |
See g_smtp_test_err_ssl_connect_ctr and test_seams_countdown_global.
Definition at line 160 of file seams.c.
Referenced by smtp_test_seam_ssl_connect(), and test_failure_open().
| int g_smtp_test_err_ssl_ctx_new_ctr = -1 |
See g_smtp_test_err_ssl_ctx_new_ctr and test_seams_countdown_global.
Definition at line 166 of file seams.c.
Referenced by smtp_test_seam_ssl_ctx_new(), and test_failure_open().
| int g_smtp_test_err_ssl_do_handshake_ctr = -1 |
See g_smtp_test_err_ssl_do_handshake_ctr and test_seams_countdown_global.
Definition at line 172 of file seams.c.
Referenced by smtp_test_seam_ssl_do_handshake(), and test_failure_open().
| int g_smtp_test_err_ssl_get_peer_certificate_ctr = -1 |
See g_smtp_test_err_ssl_get_peer_certificate_ctr and test_seams_countdown_global.
Definition at line 178 of file seams.c.
Referenced by smtp_test_seam_ssl_get_peer_certificate(), and test_failure_open().
| int g_smtp_test_err_ssl_new_ctr = -1 |
See g_smtp_test_err_ssl_new_ctr and test_seams_countdown_global.
Definition at line 189 of file seams.c.
Referenced by smtp_test_seam_ssl_new(), and test_failure_open().
| int g_smtp_test_err_ssl_read_ctr = -1 |
See g_smtp_test_err_ssl_read_ctr and test_seams_countdown_global.
Definition at line 194 of file seams.c.
Referenced by smtp_test_seam_ssl_read(), test_failure_auth(), test_failure_mail(), and test_failure_open().
| int g_smtp_test_err_ssl_write_ctr = -1 |
See g_smtp_test_err_ssl_write_ctr and test_seams_countdown_global.
Definition at line 199 of file seams.c.
Referenced by smtp_test_seam_ssl_write(), test_failure_auth(), test_failure_close(), test_failure_mail(), and test_failure_open().
| int g_smtp_test_err_x509_check_host_ctr = -1 |
See g_smtp_test_err_x509_check_host_ctr and test_seams_countdown_global.
Definition at line 184 of file seams.c.
Referenced by smtp_test_seam_x509_check_host(), and test_failure_open().
| int g_smtp_test_send_one_byte = 0 |
See g_smtp_test_send_one_byte.
Definition at line 131 of file seams.c.
Referenced by smtp_func_test_all_write(), and smtp_test_seam_send().
| int g_smtp_test_strlen_custom_ret = 0 |
See g_smtp_test_strlen_custom_ret.
Definition at line 214 of file seams.c.
Referenced by smtp_test_seam_strlen(), smtp_unit_test_all_base64_encode(), smtp_unit_test_all_str_replace(), smtp_unit_test_all_strdup(), and test_failure_mail().
| size_t g_smtp_test_strlen_ret_value = 0 |
See g_smtp_test_strlen_ret_value.
Definition at line 219 of file seams.c.
Referenced by smtp_test_seam_strlen(), smtp_unit_test_all_base64_encode(), smtp_unit_test_all_str_replace(), smtp_unit_test_all_strdup(), and test_failure_mail().
| int g_smtp_test_time_custom_ret = 0 |
See g_smtp_test_time_custom_ret.
Definition at line 224 of file seams.c.
Referenced by smtp_test_seam_time(), and smtp_unit_test_date_rfc_2822().
| time_t g_smtp_test_time_ret_value = 0 |
See g_smtp_test_time_ret_value.
Definition at line 229 of file seams.c.
Referenced by smtp_test_seam_time(), and smtp_unit_test_date_rfc_2822().