fa86229673
Summary: Hello, resending this patch series for the `pkd` tests, originally sent to the mailing list here: * https://www.libssh.org/archive/libssh/2017-07/0000011.html Here are a few improvements and fixups for the `pkd` tests, including a new flag `-m` that can be used to run only certain subsets of the test passes. Jon Simons (5): pkd: rename AES192 cipher suite -> OPENSSHONLY pkd_daemon.c: mark `pkd_ready` field as volatile pkd: fixups for updated CMocka CMUnitTest struct pkd: refactor -t testname lookup-by-name pkd: support -m to match multiple tests tests/pkd/pkd_daemon.c | 2 +- tests/pkd/pkd_daemon.h | 1 + tests/pkd/pkd_hello.c | 84 +++++++++++++++++++++++++++++++++----------------- 3 files changed, 58 insertions(+), 29 deletions(-) -- Test Plan: * I've been using the new `-m` mode locally for a long time to run only certain groups of tests. * The CMocka struct fixes can be seen in the pkd output before and after: after, there are no more extraneous test output strings. * The fix for the `pkd_ready` field can be observed when building the libssh tests with `-Os` on a Debian system (before the fix, pkd would hang, after the fix, it runs as intended). Reviewers: asn Reviewed By: asn Tags: #libssh Differential Revision: https://bugs.libssh.org/D2
42 строки
724 B
C
42 строки
724 B
C
/*
|
|
* pkd_daemon.h -- tests use this interface to start, stop pkd
|
|
* instances and get results
|
|
*
|
|
* (c) 2014 Jon Simons
|
|
*/
|
|
|
|
#ifndef __PKD_DAEMON_H__
|
|
#define __PKD_DAEMON_H__
|
|
|
|
enum pkd_hostkey_type_e {
|
|
PKD_RSA,
|
|
PKD_DSA,
|
|
PKD_ECDSA
|
|
};
|
|
|
|
struct pkd_daemon_args {
|
|
enum pkd_hostkey_type_e type;
|
|
const char *hostkeypath;
|
|
|
|
struct {
|
|
int list;
|
|
|
|
int log_stdout;
|
|
int log_stderr;
|
|
int libssh_log_level;
|
|
|
|
const char *testname;
|
|
const char *testmatch;
|
|
unsigned int iterations;
|
|
} opts;
|
|
};
|
|
|
|
struct pkd_result {
|
|
int ok;
|
|
};
|
|
|
|
int pkd_start(struct pkd_daemon_args *args);
|
|
void pkd_stop(struct pkd_result *out);
|
|
|
|
#endif /* __PKD_DAEMON_H__ */
|