aboutsummaryrefslogtreecommitdiff
path: root/tests/unittests/torture_keyfiles.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cynapses.org>2011-01-06 10:00:57 +0100
committerAndreas Schneider <asn@cynapses.org>2011-01-06 10:15:01 +0100
commit7d9f88991159400d759e71190b1ebf48208d2ff8 (patch)
tree8c51fd1a5b721f58d5aabcaf3ca8d29674f81113 /tests/unittests/torture_keyfiles.c
parent13ece2a2f81dfa1bddffbbe40001e8470060e455 (diff)
downloadlibssh-7d9f88991159400d759e71190b1ebf48208d2ff8.tar.gz
libssh-7d9f88991159400d759e71190b1ebf48208d2ff8.tar.xz
libssh-7d9f88991159400d759e71190b1ebf48208d2ff8.zip
tests: Added missing asserts in torture_keyfiles.
Found by clang-analyzer http://test.libssh.org/clang-analyzer/
Diffstat (limited to 'tests/unittests/torture_keyfiles.c')
-rw-r--r--tests/unittests/torture_keyfiles.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/unittests/torture_keyfiles.c b/tests/unittests/torture_keyfiles.c
index 6e801c35..391053ce 100644
--- a/tests/unittests/torture_keyfiles.c
+++ b/tests/unittests/torture_keyfiles.c
@@ -15,6 +15,7 @@ static void setup_rsa_key(void **state) {
unlink(LIBSSH_RSA_TESTKEY ".pub");
rc = system("ssh-keygen -t rsa -q -N \"\" -f " LIBSSH_RSA_TESTKEY);
+ assert_true(rc == 0);
session = ssh_new();
*state = session;
@@ -28,6 +29,7 @@ static void setup_dsa_key(void **state) {
unlink(LIBSSH_DSA_TESTKEY ".pub");
rc = system("ssh-keygen -t dsa -q -N \"\" -f " LIBSSH_DSA_TESTKEY);
+ assert_true(rc == 0);
session = ssh_new();
*state = session;
@@ -150,6 +152,7 @@ static void torture_pubkey_generate_from_privkey(void **state) {
rc = torture_read_one_line(LIBSSH_RSA_TESTKEY ".pub", pubkey_line_new,
sizeof(pubkey_line_new));
+ assert_true(rc == 0);
assert_string_equal(pubkey_line_orig, pubkey_line_new);