com php-src: Fix flaky openssl_pkey_new test: ext/ope nssl/tests/openssl_pkey_new_basic.phpt

From: Date: Thu, 29 Dec 2016 19:59:28 +0000
Subject: com php-src: Fix flaky openssl_pkey_new test: ext/ope nssl/tests/openssl_pkey_new_basic.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-96441@lists.php.net to get a copy of this message
Commit: 78675ebd9adbc050718ed5aeea6149e097334008 Author: Nikita Popov <nikic@php.net> Thu, 29 Dec 2016 20:59:28 +0100 Parents: d0fcc741100840a9d27bed8ace1ad6224a4e34a9 Branches: PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=78675ebd9adbc050718ed5aeea6149e097334008 Log: Fix flaky openssl_pkey_new test Public key size may vary by one bit... switch to using %d for key sizes. Changed paths: M ext/openssl/tests/openssl_pkey_new_basic.phpt Diff: diff --git a/ext/openssl/tests/openssl_pkey_new_basic.phpt b/ext/openssl/tests/openssl_pkey_new_basic.phpt index eee2eb0...b73b1f5 100644 --- a/ext/openssl/tests/openssl_pkey_new_basic.phpt +++ b/ext/openssl/tests/openssl_pkey_new_basic.phpt @@ -86,10 +86,10 @@ $details = openssl_pkey_get_details($dh); $dh_details = $details['dh']; openssl_pkey_test_cmp($phex, $dh_details['p']); var_dump($dh_details['g']); -var_dump(strlen($dh_details['pub_key']) > 0); -var_dump(strlen($dh_details['priv_key']) > 0); +var_dump(strlen($dh_details['pub_key'])); +var_dump(strlen($dh_details['priv_key'])); ?> ---EXPECT-- +--EXPECTF-- int(0) int(0) int(0) @@ -98,9 +98,9 @@ int(0) int(0) int(0) int(0) -int(20) -int(128) +int(%d) +int(%d) int(0) string(1) "2" -bool(true) -bool(true) +int(%d) +int(%d)

« previous php.cvs (#96441) next »