1
1
Граф коммитов

32 Коммитов

Автор SHA1 Сообщение Дата
Richard W.M. Jones
3737e5f0e7 misc: Allow %% to escape a single % in paths.
For example "%d/config%%1" is expanded to "~/.ssh/config%1".

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-07-30 16:23:31 +02:00
Anderson Toshiyuki Sasaki
27caaa000b tests: Prefer assert_non_null() over assert_false()
This also replaces some occurrences of assert_true() with assert_null()

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-01-26 13:56:22 +01:00
Anderson Toshiyuki Sasaki
603b6d7222 tests: Prefer assert_non_null over assert_true
This also replaces some occurrences of assert_true with assert_null.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-01-26 13:56:22 +01:00
Andreas Schneider
206f3ff895 Rest in Peace SSHv1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-06-29 14:41:14 +02:00
Nikos Mavrogiannopoulos
f3a19d8c96 torture_path_expand_tilde_unix: use getpwuid() if no env variables
This allows operating under environments where the username variables
are not present.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-04-17 17:59:14 +02:00
Andreas Schneider
f0ddde4826 Fix config.h includes
We need stdlib.h and string.h in priv.h for free() and memset().

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-10-28 14:31:37 +02:00
Jon Simons
380390c4b6 misc: relax fatal errors in ssh_analyze_banner
Relax the cases where `ssh_analyze_banner` fails to extract a
major and minor version from banners which appear like OpenSSH
banners.

Update the tests to demonstrate that now a banner as might be
sent by `ssh-keyscan(1)` ("SSH-2.0-OpenSSH-keyscan") no longer
returns failure.

Signed-off-by: Jon Simons <jon@jonsimons.org>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-07-18 09:32:31 +02:00
Jon Simons
a89a67e008 misc: fix error-checking in ssh_analyze_banner
Fix error-checking for `strtoul` in `ssh_analyze_banner`, and
enable some tests which demonstrate the fix before-and-after.

Signed-off-by: Jon Simons <jon@jonsimons.org>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-07-13 19:35:34 +02:00
Jon Simons
14d8e940e6 tests: torture-misc: add torture_ssh_analyze_banner
Signed-off-by: Jon Simons <jon@jonsimons.org>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-07-13 19:32:58 +02:00
Jon Simons
effd7ba13c tests: torture-misc: fix 4-space indentation
Signed-off-by: Jon Simons <jon@jonsimons.org>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-07-13 19:32:35 +02:00
Andreas Schneider
82a80b205b tests: Migrate to new cmocka API
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-09-07 10:40:12 +02:00
Aris Adamantiadis
5c46fbc680 tests: torture-misc: check for NULL return codes
Use the LOGNAME environment variable if USER is not set, as it sometimes
happens in cron jobs.
2015-02-12 11:38:21 +01:00
Aris Adamantiadis
d42a1a35b0 tests: allow conditionnal execution on pattern
Option can be used to filter out irrelevant tests
usage: ./torture_pki '*ed25519'

Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 17:34:15 +01:00
Andreas Schneider
ee774479de session: Use a struct for all options. 2012-02-05 11:50:49 +01:00
Aris Adamantiadis
59f7647cd9 Introduced ssh_timeout_elapsed functions
Functions to mesure elapsed time before and after a serie of
calls. Introduces a dependancy to clock_gettime() and librt,
hope this doesn't break anything. Porting to gettimeofday() should
not be too hard.
2011-05-24 23:26:18 +02:00
Andreas Schneider
ca941d6985 tests: Fixed misc and isipaddr test on Windows. 2011-02-13 11:56:47 +01:00
Aris Adamantiadis
a17472ff2b Fix unit tests for opensolaris 2011-01-11 17:55:12 +01:00
Aris Adamantiadis
3f538b3ddd Call ssh_init()/ssh_finalize bf/af each testcase 2011-01-02 17:25:51 +01:00
Andreas Schneider
e795dae8f2 tests: Added a windows test for torture_path_expand_tilde. 2011-01-01 20:53:55 +01:00
Andreas Schneider
13f3679b2f tests: Fixed torture_get_user_home_dir on Windows. 2010-12-29 20:35:55 +01:00
Andreas Schneider
512b776245 tests: Migrated torture_misc to cmockery. 2010-12-28 22:14:47 +01:00
Andreas Schneider
94ce1ea451 tests: Fixed the misc torture test. 2010-06-03 12:29:32 +02:00
Andreas Schneider
560e938038 misc: Move size check down in ssh_path_expand_escape(). 2010-05-31 09:17:54 +02:00
Aris Adamantiadis
f95157297e Factorize all the main functions in unit tests 2010-05-18 22:25:06 +02:00
Andreas Schneider
c7ee14e786 Added a torture test for ssh_path_expand_escape(). 2010-05-11 02:10:55 +02:00
Andreas Schneider
c5c1698cde Added a torture test for ssh_path_expand_tilde(). 2010-05-11 02:10:55 +02:00
Aris Adamantiadis
7886326aa8 Fix u_int_x_t -> uint_x_t 2010-05-08 22:23:05 +02:00
Aris Adamantiadis
31cc03f8e6 added test for ntohll 2010-05-08 22:22:06 +02:00
Aris Adamantiadis
cf7449c525 Added tests for ssh_dirname and ssh_basename 2010-05-08 22:13:35 +02:00
Andreas Schneider
4516e7bdcb Fixed a memory leak in the torture_get_user_home_dir test. 2010-03-13 16:59:26 +01:00
Andreas Schneider
8bcb835aa4 Fixed unit testing. 2010-03-02 23:49:21 +01:00
Andreas Schneider
464176d511 Added unit testing support using check. 2010-03-02 13:54:14 +01:00