aboutsummaryrefslogtreecommitdiff
path: root/tests/unittests/torture_keyfiles.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2011-02-05 11:21:54 +0100
committerAndreas Schneider <asn@cryptomilk.org>2011-02-05 15:23:19 +0100
commit63c42f066fe4c5793309694b61f0bc024f6788c7 (patch)
tree3d68b193eecbfe840bf028ed668e07ebc21f834e /tests/unittests/torture_keyfiles.c
parent9e40e60bc425670b7d8a16d9c4fea9ee0230f275 (diff)
downloadlibssh-63c42f066fe4c5793309694b61f0bc024f6788c7.tar.gz
libssh-63c42f066fe4c5793309694b61f0bc024f6788c7.tar.xz
libssh-63c42f066fe4c5793309694b61f0bc024f6788c7.zip
tests: Fixed checking return values of system().
Diffstat (limited to 'tests/unittests/torture_keyfiles.c')
-rw-r--r--tests/unittests/torture_keyfiles.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/unittests/torture_keyfiles.c b/tests/unittests/torture_keyfiles.c
index 07a1f57e..59c28703 100644
--- a/tests/unittests/torture_keyfiles.c
+++ b/tests/unittests/torture_keyfiles.c
@@ -43,9 +43,13 @@ static void setup_both_keys(void **state) {
static void setup_both_keys_passphrase(void **state) {
ssh_session session;
+ int rc;
+
+ rc = system("ssh-keygen -t rsa -N " LIBSSH_PASSPHRASE " -f " LIBSSH_RSA_TESTKEY);
+ assert_true(rc == 0);
- system("ssh-keygen -t rsa -N " LIBSSH_PASSPHRASE " -f " LIBSSH_RSA_TESTKEY);
- system("ssh-keygen -t dsa -N " LIBSSH_PASSPHRASE " -f " LIBSSH_DSA_TESTKEY);
+ rc = system("ssh-keygen -t dsa -N " LIBSSH_PASSPHRASE " -f " LIBSSH_DSA_TESTKEY);
+ assert_true(rc == 0);
session = ssh_new();
*state = session;