From 63c42f066fe4c5793309694b61f0bc024f6788c7 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sat, 5 Feb 2011 11:21:54 +0100 Subject: tests: Fixed checking return values of system(). --- tests/unittests/torture_keyfiles.c | 8 ++++++-- 1 file 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; -- cgit v1.2.3