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
Anderson Toshiyuki Sasaki
79e907402e
tests: Replace ssh_buffer_free() with SSH_BUFFER_FREE()
...
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-27 15:21:30 +02:00
Anderson Toshiyuki Sasaki
ca7da823c3
tests: Replace ssh_string_free() with SSH_STRING_FREE()
...
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-27 15:21:30 +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
Andreas Schneider
3f9ce10525
tests: Fix buffer test without NARG macro support
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-05-09 15:45:45 +02:00
Fabiano Fidêncio
05fd0acf45
buffer: do not use ssh_buffer_get_rest_len()
...
As ssh_buffer_get_len() actually calls ssh_buffer_get_rest_len(), let's
just use the first one. This is a preparatory step for removing
ssh_buffer_get_rest_len().
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19 11:31:08 +01:00
Fabiano Fidêncio
954341dd1f
buffer: rename ssh_buffer_get_rest() to ssh_buffer_get()
...
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19 11:31:07 +01:00
Fabiano Fidêncio
adc8c20ac1
cleanup: use ssh_ prefix in the buffer (non-static) functions
...
Having "ssh_" prefix in the functions' name will avoid possible clashes
when compiling libssh statically.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19 11:31:07 +01: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
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
Aris Adamantiadis
86ae6b2251
buffer: Add a secure buffer mechanism to avoid memory spills
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-09-07 10:36:32 +02:00
Aris Adamantiadis
2cb2587b55
buffer: Implement "t" for text in ssh_buffer_pack().
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-09-07 10:27:35 +02:00
Andreas Schneider
6961dd79ad
tests: Fix memory leak in buffer test.
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
2014-08-15 12:29:13 +02:00
Aris Adamantiadis
664b94d1c5
tests: test the canary feature in buffer_(un)pack()
...
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-06 10:00:07 +02:00
Aris Adamantiadis
1d97f75b0a
tests: test for ssh_buffer_(un)pack
...
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-06 09:20:45 +02:00
Andreas Schneider
cb9786b3ae
src: Rename buffer_add_data() to ssh_buffer_add_data().
2014-01-19 20:55:55 +01:00
Andreas Schneider
2fe59071b2
src: Do not use deprecated functions.
2014-01-16 15:27:46 +01:00
Andreas Schneider
485e3b4014
tests: Check return values of buffer functions.
2013-06-18 17:10:00 +02:00
Andreas Schneider
d255d1bf32
tests: Use memory assert functions.
2013-06-17 11:44:28 +02:00
Andreas Schneider
01493b8d47
tests: Don't leak memory.
2013-06-13 15:42:13 +02:00
Aris Adamantiadis
cd4e28e7c8
test: Try to fetch wrong values in buffer.
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2012-11-27 19:10:41 +01:00
Aris Adamantiadis
3f538b3ddd
Call ssh_init()/ssh_finalize bf/af each testcase
2011-01-02 17:25:51 +01:00
Andreas Schneider
6f65e6ae67
tests: Migrate torture_buffer to cmockery.
2010-12-28 22:14:47 +01:00
Aris Adamantiadis
9a89fba332
resolve memory consumption bug
2010-10-03 13:31:02 +02:00
Aris Adamantiadis
0bc032726d
Fix prepend bug
2010-10-03 13:01:21 +02:00
Aris Adamantiadis
b2f571e544
test the buffer_prepend_data function
2010-10-03 12:25:33 +02:00
Aris Adamantiadis
5687d6e79a
Added buffer test case
2010-10-03 12:06:47 +02:00