diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2011-02-05 11:21:54 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2011-02-05 15:23:19 +0100 |
commit | 63c42f066fe4c5793309694b61f0bc024f6788c7 (patch) | |
tree | 3d68b193eecbfe840bf028ed668e07ebc21f834e | |
parent | 9e40e60bc425670b7d8a16d9c4fea9ee0230f275 (diff) | |
download | libssh-63c42f066fe4c5793309694b61f0bc024f6788c7.tar.gz libssh-63c42f066fe4c5793309694b61f0bc024f6788c7.tar.xz libssh-63c42f066fe4c5793309694b61f0bc024f6788c7.zip |
tests: Fixed checking return values of system().
-rw-r--r-- | tests/unittests/torture_keyfiles.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/unittests/torture_keyfiles.c b/tests/unittests/torture_keyfiles.c index 07a1f57..59c2870 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; |