mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
tests/external_override: Add override test for internal implementations
This adds a test to check if the internal implementation is not used when it is not supposed to be used. To be able to override functions using LD_PRELOAD, a shared version of the torture library was added, as well as a shared library for each of the algorithms implemented internally (ChaCha20, Poly1305, curve25519, and ed25519). Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
@@ -144,7 +144,11 @@ void torture_setup_libssh_server(void **state, const char *server_path);
|
||||
/*
|
||||
* This function must be defined in every unit test file.
|
||||
*/
|
||||
#if ((defined _WIN32) || (defined _WIN64)) && (defined USE_ATTRIBUTE_WEAK)
|
||||
__attribute__((weak)) int torture_run_tests(void);
|
||||
#else
|
||||
int torture_run_tests(void);
|
||||
#endif
|
||||
|
||||
char *torture_make_temp_dir(const char *template);
|
||||
char *torture_create_temp_file(const char *template);
|
||||
|
||||
Reference in New Issue
Block a user