From a19447f6b87713e50d41b951bf3c9eee0c88fa8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Sun, 11 Sep 2022 23:45:37 +0200 Subject: [PATCH 01/29] unify tests before fix --- ext/oci8/tests/extauth_01.phpt | 5 +---- ext/oci8/tests/extauth_02.phpt | 2 -- ext/oci8/tests/extauth_03.phpt | 2 -- ext/oci8/tests/extauth_04.phpt | 4 ++-- 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/ext/oci8/tests/extauth_01.phpt b/ext/oci8/tests/extauth_01.phpt index db23097d82d5b..fdd3e9565ebf3 100644 --- a/ext/oci8/tests/extauth_01.phpt +++ b/ext/oci8/tests/extauth_01.phpt @@ -3,17 +3,14 @@ Test External Authentication errors with oci_connect --SKIPIF-- --INI-- oci8.privileged_connect=1 --FILE-- +--INI-- +oci8.privileged_connect=1 --FILE-- Date: Mon, 12 Sep 2022 00:07:53 +0200 Subject: [PATCH 02/29] use real host to prevent timeouts --- ext/oci8/tests/extauth_01.phpt | 5 ++--- ext/oci8/tests/extauth_02.phpt | 5 ++--- ext/oci8/tests/extauth_03.phpt | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/ext/oci8/tests/extauth_01.phpt b/ext/oci8/tests/extauth_01.phpt index fdd3e9565ebf3..6f26c39dc6574 100644 --- a/ext/oci8/tests/extauth_01.phpt +++ b/ext/oci8/tests/extauth_01.phpt @@ -3,7 +3,6 @@ Test External Authentication errors with oci_connect --SKIPIF-- --INI-- @@ -67,7 +66,7 @@ var_dump($c); echo "Test 7\n"; -$c = oci_connect('/', '', 'anything', null, OCI_CRED_EXT); +$c = oci_connect('/', '', 'localhost', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -76,7 +75,7 @@ var_dump($c); echo "Test 8\n"; -$c = oci_connect('/', null, 'anything', null, OCI_CRED_EXT); +$c = oci_connect('/', null, 'localhost', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); diff --git a/ext/oci8/tests/extauth_02.phpt b/ext/oci8/tests/extauth_02.phpt index db38d8c98e020..0bf32e01a0b7a 100644 --- a/ext/oci8/tests/extauth_02.phpt +++ b/ext/oci8/tests/extauth_02.phpt @@ -3,7 +3,6 @@ Test External Authentication errors with oci_new_connect --SKIPIF-- --INI-- @@ -67,7 +66,7 @@ var_dump($c); echo "Test 7\n"; -$c = oci_new_connect('/', '', 'anything', null, OCI_CRED_EXT); +$c = oci_new_connect('/', '', 'localhost', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -76,7 +75,7 @@ var_dump($c); echo "Test 8\n"; -$c = oci_new_connect('/', null, 'anything', null, OCI_CRED_EXT); +$c = oci_new_connect('/', null, 'localhost', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); diff --git a/ext/oci8/tests/extauth_03.phpt b/ext/oci8/tests/extauth_03.phpt index e7d5441e60ac8..bda2dcac8b341 100644 --- a/ext/oci8/tests/extauth_03.phpt +++ b/ext/oci8/tests/extauth_03.phpt @@ -3,7 +3,6 @@ Test External Authentication errors with oci_pconnect --SKIPIF-- --INI-- @@ -67,7 +66,7 @@ var_dump($c); echo "Test 7\n"; -$c = oci_pconnect('/', '', 'anything', null, OCI_CRED_EXT); +$c = oci_pconnect('/', '', 'localhost', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -76,7 +75,7 @@ var_dump($c); echo "Test 8\n"; -$c = oci_pconnect('/', null, 'anything', null, OCI_CRED_EXT); +$c = oci_pconnect('/', null, 'localhost', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); From 1ed7cc933f378f6c6f8d9fd95aac7da8cad046c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 00:10:25 +0200 Subject: [PATCH 03/29] DEBUG run 2x 20 tests --- .github/workflows/push.yml | 117 +++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 520a701a0de43..d93aab2d2928b 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -25,8 +25,125 @@ jobs: include: - debug: true zts: false + i: 0 + - debug: true + zts: false + i: 1 + - debug: true + zts: false + i: 2 + - debug: true + zts: false + i: 3 + - debug: true + zts: false + i: 4 + - debug: true + zts: false + i: 5 + - debug: true + zts: false + i: 6 + - debug: true + zts: false + i: 7 + - debug: true + zts: false + i: 8 + - debug: true + zts: false + i: 9 + - debug: true + zts: false + i: 10 + - debug: true + zts: false + i: 11 + - debug: true + zts: false + i: 12 + - debug: true + zts: false + i: 13 + - debug: true + zts: false + i: 14 + - debug: true + zts: false + i: 15 + - debug: true + zts: false + i: 16 + - debug: true + zts: false + i: 17 + - debug: true + zts: false + i: 18 + - debug: true + zts: false + i: 19 + + - debug: false + zts: true + i: 0 + - debug: false + zts: true + i: 1 + - debug: false + zts: true + i: 2 + - debug: false + zts: true + i: 3 + - debug: false + zts: true + i: 4 + - debug: false + zts: true + i: 5 + - debug: false + zts: true + i: 6 + - debug: false + zts: true + i: 7 + - debug: false + zts: true + i: 8 + - debug: false + zts: true + i: 9 + - debug: false + zts: true + i: 10 + - debug: false + zts: true + i: 11 + - debug: false + zts: true + i: 12 + - debug: false + zts: true + i: 13 + - debug: false + zts: true + i: 14 + - debug: false + zts: true + i: 15 + - debug: false + zts: true + i: 16 + - debug: false + zts: true + i: 17 + - debug: false + zts: true + i: 18 - debug: false zts: true + i: 19 name: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}" runs-on: ubuntu-20.04 steps: From b2246cb889f65848f8b2549c0e5cc9e40ea47316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 00:18:23 +0200 Subject: [PATCH 04/29] DEBUG increase testing timeout --- .github/actions/test-linux/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/test-linux/action.yml b/.github/actions/test-linux/action.yml index 7db8fa58900d3..b43be5c9d7eec 100644 --- a/.github/actions/test-linux/action.yml +++ b/.github/actions/test-linux/action.yml @@ -30,4 +30,4 @@ runs: --offline \ --show-diff \ --show-slow 1000 \ - --set-timeout 120 + --set-timeout 1200 From ef6ce318f0891679418a7f24371177179499631a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 00:10:25 +0200 Subject: [PATCH 05/29] Revert "DEBUG run 2x 20 tests" This reverts commit 1ed7cc933f378f6c6f8d9fd95aac7da8cad046c5. --- .github/workflows/push.yml | 117 ------------------------------------- 1 file changed, 117 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index d93aab2d2928b..520a701a0de43 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -25,125 +25,8 @@ jobs: include: - debug: true zts: false - i: 0 - - debug: true - zts: false - i: 1 - - debug: true - zts: false - i: 2 - - debug: true - zts: false - i: 3 - - debug: true - zts: false - i: 4 - - debug: true - zts: false - i: 5 - - debug: true - zts: false - i: 6 - - debug: true - zts: false - i: 7 - - debug: true - zts: false - i: 8 - - debug: true - zts: false - i: 9 - - debug: true - zts: false - i: 10 - - debug: true - zts: false - i: 11 - - debug: true - zts: false - i: 12 - - debug: true - zts: false - i: 13 - - debug: true - zts: false - i: 14 - - debug: true - zts: false - i: 15 - - debug: true - zts: false - i: 16 - - debug: true - zts: false - i: 17 - - debug: true - zts: false - i: 18 - - debug: true - zts: false - i: 19 - - - debug: false - zts: true - i: 0 - - debug: false - zts: true - i: 1 - - debug: false - zts: true - i: 2 - - debug: false - zts: true - i: 3 - - debug: false - zts: true - i: 4 - - debug: false - zts: true - i: 5 - - debug: false - zts: true - i: 6 - - debug: false - zts: true - i: 7 - - debug: false - zts: true - i: 8 - - debug: false - zts: true - i: 9 - - debug: false - zts: true - i: 10 - - debug: false - zts: true - i: 11 - - debug: false - zts: true - i: 12 - - debug: false - zts: true - i: 13 - - debug: false - zts: true - i: 14 - - debug: false - zts: true - i: 15 - - debug: false - zts: true - i: 16 - - debug: false - zts: true - i: 17 - - debug: false - zts: true - i: 18 - debug: false zts: true - i: 19 name: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}" runs-on: ubuntu-20.04 steps: From f1544b093c9e598d32d60beef4ca4b3bee844d0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 01:45:40 +0200 Subject: [PATCH 06/29] use "mysql" host instead --- ext/oci8/tests/extauth_01.phpt | 4 ++-- ext/oci8/tests/extauth_02.phpt | 4 ++-- ext/oci8/tests/extauth_03.phpt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/oci8/tests/extauth_01.phpt b/ext/oci8/tests/extauth_01.phpt index 6f26c39dc6574..deafe99e35625 100644 --- a/ext/oci8/tests/extauth_01.phpt +++ b/ext/oci8/tests/extauth_01.phpt @@ -66,7 +66,7 @@ var_dump($c); echo "Test 7\n"; -$c = oci_connect('/', '', 'localhost', null, OCI_CRED_EXT); +$c = oci_connect('/', '', 'mysql', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -75,7 +75,7 @@ var_dump($c); echo "Test 8\n"; -$c = oci_connect('/', null, 'localhost', null, OCI_CRED_EXT); +$c = oci_connect('/', null, 'mysql', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); diff --git a/ext/oci8/tests/extauth_02.phpt b/ext/oci8/tests/extauth_02.phpt index 0bf32e01a0b7a..d49782b990ea9 100644 --- a/ext/oci8/tests/extauth_02.phpt +++ b/ext/oci8/tests/extauth_02.phpt @@ -66,7 +66,7 @@ var_dump($c); echo "Test 7\n"; -$c = oci_new_connect('/', '', 'localhost', null, OCI_CRED_EXT); +$c = oci_new_connect('/', '', 'mysql', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -75,7 +75,7 @@ var_dump($c); echo "Test 8\n"; -$c = oci_new_connect('/', null, 'localhost', null, OCI_CRED_EXT); +$c = oci_new_connect('/', null, 'mysql', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); diff --git a/ext/oci8/tests/extauth_03.phpt b/ext/oci8/tests/extauth_03.phpt index bda2dcac8b341..d303711b5e0f9 100644 --- a/ext/oci8/tests/extauth_03.phpt +++ b/ext/oci8/tests/extauth_03.phpt @@ -66,7 +66,7 @@ var_dump($c); echo "Test 7\n"; -$c = oci_pconnect('/', '', 'localhost', null, OCI_CRED_EXT); +$c = oci_pconnect('/', '', 'mysql', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -75,7 +75,7 @@ var_dump($c); echo "Test 8\n"; -$c = oci_pconnect('/', null, 'localhost', null, OCI_CRED_EXT); +$c = oci_pconnect('/', null, 'mysql', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); From c131cc6c9f5e05105bef36def2b0bc6a038a4bd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 01:46:20 +0200 Subject: [PATCH 07/29] use "anything.invalid" host --- ext/oci8/tests/extauth_01.phpt | 4 ++-- ext/oci8/tests/extauth_02.phpt | 4 ++-- ext/oci8/tests/extauth_03.phpt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/oci8/tests/extauth_01.phpt b/ext/oci8/tests/extauth_01.phpt index deafe99e35625..e51dea179d08f 100644 --- a/ext/oci8/tests/extauth_01.phpt +++ b/ext/oci8/tests/extauth_01.phpt @@ -66,7 +66,7 @@ var_dump($c); echo "Test 7\n"; -$c = oci_connect('/', '', 'mysql', null, OCI_CRED_EXT); +$c = oci_connect('/', '', 'anything.invalid', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -75,7 +75,7 @@ var_dump($c); echo "Test 8\n"; -$c = oci_connect('/', null, 'mysql', null, OCI_CRED_EXT); +$c = oci_connect('/', null, 'anything.invalid', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); diff --git a/ext/oci8/tests/extauth_02.phpt b/ext/oci8/tests/extauth_02.phpt index d49782b990ea9..52fec6ae2a5de 100644 --- a/ext/oci8/tests/extauth_02.phpt +++ b/ext/oci8/tests/extauth_02.phpt @@ -66,7 +66,7 @@ var_dump($c); echo "Test 7\n"; -$c = oci_new_connect('/', '', 'mysql', null, OCI_CRED_EXT); +$c = oci_new_connect('/', '', 'anything.invalid', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -75,7 +75,7 @@ var_dump($c); echo "Test 8\n"; -$c = oci_new_connect('/', null, 'mysql', null, OCI_CRED_EXT); +$c = oci_new_connect('/', null, 'anything.invalid', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); diff --git a/ext/oci8/tests/extauth_03.phpt b/ext/oci8/tests/extauth_03.phpt index d303711b5e0f9..12078ea8db3a9 100644 --- a/ext/oci8/tests/extauth_03.phpt +++ b/ext/oci8/tests/extauth_03.phpt @@ -66,7 +66,7 @@ var_dump($c); echo "Test 7\n"; -$c = oci_pconnect('/', '', 'mysql', null, OCI_CRED_EXT); +$c = oci_pconnect('/', '', 'anything.invalid', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -75,7 +75,7 @@ var_dump($c); echo "Test 8\n"; -$c = oci_pconnect('/', null, 'mysql', null, OCI_CRED_EXT); +$c = oci_pconnect('/', null, 'anything.invalid', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); From 76af0fc6b4d8e0984b8d37c5da29432a84ca8772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 00:18:23 +0200 Subject: [PATCH 08/29] Revert "DEBUG increase testing timeout" This reverts commit b2246cb889f65848f8b2549c0e5cc9e40ea47316. --- .github/actions/test-linux/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/test-linux/action.yml b/.github/actions/test-linux/action.yml index b43be5c9d7eec..7db8fa58900d3 100644 --- a/.github/actions/test-linux/action.yml +++ b/.github/actions/test-linux/action.yml @@ -30,4 +30,4 @@ runs: --offline \ --show-diff \ --show-slow 1000 \ - --set-timeout 1200 + --set-timeout 120 From 77663d2c5a387b7bae42bb8779720cd149ecef67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 00:10:25 +0200 Subject: [PATCH 09/29] DEBUG run 2x 20 tests --- .github/workflows/push.yml | 117 +++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 520a701a0de43..d93aab2d2928b 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -25,8 +25,125 @@ jobs: include: - debug: true zts: false + i: 0 + - debug: true + zts: false + i: 1 + - debug: true + zts: false + i: 2 + - debug: true + zts: false + i: 3 + - debug: true + zts: false + i: 4 + - debug: true + zts: false + i: 5 + - debug: true + zts: false + i: 6 + - debug: true + zts: false + i: 7 + - debug: true + zts: false + i: 8 + - debug: true + zts: false + i: 9 + - debug: true + zts: false + i: 10 + - debug: true + zts: false + i: 11 + - debug: true + zts: false + i: 12 + - debug: true + zts: false + i: 13 + - debug: true + zts: false + i: 14 + - debug: true + zts: false + i: 15 + - debug: true + zts: false + i: 16 + - debug: true + zts: false + i: 17 + - debug: true + zts: false + i: 18 + - debug: true + zts: false + i: 19 + + - debug: false + zts: true + i: 0 + - debug: false + zts: true + i: 1 + - debug: false + zts: true + i: 2 + - debug: false + zts: true + i: 3 + - debug: false + zts: true + i: 4 + - debug: false + zts: true + i: 5 + - debug: false + zts: true + i: 6 + - debug: false + zts: true + i: 7 + - debug: false + zts: true + i: 8 + - debug: false + zts: true + i: 9 + - debug: false + zts: true + i: 10 + - debug: false + zts: true + i: 11 + - debug: false + zts: true + i: 12 + - debug: false + zts: true + i: 13 + - debug: false + zts: true + i: 14 + - debug: false + zts: true + i: 15 + - debug: false + zts: true + i: 16 + - debug: false + zts: true + i: 17 + - debug: false + zts: true + i: 18 - debug: false zts: true + i: 19 name: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}" runs-on: ubuntu-20.04 steps: From 9e74767c8bf42f5e09e6b64037f808d75de52b76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 00:18:23 +0200 Subject: [PATCH 10/29] DEBUG increase testing timeout --- .github/actions/test-linux/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/test-linux/action.yml b/.github/actions/test-linux/action.yml index 7db8fa58900d3..b43be5c9d7eec 100644 --- a/.github/actions/test-linux/action.yml +++ b/.github/actions/test-linux/action.yml @@ -30,4 +30,4 @@ runs: --offline \ --show-diff \ --show-slow 1000 \ - --set-timeout 120 + --set-timeout 1200 From 9c2b696503f2a2a506bc38243ac5dd17bb86c128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 03:32:55 +0200 Subject: [PATCH 11/29] DEBUG verify original issue is reproducible --- ext/oci8/tests/extauth_01.phpt | 5 +++-- ext/oci8/tests/extauth_02.phpt | 5 +++-- ext/oci8/tests/extauth_03.phpt | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ext/oci8/tests/extauth_01.phpt b/ext/oci8/tests/extauth_01.phpt index e51dea179d08f..fdd3e9565ebf3 100644 --- a/ext/oci8/tests/extauth_01.phpt +++ b/ext/oci8/tests/extauth_01.phpt @@ -3,6 +3,7 @@ Test External Authentication errors with oci_connect --SKIPIF-- --INI-- @@ -66,7 +67,7 @@ var_dump($c); echo "Test 7\n"; -$c = oci_connect('/', '', 'anything.invalid', null, OCI_CRED_EXT); +$c = oci_connect('/', '', 'anything', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -75,7 +76,7 @@ var_dump($c); echo "Test 8\n"; -$c = oci_connect('/', null, 'anything.invalid', null, OCI_CRED_EXT); +$c = oci_connect('/', null, 'anything', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); diff --git a/ext/oci8/tests/extauth_02.phpt b/ext/oci8/tests/extauth_02.phpt index 52fec6ae2a5de..db38d8c98e020 100644 --- a/ext/oci8/tests/extauth_02.phpt +++ b/ext/oci8/tests/extauth_02.phpt @@ -3,6 +3,7 @@ Test External Authentication errors with oci_new_connect --SKIPIF-- --INI-- @@ -66,7 +67,7 @@ var_dump($c); echo "Test 7\n"; -$c = oci_new_connect('/', '', 'anything.invalid', null, OCI_CRED_EXT); +$c = oci_new_connect('/', '', 'anything', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -75,7 +76,7 @@ var_dump($c); echo "Test 8\n"; -$c = oci_new_connect('/', null, 'anything.invalid', null, OCI_CRED_EXT); +$c = oci_new_connect('/', null, 'anything', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); diff --git a/ext/oci8/tests/extauth_03.phpt b/ext/oci8/tests/extauth_03.phpt index 12078ea8db3a9..e7d5441e60ac8 100644 --- a/ext/oci8/tests/extauth_03.phpt +++ b/ext/oci8/tests/extauth_03.phpt @@ -3,6 +3,7 @@ Test External Authentication errors with oci_pconnect --SKIPIF-- --INI-- @@ -66,7 +67,7 @@ var_dump($c); echo "Test 7\n"; -$c = oci_pconnect('/', '', 'anything.invalid', null, OCI_CRED_EXT); +$c = oci_pconnect('/', '', 'anything', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -75,7 +76,7 @@ var_dump($c); echo "Test 8\n"; -$c = oci_pconnect('/', null, 'anything.invalid', null, OCI_CRED_EXT); +$c = oci_pconnect('/', null, 'anything', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); From 790482781708904d3468452556913f4d523ea09a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 09:37:35 +0200 Subject: [PATCH 12/29] use "mysql" host instead --- ext/oci8/tests/extauth_01.phpt | 4 ++-- ext/oci8/tests/extauth_02.phpt | 4 ++-- ext/oci8/tests/extauth_03.phpt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/oci8/tests/extauth_01.phpt b/ext/oci8/tests/extauth_01.phpt index fdd3e9565ebf3..4d2c7b4236c0b 100644 --- a/ext/oci8/tests/extauth_01.phpt +++ b/ext/oci8/tests/extauth_01.phpt @@ -67,7 +67,7 @@ var_dump($c); echo "Test 7\n"; -$c = oci_connect('/', '', 'anything', null, OCI_CRED_EXT); +$c = oci_connect('/', '', 'mysql', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -76,7 +76,7 @@ var_dump($c); echo "Test 8\n"; -$c = oci_connect('/', null, 'anything', null, OCI_CRED_EXT); +$c = oci_connect('/', null, 'mysql', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); diff --git a/ext/oci8/tests/extauth_02.phpt b/ext/oci8/tests/extauth_02.phpt index db38d8c98e020..5dacd55a06519 100644 --- a/ext/oci8/tests/extauth_02.phpt +++ b/ext/oci8/tests/extauth_02.phpt @@ -67,7 +67,7 @@ var_dump($c); echo "Test 7\n"; -$c = oci_new_connect('/', '', 'anything', null, OCI_CRED_EXT); +$c = oci_new_connect('/', '', 'mysql', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -76,7 +76,7 @@ var_dump($c); echo "Test 8\n"; -$c = oci_new_connect('/', null, 'anything', null, OCI_CRED_EXT); +$c = oci_new_connect('/', null, 'mysql', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); diff --git a/ext/oci8/tests/extauth_03.phpt b/ext/oci8/tests/extauth_03.phpt index e7d5441e60ac8..977e9861d6385 100644 --- a/ext/oci8/tests/extauth_03.phpt +++ b/ext/oci8/tests/extauth_03.phpt @@ -67,7 +67,7 @@ var_dump($c); echo "Test 7\n"; -$c = oci_pconnect('/', '', 'anything', null, OCI_CRED_EXT); +$c = oci_pconnect('/', '', 'mysql', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -76,7 +76,7 @@ var_dump($c); echo "Test 8\n"; -$c = oci_pconnect('/', null, 'anything', null, OCI_CRED_EXT); +$c = oci_pconnect('/', null, 'mysql', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); From 015bdb7523a76912b1844d1b43752f408e689bec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 09:41:16 +0200 Subject: [PATCH 13/29] use "sql1" host (MSSQL docker) everywhere --- ext/oci8/tests/extauth_01.phpt | 20 ++++++++++---------- ext/oci8/tests/extauth_02.phpt | 16 ++++++++-------- ext/oci8/tests/extauth_03.phpt | 16 ++++++++-------- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/ext/oci8/tests/extauth_01.phpt b/ext/oci8/tests/extauth_01.phpt index 4d2c7b4236c0b..a934736e4c31f 100644 --- a/ext/oci8/tests/extauth_01.phpt +++ b/ext/oci8/tests/extauth_01.phpt @@ -13,7 +13,7 @@ oci8.privileged_connect=1 echo "Test 1\n"; -$c = oci_connect('/', 'notemtpy', 'anything', null, OCI_CRED_EXT); +$c = oci_connect('/', 'notemtpy', 'sql1', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -22,7 +22,7 @@ var_dump($c); echo "Test 2\n"; -$c = oci_connect('notemtpy', 'notemtpy', 'anything', null, OCI_CRED_EXT); +$c = oci_connect('notemtpy', 'notemtpy', 'sql1', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -31,7 +31,7 @@ var_dump($c); echo "Test 3\n"; -$c = oci_connect('notemtpy', '', 'anything', null, OCI_CRED_EXT); +$c = oci_connect('notemtpy', '', 'sql1', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -40,7 +40,7 @@ var_dump($c); echo "Test 4\n"; -$c = oci_connect('a', 'b', 'c', null, OCI_SYSDBA+OCI_SYSOPER); +$c = oci_connect('a', 'b', 'sql1', null, OCI_SYSDBA+OCI_SYSOPER); if (!$c) { $m = oci_error(); var_dump($m); @@ -49,7 +49,7 @@ var_dump($c); echo "Test 5\n"; -$c = oci_connect('a', 'b', 'c', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_connect('a', 'b', 'sql1', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -58,7 +58,7 @@ var_dump($c); echo "Test 6\n"; -$c = oci_connect('', '', 'anything', null, OCI_CRED_EXT); +$c = oci_connect('', '', 'sql1', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -67,7 +67,7 @@ var_dump($c); echo "Test 7\n"; -$c = oci_connect('/', '', 'mysql', null, OCI_CRED_EXT); +$c = oci_connect('/', '', 'sql1', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -76,7 +76,7 @@ var_dump($c); echo "Test 8\n"; -$c = oci_connect('/', null, 'mysql', null, OCI_CRED_EXT); +$c = oci_connect('/', null, 'sql1', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -85,7 +85,7 @@ var_dump($c); echo "Test 9\n"; -$c = oci_connect('/', '', 'd', null, OCI_SYSDBA+OCI_CRED_EXT); +$c = oci_connect('/', '', 'sql1', null, OCI_SYSDBA+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -94,7 +94,7 @@ var_dump($c); echo "Test 10\n"; -$c = oci_connect('/', '', 'd', null, OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_connect('/', '', 'sql1', null, OCI_SYSOPER+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); diff --git a/ext/oci8/tests/extauth_02.phpt b/ext/oci8/tests/extauth_02.phpt index 5dacd55a06519..d4403d8b07936 100644 --- a/ext/oci8/tests/extauth_02.phpt +++ b/ext/oci8/tests/extauth_02.phpt @@ -13,7 +13,7 @@ oci8.privileged_connect=1 echo "Test 1\n"; -$c = oci_new_connect('/', 'notemtpy', 'anything', null, OCI_CRED_EXT); +$c = oci_new_connect('/', 'notemtpy', 'mysql', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -22,7 +22,7 @@ var_dump($c); echo "Test 2\n"; -$c = oci_new_connect('notemtpy', 'notemtpy', 'anything', null, OCI_CRED_EXT); +$c = oci_new_connect('notemtpy', 'notemtpy', 'mysql', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -31,7 +31,7 @@ var_dump($c); echo "Test 3\n"; -$c = oci_new_connect('notemtpy', '', 'anything', null, OCI_CRED_EXT); +$c = oci_new_connect('notemtpy', '', 'mysql', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -40,7 +40,7 @@ var_dump($c); echo "Test 4\n"; -$c = oci_new_connect('a', 'b', 'c', null, OCI_SYSDBA+OCI_SYSOPER); +$c = oci_new_connect('a', 'b', 'mysql', null, OCI_SYSDBA+OCI_SYSOPER); if (!$c) { $m = oci_error(); var_dump($m); @@ -49,7 +49,7 @@ var_dump($c); echo "Test 5\n"; -$c = oci_new_connect('a', 'b', 'c', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_new_connect('a', 'b', 'mysql', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -58,7 +58,7 @@ var_dump($c); echo "Test 6\n"; -$c = oci_new_connect('', '', 'anything', null, OCI_CRED_EXT); +$c = oci_new_connect('', '', 'mysql', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -85,7 +85,7 @@ var_dump($c); echo "Test 9\n"; -$c = oci_new_connect('/', '', 'd', null, OCI_SYSDBA+OCI_CRED_EXT); +$c = oci_new_connect('/', '', 'mysql', null, OCI_SYSDBA+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -94,7 +94,7 @@ var_dump($c); echo "Test 10\n"; -$c = oci_new_connect('/', '', 'd', null, OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_new_connect('/', '', 'mysql', null, OCI_SYSOPER+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); diff --git a/ext/oci8/tests/extauth_03.phpt b/ext/oci8/tests/extauth_03.phpt index 977e9861d6385..07b81cb1790f3 100644 --- a/ext/oci8/tests/extauth_03.phpt +++ b/ext/oci8/tests/extauth_03.phpt @@ -13,7 +13,7 @@ oci8.privileged_connect=1 echo "Test 1\n"; -$c = oci_pconnect('/', 'notemtpy', 'anything', null, OCI_CRED_EXT); +$c = oci_pconnect('/', 'notemtpy', 'mysql', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -22,7 +22,7 @@ var_dump($c); echo "Test 2\n"; -$c = oci_pconnect('notemtpy', 'notemtpy', 'anything', null, OCI_CRED_EXT); +$c = oci_pconnect('notemtpy', 'notemtpy', 'mysql', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -31,7 +31,7 @@ var_dump($c); echo "Test 3\n"; -$c = oci_pconnect('notemtpy', '', 'anything', null, OCI_CRED_EXT); +$c = oci_pconnect('notemtpy', '', 'mysql', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -40,7 +40,7 @@ var_dump($c); echo "Test 4\n"; -$c = oci_pconnect('a', 'b', 'c', null, OCI_SYSDBA+OCI_SYSOPER); +$c = oci_pconnect('a', 'b', 'mysql', null, OCI_SYSDBA+OCI_SYSOPER); if (!$c) { $m = oci_error(); var_dump($m); @@ -49,7 +49,7 @@ var_dump($c); echo "Test 5\n"; -$c = oci_pconnect('a', 'b', 'c', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_pconnect('a', 'b', 'mysql', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -58,7 +58,7 @@ var_dump($c); echo "Test 6\n"; -$c = oci_pconnect('', '', 'anything', null, OCI_CRED_EXT); +$c = oci_pconnect('', '', 'mysql', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -85,7 +85,7 @@ var_dump($c); echo "Test 9\n"; -$c = oci_pconnect('/', '', 'd', null, OCI_SYSDBA+OCI_CRED_EXT); +$c = oci_pconnect('/', '', 'mysql', null, OCI_SYSDBA+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -94,7 +94,7 @@ var_dump($c); echo "Test 10\n"; -$c = oci_pconnect('/', '', 'd', null, OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_pconnect('/', '', 'mysql', null, OCI_SYSOPER+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); From 8af58b0d7d4b5cfb08d8d5df7d5909d68a0cba97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 09:42:31 +0200 Subject: [PATCH 14/29] use "x.cz" host (domain must be at least 2 chars) everywhere --- ext/oci8/tests/extauth_01.phpt | 20 ++++++++++---------- ext/oci8/tests/extauth_02.phpt | 20 ++++++++++---------- ext/oci8/tests/extauth_03.phpt | 20 ++++++++++---------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/ext/oci8/tests/extauth_01.phpt b/ext/oci8/tests/extauth_01.phpt index a934736e4c31f..69ef99af0bab7 100644 --- a/ext/oci8/tests/extauth_01.phpt +++ b/ext/oci8/tests/extauth_01.phpt @@ -13,7 +13,7 @@ oci8.privileged_connect=1 echo "Test 1\n"; -$c = oci_connect('/', 'notemtpy', 'sql1', null, OCI_CRED_EXT); +$c = oci_connect('/', 'notemtpy', 'x.cz', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -22,7 +22,7 @@ var_dump($c); echo "Test 2\n"; -$c = oci_connect('notemtpy', 'notemtpy', 'sql1', null, OCI_CRED_EXT); +$c = oci_connect('notemtpy', 'notemtpy', 'x.cz', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -31,7 +31,7 @@ var_dump($c); echo "Test 3\n"; -$c = oci_connect('notemtpy', '', 'sql1', null, OCI_CRED_EXT); +$c = oci_connect('notemtpy', '', 'x.cz', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -40,7 +40,7 @@ var_dump($c); echo "Test 4\n"; -$c = oci_connect('a', 'b', 'sql1', null, OCI_SYSDBA+OCI_SYSOPER); +$c = oci_connect('a', 'b', 'x.cz', null, OCI_SYSDBA+OCI_SYSOPER); if (!$c) { $m = oci_error(); var_dump($m); @@ -49,7 +49,7 @@ var_dump($c); echo "Test 5\n"; -$c = oci_connect('a', 'b', 'sql1', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_connect('a', 'b', 'x.cz', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -58,7 +58,7 @@ var_dump($c); echo "Test 6\n"; -$c = oci_connect('', '', 'sql1', null, OCI_CRED_EXT); +$c = oci_connect('', '', 'x.cz', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -67,7 +67,7 @@ var_dump($c); echo "Test 7\n"; -$c = oci_connect('/', '', 'sql1', null, OCI_CRED_EXT); +$c = oci_connect('/', '', 'x.cz', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -76,7 +76,7 @@ var_dump($c); echo "Test 8\n"; -$c = oci_connect('/', null, 'sql1', null, OCI_CRED_EXT); +$c = oci_connect('/', null, 'x.cz', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -85,7 +85,7 @@ var_dump($c); echo "Test 9\n"; -$c = oci_connect('/', '', 'sql1', null, OCI_SYSDBA+OCI_CRED_EXT); +$c = oci_connect('/', '', 'x.cz', null, OCI_SYSDBA+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -94,7 +94,7 @@ var_dump($c); echo "Test 10\n"; -$c = oci_connect('/', '', 'sql1', null, OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_connect('/', '', 'x.cz', null, OCI_SYSOPER+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); diff --git a/ext/oci8/tests/extauth_02.phpt b/ext/oci8/tests/extauth_02.phpt index d4403d8b07936..ec9756f642cfc 100644 --- a/ext/oci8/tests/extauth_02.phpt +++ b/ext/oci8/tests/extauth_02.phpt @@ -13,7 +13,7 @@ oci8.privileged_connect=1 echo "Test 1\n"; -$c = oci_new_connect('/', 'notemtpy', 'mysql', null, OCI_CRED_EXT); +$c = oci_new_connect('/', 'notemtpy', 'x.cz', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -22,7 +22,7 @@ var_dump($c); echo "Test 2\n"; -$c = oci_new_connect('notemtpy', 'notemtpy', 'mysql', null, OCI_CRED_EXT); +$c = oci_new_connect('notemtpy', 'notemtpy', 'x.cz', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -31,7 +31,7 @@ var_dump($c); echo "Test 3\n"; -$c = oci_new_connect('notemtpy', '', 'mysql', null, OCI_CRED_EXT); +$c = oci_new_connect('notemtpy', '', 'x.cz', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -40,7 +40,7 @@ var_dump($c); echo "Test 4\n"; -$c = oci_new_connect('a', 'b', 'mysql', null, OCI_SYSDBA+OCI_SYSOPER); +$c = oci_new_connect('a', 'b', 'x.cz', null, OCI_SYSDBA+OCI_SYSOPER); if (!$c) { $m = oci_error(); var_dump($m); @@ -49,7 +49,7 @@ var_dump($c); echo "Test 5\n"; -$c = oci_new_connect('a', 'b', 'mysql', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_new_connect('a', 'b', 'x.cz', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -58,7 +58,7 @@ var_dump($c); echo "Test 6\n"; -$c = oci_new_connect('', '', 'mysql', null, OCI_CRED_EXT); +$c = oci_new_connect('', '', 'x.cz', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -67,7 +67,7 @@ var_dump($c); echo "Test 7\n"; -$c = oci_new_connect('/', '', 'mysql', null, OCI_CRED_EXT); +$c = oci_new_connect('/', '', 'x.cz', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -76,7 +76,7 @@ var_dump($c); echo "Test 8\n"; -$c = oci_new_connect('/', null, 'mysql', null, OCI_CRED_EXT); +$c = oci_new_connect('/', null, 'x.cz', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -85,7 +85,7 @@ var_dump($c); echo "Test 9\n"; -$c = oci_new_connect('/', '', 'mysql', null, OCI_SYSDBA+OCI_CRED_EXT); +$c = oci_new_connect('/', '', 'x.cz', null, OCI_SYSDBA+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -94,7 +94,7 @@ var_dump($c); echo "Test 10\n"; -$c = oci_new_connect('/', '', 'mysql', null, OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_new_connect('/', '', 'x.cz', null, OCI_SYSOPER+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); diff --git a/ext/oci8/tests/extauth_03.phpt b/ext/oci8/tests/extauth_03.phpt index 07b81cb1790f3..c6d39761db469 100644 --- a/ext/oci8/tests/extauth_03.phpt +++ b/ext/oci8/tests/extauth_03.phpt @@ -13,7 +13,7 @@ oci8.privileged_connect=1 echo "Test 1\n"; -$c = oci_pconnect('/', 'notemtpy', 'mysql', null, OCI_CRED_EXT); +$c = oci_pconnect('/', 'notemtpy', 'x.cz', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -22,7 +22,7 @@ var_dump($c); echo "Test 2\n"; -$c = oci_pconnect('notemtpy', 'notemtpy', 'mysql', null, OCI_CRED_EXT); +$c = oci_pconnect('notemtpy', 'notemtpy', 'x.cz', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -31,7 +31,7 @@ var_dump($c); echo "Test 3\n"; -$c = oci_pconnect('notemtpy', '', 'mysql', null, OCI_CRED_EXT); +$c = oci_pconnect('notemtpy', '', 'x.cz', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -40,7 +40,7 @@ var_dump($c); echo "Test 4\n"; -$c = oci_pconnect('a', 'b', 'mysql', null, OCI_SYSDBA+OCI_SYSOPER); +$c = oci_pconnect('a', 'b', 'x.cz', null, OCI_SYSDBA+OCI_SYSOPER); if (!$c) { $m = oci_error(); var_dump($m); @@ -49,7 +49,7 @@ var_dump($c); echo "Test 5\n"; -$c = oci_pconnect('a', 'b', 'mysql', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_pconnect('a', 'b', 'x.cz', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -58,7 +58,7 @@ var_dump($c); echo "Test 6\n"; -$c = oci_pconnect('', '', 'mysql', null, OCI_CRED_EXT); +$c = oci_pconnect('', '', 'x.cz', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -67,7 +67,7 @@ var_dump($c); echo "Test 7\n"; -$c = oci_pconnect('/', '', 'mysql', null, OCI_CRED_EXT); +$c = oci_pconnect('/', '', 'x.cz', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -76,7 +76,7 @@ var_dump($c); echo "Test 8\n"; -$c = oci_pconnect('/', null, 'mysql', null, OCI_CRED_EXT); +$c = oci_pconnect('/', null, 'x.cz', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -85,7 +85,7 @@ var_dump($c); echo "Test 9\n"; -$c = oci_pconnect('/', '', 'mysql', null, OCI_SYSDBA+OCI_CRED_EXT); +$c = oci_pconnect('/', '', 'x.cz', null, OCI_SYSDBA+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -94,7 +94,7 @@ var_dump($c); echo "Test 10\n"; -$c = oci_pconnect('/', '', 'mysql', null, OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_pconnect('/', '', 'x.cz', null, OCI_SYSOPER+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); From 466ba8083b40a905522103893a4e9d79fa7903d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Thu, 26 May 2022 21:10:11 +0200 Subject: [PATCH 15/29] DEBUG test only 'bcmath', 'oci8', 'pdo_oci' ext tests and 1 proc only --- .github/actions/configure-x64/action.yml | 25 --------------- .github/actions/setup-mssql/action.yml | 14 --------- .github/actions/setup-x64/action.yml | 1 - .github/actions/test-linux/action.yml | 2 +- .github/workflows/push.yml | 40 ++---------------------- run-tests.php | 2 +- 6 files changed, 4 insertions(+), 80 deletions(-) delete mode 100644 .github/actions/setup-mssql/action.yml diff --git a/.github/actions/configure-x64/action.yml b/.github/actions/configure-x64/action.yml index 73ce6322d25af..4f394859f1769 100644 --- a/.github/actions/configure-x64/action.yml +++ b/.github/actions/configure-x64/action.yml @@ -15,26 +15,11 @@ runs: --prefix=/usr \ --enable-phpdbg \ --enable-fpm \ - --with-pdo-mysql=mysqlnd \ - --with-mysqli=mysqlnd \ - --with-pgsql \ - --with-pdo-pgsql \ --with-pdo-sqlite \ - --enable-intl \ --without-pear \ - --enable-gd \ - --with-jpeg \ - --with-webp \ - --with-freetype \ - --with-xpm \ - --enable-exif \ - --with-zip \ --with-zlib \ --with-zlib-dir=/usr \ - --enable-soap \ --enable-xmlreader \ - --with-xsl \ - --with-tidy \ --enable-sysvsem \ --enable-sysvshm \ --enable-shmop \ @@ -46,11 +31,7 @@ runs: --enable-sockets \ --with-bz2 \ --with-openssl \ - --with-gmp \ --enable-bcmath \ - --enable-calendar \ - --enable-ftp \ - --with-pspell=/usr \ --with-enchant=/usr \ --with-kerberos \ --enable-sysvmsg \ @@ -60,7 +41,6 @@ runs: --with-ldap-sasl \ --with-password-argon2 \ --with-mhash \ - --with-sodium \ --enable-dba \ --with-cdb \ --enable-flatfile \ @@ -69,11 +49,6 @@ runs: --with-lmdb \ --with-qdbm \ --with-snmp \ - --with-unixODBC \ - --with-imap \ - --with-kerberos \ - --with-imap-ssl \ - --with-pdo-odbc=unixODBC,/usr \ --with-pdo-oci=shared,instantclient,/opt/oracle/instantclient \ --with-oci8=shared,instantclient,/opt/oracle/instantclient \ --with-config-file-path=/etc \ diff --git a/.github/actions/setup-mssql/action.yml b/.github/actions/setup-mssql/action.yml deleted file mode 100644 index c069744a21b59..0000000000000 --- a/.github/actions/setup-mssql/action.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Create MSSQL container -runs: - using: composite - steps: - - shell: bash - run: | - set -x - docker run \ - -e "ACCEPT_EULA=Y" \ - -e "SA_PASSWORD=" \ - -p 1433:1433 \ - --name sql1 \ - -h sql1 \ - -d mcr.microsoft.com/mssql/server:2019-CU8-ubuntu-16.04 diff --git a/.github/actions/setup-x64/action.yml b/.github/actions/setup-x64/action.yml index bb014bfe9de11..f5cf6473668fe 100644 --- a/.github/actions/setup-x64/action.yml +++ b/.github/actions/setup-x64/action.yml @@ -14,7 +14,6 @@ runs: mysql -uroot -proot -e "SET GLOBAL local_infile = true" sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';" sudo -u postgres psql -c "CREATE DATABASE test;" - docker exec sql1 /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U SA -P "" -Q "create login pdo_test with password='password', check_policy=off; create user pdo_test for login pdo_test; grant alter, control to pdo_test;" sudo locale-gen de_DE ./.github/scripts/setup-slapd.sh &>/dev/null diff --git a/.github/actions/test-linux/action.yml b/.github/actions/test-linux/action.yml index b43be5c9d7eec..eeed8808345b0 100644 --- a/.github/actions/test-linux/action.yml +++ b/.github/actions/test-linux/action.yml @@ -25,7 +25,7 @@ runs: export PDO_OCI_TEST_DSN="oci:dbname=localhost/XEPDB1;charset=AL32UTF8" export SKIP_IO_CAPTURE_TESTS=1 sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \ - -j$(/usr/bin/nproc) \ + -j1 \ -g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP \ --offline \ --show-diff \ diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index d93aab2d2928b..ef14eaf68a2a1 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -10,10 +10,7 @@ on: - CONTRIBUTING.md - CODING_STANDARDS.md branches: - - PHP-7.4 - - PHP-8.0 - - PHP-8.1 - - master + - '**' pull_request: branches: - '**' @@ -149,8 +146,6 @@ jobs: steps: - name: git checkout uses: actions/checkout@v2 - - name: Create MSSQL container - uses: ./.github/actions/setup-mssql - name: Create Oracle container uses: ./.github/actions/setup-oracle - name: apt @@ -175,35 +170,4 @@ jobs: runTestsParameters: >- -d zend_extension=opcache.so -d opcache.enable_cli=1 - -d opcache.jit_buffer_size=16M - - name: Verify generated files are up to date - uses: ./.github/actions/verify-generated-files - MACOS_DEBUG_NTS: - runs-on: macos-11 - steps: - - name: git checkout - uses: actions/checkout@v2 - - name: brew - uses: ./.github/actions/brew - - name: ./configure - uses: ./.github/actions/configure-macos - with: - configurationParameters: --enable-debug --disable-zts - - name: make - run: |- - export PATH="/usr/local/opt/bison/bin:$PATH" - make -j$(sysctl -n hw.logicalcpu) >/dev/null - - name: make install - run: sudo make install - - name: Test - uses: ./.github/actions/test-macos - - name: Test Tracing JIT - uses: ./.github/actions/test-macos - with: - runTestsParameters: >- - -d zend_extension=opcache.so - -d opcache.enable_cli=1 - -d opcache.protect_memory=1 - -d opcache.jit_buffer_size=16M - - name: Verify generated files are up to date - uses: ./.github/actions/verify-generated-files + -d opcache.jit_buffer_size=16M \ No newline at end of file diff --git a/run-tests.php b/run-tests.php index 2c93f53ab453f..f484de1a2a00e 100755 --- a/run-tests.php +++ b/run-tests.php @@ -754,7 +754,7 @@ function main(): void $ignored_by_ext = 0; sort($exts_to_test); $test_dirs = []; - $optionals = ['Zend', 'tests', 'ext', 'sapi']; + $optionals = ['ext/bcmath', 'ext/oci8', 'ext/pdo_oci']; foreach ($optionals as $dir) { if (is_dir($dir)) { From e2147d4163487ef2029e2ee46670aa7386d69ad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 10:18:38 +0200 Subject: [PATCH 16/29] DEBUG dump individual times, rm slow tests --- ext/oci8/tests/bug42496_1.phpt | 57 ------------- ext/oci8/tests/bug42496_2.phpt | 55 ------------ ext/oci8/tests/bug44113.phpt | 48 ----------- ext/oci8/tests/calltimeout1.phpt | 48 ----------- ext/oci8/tests/extauth_01.phpt | 30 +++++++ ext/oci8/tests/extauth_02.phpt | 30 +++++++ ext/oci8/tests/extauth_03.phpt | 30 +++++++ ext/oci8/tests/lob_043.phpt | 85 ------------------- .../tests/pdo_oci_attr_call_timeout.phpt | 66 -------------- 9 files changed, 90 insertions(+), 359 deletions(-) delete mode 100644 ext/oci8/tests/bug42496_1.phpt delete mode 100644 ext/oci8/tests/bug42496_2.phpt delete mode 100644 ext/oci8/tests/bug44113.phpt delete mode 100644 ext/oci8/tests/calltimeout1.phpt delete mode 100644 ext/oci8/tests/lob_043.phpt delete mode 100644 ext/pdo_oci/tests/pdo_oci_attr_call_timeout.phpt diff --git a/ext/oci8/tests/bug42496_1.phpt b/ext/oci8/tests/bug42496_1.phpt deleted file mode 100644 index 9db7d720e9f14..0000000000000 --- a/ext/oci8/tests/bug42496_1.phpt +++ /dev/null @@ -1,57 +0,0 @@ ---TEST-- -Bug #42496 (LOB fetch leaks cursors, eventually failing with ORA-1000 maximum open cursors reached) ---SKIPIF-- - true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); -if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); -?> ---FILE-- -free(); - $arr['C2']->free(); - } - } - oci_free_statement($s); -} - -echo "Done\n"; - -// Cleanup - -$stmtarray = array( - "DROP table bug42496_1_tab" -); - -oci8_test_sql_execute($c, $stmtarray); - -?> ---EXPECT-- -Test 1 -Done diff --git a/ext/oci8/tests/bug42496_2.phpt b/ext/oci8/tests/bug42496_2.phpt deleted file mode 100644 index 52c42f8bcfdd0..0000000000000 --- a/ext/oci8/tests/bug42496_2.phpt +++ /dev/null @@ -1,55 +0,0 @@ ---TEST-- -Bug #42496 (LOB fetch leaks cursors, eventually failing with ORA-1000 maximum open cursors reached) ---SKIPIF-- - true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); -if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); -?> ---FILE-- -free(); - $arr['C2']->free(); - } - } - oci_free_statement($s); -} - -echo "Done\n"; - -// Cleanup - -$stmtarray = array( - "DROP table bug42496_2_tab" -); - -oci8_test_sql_execute($c, $stmtarray); - -?> ---EXPECT-- -Test 2 -Done diff --git a/ext/oci8/tests/bug44113.phpt b/ext/oci8/tests/bug44113.phpt deleted file mode 100644 index ca2a03e9145a2..0000000000000 --- a/ext/oci8/tests/bug44113.phpt +++ /dev/null @@ -1,48 +0,0 @@ ---TEST-- -Bug #44113 (New collection creation can fail with OCI-22303) ---SKIPIF-- - true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); -if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); -?> ---FILE-- - ---EXPECT-- -Completed 70000 -Done diff --git a/ext/oci8/tests/calltimeout1.phpt b/ext/oci8/tests/calltimeout1.phpt deleted file mode 100644 index 81d4af3e4cedd..0000000000000 --- a/ext/oci8/tests/calltimeout1.phpt +++ /dev/null @@ -1,48 +0,0 @@ ---TEST-- -oci_set_call_timeout: test timing out ---SKIPIF-- - true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); -if (strcasecmp($user, "system") && strcasecmp($user, "sys")) { - die("skip needs to be run as a user with access to DBMS_LOCK"); -} -preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); -if (!(isset($matches[0]) && $matches[0] >= 18)) { - die("skip works only with Oracle 18c or greater version of Oracle client libraries"); -} - -?> ---FILE-- - ---EXPECTF-- -Test 1 -Execute error was ORA-%r(03136|03156)%r: %s diff --git a/ext/oci8/tests/extauth_01.phpt b/ext/oci8/tests/extauth_01.phpt index 69ef99af0bab7..c9ba2b7b0323e 100644 --- a/ext/oci8/tests/extauth_01.phpt +++ b/ext/oci8/tests/extauth_01.phpt @@ -13,7 +13,9 @@ oci8.privileged_connect=1 echo "Test 1\n"; +$tt = microtime(true); $c = oci_connect('/', 'notemtpy', 'x.cz', null, OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -22,7 +24,9 @@ var_dump($c); echo "Test 2\n"; +$tt = microtime(true); $c = oci_connect('notemtpy', 'notemtpy', 'x.cz', null, OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -31,7 +35,9 @@ var_dump($c); echo "Test 3\n"; +$tt = microtime(true); $c = oci_connect('notemtpy', '', 'x.cz', null, OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -40,7 +46,9 @@ var_dump($c); echo "Test 4\n"; +$tt = microtime(true); $c = oci_connect('a', 'b', 'x.cz', null, OCI_SYSDBA+OCI_SYSOPER); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -49,7 +57,9 @@ var_dump($c); echo "Test 5\n"; +$tt = microtime(true); $c = oci_connect('a', 'b', 'x.cz', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -58,7 +68,9 @@ var_dump($c); echo "Test 6\n"; +$tt = microtime(true); $c = oci_connect('', '', 'x.cz', null, OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -67,7 +79,9 @@ var_dump($c); echo "Test 7\n"; +$tt = microtime(true); $c = oci_connect('/', '', 'x.cz', null, OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -76,7 +90,9 @@ var_dump($c); echo "Test 8\n"; +$tt = microtime(true); $c = oci_connect('/', null, 'x.cz', null, OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -85,7 +101,9 @@ var_dump($c); echo "Test 9\n"; +$tt = microtime(true); $c = oci_connect('/', '', 'x.cz', null, OCI_SYSDBA+OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -94,7 +112,9 @@ var_dump($c); echo "Test 10\n"; +$tt = microtime(true); $c = oci_connect('/', '', 'x.cz', null, OCI_SYSOPER+OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -107,36 +127,43 @@ var_dump($c); Test 1 Warning: oci_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d +elapsed: %d secs bool(false) bool(false) Test 2 Warning: oci_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d +elapsed: %d secs bool(false) bool(false) Test 3 Warning: oci_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d +elapsed: %d secs bool(false) bool(false) Test 4 Warning: oci_connect(): OCI_SYSDBA and OCI_SYSOPER cannot be used together in %s on line %d +elapsed: %d secs bool(false) bool(false) Test 5 Warning: oci_connect(): OCI_SYSDBA and OCI_SYSOPER cannot be used together in %s on line %d +elapsed: %d secs bool(false) bool(false) Test 6 Warning: oci_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d +elapsed: %d secs bool(false) bool(false) Test 7 Warning: oci_connect(): ORA-12154: %s in %s on line %d +elapsed: %d secs array(4) { ["code"]=> int(12154) @@ -151,6 +178,7 @@ bool(false) Test 8 Warning: oci_connect(): ORA-12154: %s in %s on line %d +elapsed: %d secs array(4) { ["code"]=> int(12154) @@ -165,6 +193,7 @@ bool(false) Test 9 Warning: oci_connect(): ORA-%d: TNS:%s in %s on line %d +elapsed: %d secs array(4) { ["code"]=> int(%d) @@ -179,6 +208,7 @@ bool(false) Test 10 Warning: oci_connect(): ORA-%d: TNS:%s in %s on line %d +elapsed: %d secs array(4) { ["code"]=> int(%d) diff --git a/ext/oci8/tests/extauth_02.phpt b/ext/oci8/tests/extauth_02.phpt index ec9756f642cfc..57172ea1d0d0c 100644 --- a/ext/oci8/tests/extauth_02.phpt +++ b/ext/oci8/tests/extauth_02.phpt @@ -13,7 +13,9 @@ oci8.privileged_connect=1 echo "Test 1\n"; +$tt = microtime(true); $c = oci_new_connect('/', 'notemtpy', 'x.cz', null, OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -22,7 +24,9 @@ var_dump($c); echo "Test 2\n"; +$tt = microtime(true); $c = oci_new_connect('notemtpy', 'notemtpy', 'x.cz', null, OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -31,7 +35,9 @@ var_dump($c); echo "Test 3\n"; +$tt = microtime(true); $c = oci_new_connect('notemtpy', '', 'x.cz', null, OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -40,7 +46,9 @@ var_dump($c); echo "Test 4\n"; +$tt = microtime(true); $c = oci_new_connect('a', 'b', 'x.cz', null, OCI_SYSDBA+OCI_SYSOPER); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -49,7 +57,9 @@ var_dump($c); echo "Test 5\n"; +$tt = microtime(true); $c = oci_new_connect('a', 'b', 'x.cz', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -58,7 +68,9 @@ var_dump($c); echo "Test 6\n"; +$tt = microtime(true); $c = oci_new_connect('', '', 'x.cz', null, OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -67,7 +79,9 @@ var_dump($c); echo "Test 7\n"; +$tt = microtime(true); $c = oci_new_connect('/', '', 'x.cz', null, OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -76,7 +90,9 @@ var_dump($c); echo "Test 8\n"; +$tt = microtime(true); $c = oci_new_connect('/', null, 'x.cz', null, OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -85,7 +101,9 @@ var_dump($c); echo "Test 9\n"; +$tt = microtime(true); $c = oci_new_connect('/', '', 'x.cz', null, OCI_SYSDBA+OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -94,7 +112,9 @@ var_dump($c); echo "Test 10\n"; +$tt = microtime(true); $c = oci_new_connect('/', '', 'x.cz', null, OCI_SYSOPER+OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -107,36 +127,43 @@ var_dump($c); Test 1 Warning: oci_new_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d +elapsed: %d secs bool(false) bool(false) Test 2 Warning: oci_new_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d +elapsed: %d secs bool(false) bool(false) Test 3 Warning: oci_new_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d +elapsed: %d secs bool(false) bool(false) Test 4 Warning: oci_new_connect(): OCI_SYSDBA and OCI_SYSOPER cannot be used together in %s on line %d +elapsed: %d secs bool(false) bool(false) Test 5 Warning: oci_new_connect(): OCI_SYSDBA and OCI_SYSOPER cannot be used together in %s on line %d +elapsed: %d secs bool(false) bool(false) Test 6 Warning: oci_new_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d +elapsed: %d secs bool(false) bool(false) Test 7 Warning: oci_new_connect(): ORA-12154: %s in %s on line %d +elapsed: %d secs array(4) { ["code"]=> int(12154) @@ -151,6 +178,7 @@ bool(false) Test 8 Warning: oci_new_connect(): ORA-12154: %s in %s on line %d +elapsed: %d secs array(4) { ["code"]=> int(12154) @@ -165,6 +193,7 @@ bool(false) Test 9 Warning: oci_new_connect(): ORA-%d: TNS:%s %s on line %d +elapsed: %d secs array(4) { ["code"]=> int(%d) @@ -179,6 +208,7 @@ bool(false) Test 10 Warning: oci_new_connect(): ORA-%d: TNS:%s %s on line %d +elapsed: %d secs array(4) { ["code"]=> int(%d) diff --git a/ext/oci8/tests/extauth_03.phpt b/ext/oci8/tests/extauth_03.phpt index c6d39761db469..9f9abb3882f78 100644 --- a/ext/oci8/tests/extauth_03.phpt +++ b/ext/oci8/tests/extauth_03.phpt @@ -13,7 +13,9 @@ oci8.privileged_connect=1 echo "Test 1\n"; +$tt = microtime(true); $c = oci_pconnect('/', 'notemtpy', 'x.cz', null, OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -22,7 +24,9 @@ var_dump($c); echo "Test 2\n"; +$tt = microtime(true); $c = oci_pconnect('notemtpy', 'notemtpy', 'x.cz', null, OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -31,7 +35,9 @@ var_dump($c); echo "Test 3\n"; +$tt = microtime(true); $c = oci_pconnect('notemtpy', '', 'x.cz', null, OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -40,7 +46,9 @@ var_dump($c); echo "Test 4\n"; +$tt = microtime(true); $c = oci_pconnect('a', 'b', 'x.cz', null, OCI_SYSDBA+OCI_SYSOPER); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -49,7 +57,9 @@ var_dump($c); echo "Test 5\n"; +$tt = microtime(true); $c = oci_pconnect('a', 'b', 'x.cz', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -58,7 +68,9 @@ var_dump($c); echo "Test 6\n"; +$tt = microtime(true); $c = oci_pconnect('', '', 'x.cz', null, OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -67,7 +79,9 @@ var_dump($c); echo "Test 7\n"; +$tt = microtime(true); $c = oci_pconnect('/', '', 'x.cz', null, OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -76,7 +90,9 @@ var_dump($c); echo "Test 8\n"; +$tt = microtime(true); $c = oci_pconnect('/', null, 'x.cz', null, OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -85,7 +101,9 @@ var_dump($c); echo "Test 9\n"; +$tt = microtime(true); $c = oci_pconnect('/', '', 'x.cz', null, OCI_SYSDBA+OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -94,7 +112,9 @@ var_dump($c); echo "Test 10\n"; +$tt = microtime(true); $c = oci_pconnect('/', '', 'x.cz', null, OCI_SYSOPER+OCI_CRED_EXT); +echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); var_dump($m); @@ -107,36 +127,43 @@ var_dump($c); Test 1 Warning: oci_pconnect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d +elapsed: %d secs bool(false) bool(false) Test 2 Warning: oci_pconnect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d +elapsed: %d secs bool(false) bool(false) Test 3 Warning: oci_pconnect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d +elapsed: %d secs bool(false) bool(false) Test 4 Warning: oci_pconnect(): OCI_SYSDBA and OCI_SYSOPER cannot be used together in %s on line %d +elapsed: %d secs bool(false) bool(false) Test 5 Warning: oci_pconnect(): OCI_SYSDBA and OCI_SYSOPER cannot be used together in %s on line %d +elapsed: %d secs bool(false) bool(false) Test 6 Warning: oci_pconnect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d +elapsed: %d secs bool(false) bool(false) Test 7 Warning: oci_pconnect(): ORA-12154: %s in %s on line %d +elapsed: %d secs array(4) { ["code"]=> int(12154) @@ -151,6 +178,7 @@ bool(false) Test 8 Warning: oci_pconnect(): ORA-12154: %s in %s on line %d +elapsed: %d secs array(4) { ["code"]=> int(12154) @@ -165,6 +193,7 @@ bool(false) Test 9 Warning: oci_pconnect(): ORA-%d: TNS:%s in %s on line %d +elapsed: %d secs array(4) { ["code"]=> int(%d) @@ -179,6 +208,7 @@ bool(false) Test 10 Warning: oci_pconnect(): ORA-%d: TNS:%s in %s on line %d +elapsed: %d secs array(4) { ["code"]=> int(%d) diff --git a/ext/oci8/tests/lob_043.phpt b/ext/oci8/tests/lob_043.phpt deleted file mode 100644 index c0f8973dfd145..0000000000000 --- a/ext/oci8/tests/lob_043.phpt +++ /dev/null @@ -1,85 +0,0 @@ ---TEST-- -Bug #49560 (LOB resource destructor and refcount test) ---SKIPIF-- - true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); -if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); -?> ---FILE-- -load(), "\n"; - } -*/ - -// Clean up - -$stmtarray = array( - "drop table lob_043_tab" -); - -oci8_test_sql_execute($c, $stmtarray); - -oci_close($c); - -?> ---EXPECT-- -Test 1 -f1 ended -Test 2 -f2 ended diff --git a/ext/pdo_oci/tests/pdo_oci_attr_call_timeout.phpt b/ext/pdo_oci/tests/pdo_oci_attr_call_timeout.phpt deleted file mode 100644 index 31df15320ea6b..0000000000000 --- a/ext/pdo_oci/tests/pdo_oci_attr_call_timeout.phpt +++ /dev/null @@ -1,66 +0,0 @@ ---TEST-- -PDO_OCI: Attribute: Setting and using call timeout ---SKIPIF-- -getAttribute(PDO::ATTR_CLIENT_VERSION), $matches); -if (!(isset($matches[0]) && $matches[0] >= 18)) { - die("skip works only with Oracle 18c or greater version of Oracle client libraries"); -} - -?> ---FILE-- -prepare("begin dbms_lock.sleep(:t); end;"); - - if (!$stmt) { - $error = $dbh->errorInfo(); - echo "Prepare error was ", $error[2], "\n"; - return; - } - $stmt->bindParam(":t", $t, PDO::PARAM_INT); - - $r = $stmt->execute(); - if ($r) { - echo "Execute succeeded\n"; - } else { - $error = $dbh->errorInfo(); - echo "Execute error was ", $error[2], "\n"; - } -} - -$dbh = PDOTest::factory(); -$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT); - -echo "Test 1\n"; - -$dbh->setAttribute(PDO::OCI_ATTR_CALL_TIMEOUT, 4000); // milliseconds - -echo "call timeout:\n"; -var_dump($dbh->getAttribute(PDO::OCI_ATTR_CALL_TIMEOUT)); - -$r = mysleep($dbh, 8); // seconds - -?> -===DONE=== - ---EXPECTF-- -Test 1 -call timeout: -int(4000) -Execute error was OCIStmtExecute: ORA-%r(03136|03156)%r: %s - (%s:%d) -===DONE=== From 8ca49a69137ef019caeb7c3d918b88b8b303f1e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 10:20:09 +0200 Subject: [PATCH 17/29] DEBUG run all tests 4x --- .github/workflows/push.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index ef14eaf68a2a1..586c2e0e29af6 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -162,9 +162,21 @@ jobs: uses: ./.github/actions/install-linux - name: Setup uses: ./.github/actions/setup-x64 - - name: Test + - name: Test 1 uses: ./.github/actions/test-linux - - name: Test Tracing JIT + - name: Test 2 + uses: ./.github/actions/test-linux + - name: Test 3 + uses: ./.github/actions/test-linux + - name: Test 4 + uses: ./.github/actions/test-linux + - name: Test Tracing JIT 1 + uses: ./.github/actions/test-linux + - name: Test Tracing JIT 2 + uses: ./.github/actions/test-linux + - name: Test Tracing JIT 3 + uses: ./.github/actions/test-linux + - name: Test Tracing JIT 4 uses: ./.github/actions/test-linux with: runTestsParameters: >- From 4b93033dfbb50db09ab7e659f3f257d83cf2f077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 10:35:36 +0200 Subject: [PATCH 18/29] DEBUG fail + dump delay on 10+ secs --- ext/oci8/tests/extauth_01.phpt | 20 ++++++++++---------- ext/oci8/tests/extauth_02.phpt | 20 ++++++++++---------- ext/oci8/tests/extauth_03.phpt | 20 ++++++++++---------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/ext/oci8/tests/extauth_01.phpt b/ext/oci8/tests/extauth_01.phpt index c9ba2b7b0323e..3999db650ee27 100644 --- a/ext/oci8/tests/extauth_01.phpt +++ b/ext/oci8/tests/extauth_01.phpt @@ -127,43 +127,43 @@ var_dump($c); Test 1 Warning: oci_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d -elapsed: %d secs +elapsed: %c secs bool(false) bool(false) Test 2 Warning: oci_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d -elapsed: %d secs +elapsed: %c secs bool(false) bool(false) Test 3 Warning: oci_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d -elapsed: %d secs +elapsed: %c secs bool(false) bool(false) Test 4 Warning: oci_connect(): OCI_SYSDBA and OCI_SYSOPER cannot be used together in %s on line %d -elapsed: %d secs +elapsed: %c secs bool(false) bool(false) Test 5 Warning: oci_connect(): OCI_SYSDBA and OCI_SYSOPER cannot be used together in %s on line %d -elapsed: %d secs +elapsed: %c secs bool(false) bool(false) Test 6 Warning: oci_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d -elapsed: %d secs +elapsed: %c secs bool(false) bool(false) Test 7 Warning: oci_connect(): ORA-12154: %s in %s on line %d -elapsed: %d secs +elapsed: %c secs array(4) { ["code"]=> int(12154) @@ -178,7 +178,7 @@ bool(false) Test 8 Warning: oci_connect(): ORA-12154: %s in %s on line %d -elapsed: %d secs +elapsed: %c secs array(4) { ["code"]=> int(12154) @@ -193,7 +193,7 @@ bool(false) Test 9 Warning: oci_connect(): ORA-%d: TNS:%s in %s on line %d -elapsed: %d secs +elapsed: %c secs array(4) { ["code"]=> int(%d) @@ -208,7 +208,7 @@ bool(false) Test 10 Warning: oci_connect(): ORA-%d: TNS:%s in %s on line %d -elapsed: %d secs +elapsed: %c secs array(4) { ["code"]=> int(%d) diff --git a/ext/oci8/tests/extauth_02.phpt b/ext/oci8/tests/extauth_02.phpt index 57172ea1d0d0c..3ade18a195257 100644 --- a/ext/oci8/tests/extauth_02.phpt +++ b/ext/oci8/tests/extauth_02.phpt @@ -127,43 +127,43 @@ var_dump($c); Test 1 Warning: oci_new_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d -elapsed: %d secs +elapsed: %c secs bool(false) bool(false) Test 2 Warning: oci_new_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d -elapsed: %d secs +elapsed: %c secs bool(false) bool(false) Test 3 Warning: oci_new_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d -elapsed: %d secs +elapsed: %c secs bool(false) bool(false) Test 4 Warning: oci_new_connect(): OCI_SYSDBA and OCI_SYSOPER cannot be used together in %s on line %d -elapsed: %d secs +elapsed: %c secs bool(false) bool(false) Test 5 Warning: oci_new_connect(): OCI_SYSDBA and OCI_SYSOPER cannot be used together in %s on line %d -elapsed: %d secs +elapsed: %c secs bool(false) bool(false) Test 6 Warning: oci_new_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d -elapsed: %d secs +elapsed: %c secs bool(false) bool(false) Test 7 Warning: oci_new_connect(): ORA-12154: %s in %s on line %d -elapsed: %d secs +elapsed: %c secs array(4) { ["code"]=> int(12154) @@ -178,7 +178,7 @@ bool(false) Test 8 Warning: oci_new_connect(): ORA-12154: %s in %s on line %d -elapsed: %d secs +elapsed: %c secs array(4) { ["code"]=> int(12154) @@ -193,7 +193,7 @@ bool(false) Test 9 Warning: oci_new_connect(): ORA-%d: TNS:%s %s on line %d -elapsed: %d secs +elapsed: %c secs array(4) { ["code"]=> int(%d) @@ -208,7 +208,7 @@ bool(false) Test 10 Warning: oci_new_connect(): ORA-%d: TNS:%s %s on line %d -elapsed: %d secs +elapsed: %c secs array(4) { ["code"]=> int(%d) diff --git a/ext/oci8/tests/extauth_03.phpt b/ext/oci8/tests/extauth_03.phpt index 9f9abb3882f78..0787c0e2643fc 100644 --- a/ext/oci8/tests/extauth_03.phpt +++ b/ext/oci8/tests/extauth_03.phpt @@ -127,43 +127,43 @@ var_dump($c); Test 1 Warning: oci_pconnect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d -elapsed: %d secs +elapsed: %c secs bool(false) bool(false) Test 2 Warning: oci_pconnect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d -elapsed: %d secs +elapsed: %c secs bool(false) bool(false) Test 3 Warning: oci_pconnect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d -elapsed: %d secs +elapsed: %c secs bool(false) bool(false) Test 4 Warning: oci_pconnect(): OCI_SYSDBA and OCI_SYSOPER cannot be used together in %s on line %d -elapsed: %d secs +elapsed: %c secs bool(false) bool(false) Test 5 Warning: oci_pconnect(): OCI_SYSDBA and OCI_SYSOPER cannot be used together in %s on line %d -elapsed: %d secs +elapsed: %c secs bool(false) bool(false) Test 6 Warning: oci_pconnect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d -elapsed: %d secs +elapsed: %c secs bool(false) bool(false) Test 7 Warning: oci_pconnect(): ORA-12154: %s in %s on line %d -elapsed: %d secs +elapsed: %c secs array(4) { ["code"]=> int(12154) @@ -178,7 +178,7 @@ bool(false) Test 8 Warning: oci_pconnect(): ORA-12154: %s in %s on line %d -elapsed: %d secs +elapsed: %c secs array(4) { ["code"]=> int(12154) @@ -193,7 +193,7 @@ bool(false) Test 9 Warning: oci_pconnect(): ORA-%d: TNS:%s in %s on line %d -elapsed: %d secs +elapsed: %c secs array(4) { ["code"]=> int(%d) @@ -208,7 +208,7 @@ bool(false) Test 10 Warning: oci_pconnect(): ORA-%d: TNS:%s in %s on line %d -elapsed: %d secs +elapsed: %c secs array(4) { ["code"]=> int(%d) From a11bf80c81411c0241163c2db192f79e4b9ce56a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 11:59:25 +0200 Subject: [PATCH 19/29] use "sql1" host (MSSQL docker) everywhere --- .github/actions/setup-mssql/action.yml | 14 ++++++++++++++ .github/actions/setup-x64/action.yml | 1 + .github/workflows/push.yml | 2 ++ ext/oci8/tests/extauth_01.phpt | 20 ++++++++++---------- ext/oci8/tests/extauth_02.phpt | 20 ++++++++++---------- ext/oci8/tests/extauth_03.phpt | 20 ++++++++++---------- 6 files changed, 47 insertions(+), 30 deletions(-) create mode 100644 .github/actions/setup-mssql/action.yml diff --git a/.github/actions/setup-mssql/action.yml b/.github/actions/setup-mssql/action.yml new file mode 100644 index 0000000000000..c069744a21b59 --- /dev/null +++ b/.github/actions/setup-mssql/action.yml @@ -0,0 +1,14 @@ +name: Create MSSQL container +runs: + using: composite + steps: + - shell: bash + run: | + set -x + docker run \ + -e "ACCEPT_EULA=Y" \ + -e "SA_PASSWORD=" \ + -p 1433:1433 \ + --name sql1 \ + -h sql1 \ + -d mcr.microsoft.com/mssql/server:2019-CU8-ubuntu-16.04 diff --git a/.github/actions/setup-x64/action.yml b/.github/actions/setup-x64/action.yml index f5cf6473668fe..bb014bfe9de11 100644 --- a/.github/actions/setup-x64/action.yml +++ b/.github/actions/setup-x64/action.yml @@ -14,6 +14,7 @@ runs: mysql -uroot -proot -e "SET GLOBAL local_infile = true" sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';" sudo -u postgres psql -c "CREATE DATABASE test;" + docker exec sql1 /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U SA -P "" -Q "create login pdo_test with password='password', check_policy=off; create user pdo_test for login pdo_test; grant alter, control to pdo_test;" sudo locale-gen de_DE ./.github/scripts/setup-slapd.sh &>/dev/null diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 586c2e0e29af6..c3904b635fae8 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -146,6 +146,8 @@ jobs: steps: - name: git checkout uses: actions/checkout@v2 + - name: Create MSSQL container + uses: ./.github/actions/setup-mssql - name: Create Oracle container uses: ./.github/actions/setup-oracle - name: apt diff --git a/ext/oci8/tests/extauth_01.phpt b/ext/oci8/tests/extauth_01.phpt index 3999db650ee27..d622cc36d16ed 100644 --- a/ext/oci8/tests/extauth_01.phpt +++ b/ext/oci8/tests/extauth_01.phpt @@ -14,7 +14,7 @@ oci8.privileged_connect=1 echo "Test 1\n"; $tt = microtime(true); -$c = oci_connect('/', 'notemtpy', 'x.cz', null, OCI_CRED_EXT); +$c = oci_connect('/', 'notemtpy', 'sql1', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -25,7 +25,7 @@ var_dump($c); echo "Test 2\n"; $tt = microtime(true); -$c = oci_connect('notemtpy', 'notemtpy', 'x.cz', null, OCI_CRED_EXT); +$c = oci_connect('notemtpy', 'notemtpy', 'sql1', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -36,7 +36,7 @@ var_dump($c); echo "Test 3\n"; $tt = microtime(true); -$c = oci_connect('notemtpy', '', 'x.cz', null, OCI_CRED_EXT); +$c = oci_connect('notemtpy', '', 'sql1', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -47,7 +47,7 @@ var_dump($c); echo "Test 4\n"; $tt = microtime(true); -$c = oci_connect('a', 'b', 'x.cz', null, OCI_SYSDBA+OCI_SYSOPER); +$c = oci_connect('a', 'b', 'sql1', null, OCI_SYSDBA+OCI_SYSOPER); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -58,7 +58,7 @@ var_dump($c); echo "Test 5\n"; $tt = microtime(true); -$c = oci_connect('a', 'b', 'x.cz', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_connect('a', 'b', 'sql1', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -69,7 +69,7 @@ var_dump($c); echo "Test 6\n"; $tt = microtime(true); -$c = oci_connect('', '', 'x.cz', null, OCI_CRED_EXT); +$c = oci_connect('', '', 'sql1', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -80,7 +80,7 @@ var_dump($c); echo "Test 7\n"; $tt = microtime(true); -$c = oci_connect('/', '', 'x.cz', null, OCI_CRED_EXT); +$c = oci_connect('/', '', 'sql1', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -91,7 +91,7 @@ var_dump($c); echo "Test 8\n"; $tt = microtime(true); -$c = oci_connect('/', null, 'x.cz', null, OCI_CRED_EXT); +$c = oci_connect('/', null, 'sql1', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -102,7 +102,7 @@ var_dump($c); echo "Test 9\n"; $tt = microtime(true); -$c = oci_connect('/', '', 'x.cz', null, OCI_SYSDBA+OCI_CRED_EXT); +$c = oci_connect('/', '', 'sql1', null, OCI_SYSDBA+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -113,7 +113,7 @@ var_dump($c); echo "Test 10\n"; $tt = microtime(true); -$c = oci_connect('/', '', 'x.cz', null, OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_connect('/', '', 'sql1', null, OCI_SYSOPER+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); diff --git a/ext/oci8/tests/extauth_02.phpt b/ext/oci8/tests/extauth_02.phpt index 3ade18a195257..30899364e063a 100644 --- a/ext/oci8/tests/extauth_02.phpt +++ b/ext/oci8/tests/extauth_02.phpt @@ -14,7 +14,7 @@ oci8.privileged_connect=1 echo "Test 1\n"; $tt = microtime(true); -$c = oci_new_connect('/', 'notemtpy', 'x.cz', null, OCI_CRED_EXT); +$c = oci_new_connect('/', 'notemtpy', 'sql1', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -25,7 +25,7 @@ var_dump($c); echo "Test 2\n"; $tt = microtime(true); -$c = oci_new_connect('notemtpy', 'notemtpy', 'x.cz', null, OCI_CRED_EXT); +$c = oci_new_connect('notemtpy', 'notemtpy', 'sql1', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -36,7 +36,7 @@ var_dump($c); echo "Test 3\n"; $tt = microtime(true); -$c = oci_new_connect('notemtpy', '', 'x.cz', null, OCI_CRED_EXT); +$c = oci_new_connect('notemtpy', '', 'sql1', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -47,7 +47,7 @@ var_dump($c); echo "Test 4\n"; $tt = microtime(true); -$c = oci_new_connect('a', 'b', 'x.cz', null, OCI_SYSDBA+OCI_SYSOPER); +$c = oci_new_connect('a', 'b', 'sql1', null, OCI_SYSDBA+OCI_SYSOPER); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -58,7 +58,7 @@ var_dump($c); echo "Test 5\n"; $tt = microtime(true); -$c = oci_new_connect('a', 'b', 'x.cz', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_new_connect('a', 'b', 'sql1', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -69,7 +69,7 @@ var_dump($c); echo "Test 6\n"; $tt = microtime(true); -$c = oci_new_connect('', '', 'x.cz', null, OCI_CRED_EXT); +$c = oci_new_connect('', '', 'sql1', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -80,7 +80,7 @@ var_dump($c); echo "Test 7\n"; $tt = microtime(true); -$c = oci_new_connect('/', '', 'x.cz', null, OCI_CRED_EXT); +$c = oci_new_connect('/', '', 'sql1', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -91,7 +91,7 @@ var_dump($c); echo "Test 8\n"; $tt = microtime(true); -$c = oci_new_connect('/', null, 'x.cz', null, OCI_CRED_EXT); +$c = oci_new_connect('/', null, 'sql1', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -102,7 +102,7 @@ var_dump($c); echo "Test 9\n"; $tt = microtime(true); -$c = oci_new_connect('/', '', 'x.cz', null, OCI_SYSDBA+OCI_CRED_EXT); +$c = oci_new_connect('/', '', 'sql1', null, OCI_SYSDBA+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -113,7 +113,7 @@ var_dump($c); echo "Test 10\n"; $tt = microtime(true); -$c = oci_new_connect('/', '', 'x.cz', null, OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_new_connect('/', '', 'sql1', null, OCI_SYSOPER+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); diff --git a/ext/oci8/tests/extauth_03.phpt b/ext/oci8/tests/extauth_03.phpt index 0787c0e2643fc..9f2db4109b85d 100644 --- a/ext/oci8/tests/extauth_03.phpt +++ b/ext/oci8/tests/extauth_03.phpt @@ -14,7 +14,7 @@ oci8.privileged_connect=1 echo "Test 1\n"; $tt = microtime(true); -$c = oci_pconnect('/', 'notemtpy', 'x.cz', null, OCI_CRED_EXT); +$c = oci_pconnect('/', 'notemtpy', 'sql1', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -25,7 +25,7 @@ var_dump($c); echo "Test 2\n"; $tt = microtime(true); -$c = oci_pconnect('notemtpy', 'notemtpy', 'x.cz', null, OCI_CRED_EXT); +$c = oci_pconnect('notemtpy', 'notemtpy', 'sql1', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -36,7 +36,7 @@ var_dump($c); echo "Test 3\n"; $tt = microtime(true); -$c = oci_pconnect('notemtpy', '', 'x.cz', null, OCI_CRED_EXT); +$c = oci_pconnect('notemtpy', '', 'sql1', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -47,7 +47,7 @@ var_dump($c); echo "Test 4\n"; $tt = microtime(true); -$c = oci_pconnect('a', 'b', 'x.cz', null, OCI_SYSDBA+OCI_SYSOPER); +$c = oci_pconnect('a', 'b', 'sql1', null, OCI_SYSDBA+OCI_SYSOPER); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -58,7 +58,7 @@ var_dump($c); echo "Test 5\n"; $tt = microtime(true); -$c = oci_pconnect('a', 'b', 'x.cz', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_pconnect('a', 'b', 'sql1', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -69,7 +69,7 @@ var_dump($c); echo "Test 6\n"; $tt = microtime(true); -$c = oci_pconnect('', '', 'x.cz', null, OCI_CRED_EXT); +$c = oci_pconnect('', '', 'sql1', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -80,7 +80,7 @@ var_dump($c); echo "Test 7\n"; $tt = microtime(true); -$c = oci_pconnect('/', '', 'x.cz', null, OCI_CRED_EXT); +$c = oci_pconnect('/', '', 'sql1', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -91,7 +91,7 @@ var_dump($c); echo "Test 8\n"; $tt = microtime(true); -$c = oci_pconnect('/', null, 'x.cz', null, OCI_CRED_EXT); +$c = oci_pconnect('/', null, 'sql1', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -102,7 +102,7 @@ var_dump($c); echo "Test 9\n"; $tt = microtime(true); -$c = oci_pconnect('/', '', 'x.cz', null, OCI_SYSDBA+OCI_CRED_EXT); +$c = oci_pconnect('/', '', 'sql1', null, OCI_SYSDBA+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -113,7 +113,7 @@ var_dump($c); echo "Test 10\n"; $tt = microtime(true); -$c = oci_pconnect('/', '', 'x.cz', null, OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_pconnect('/', '', 'sql1', null, OCI_SYSOPER+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); From d86f02b75c6ebc99a42087e2679c82dc90f9856c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 19:16:30 +0200 Subject: [PATCH 20/29] anything?connect_timeout=60&transport_connect_timeout=30 --- ext/oci8/tests/extauth_01.phpt | 20 ++++++++++---------- ext/oci8/tests/extauth_02.phpt | 20 ++++++++++---------- ext/oci8/tests/extauth_03.phpt | 20 ++++++++++---------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/ext/oci8/tests/extauth_01.phpt b/ext/oci8/tests/extauth_01.phpt index d622cc36d16ed..e2358c19ec495 100644 --- a/ext/oci8/tests/extauth_01.phpt +++ b/ext/oci8/tests/extauth_01.phpt @@ -14,7 +14,7 @@ oci8.privileged_connect=1 echo "Test 1\n"; $tt = microtime(true); -$c = oci_connect('/', 'notemtpy', 'sql1', null, OCI_CRED_EXT); +$c = oci_connect('/', 'notemtpy', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -25,7 +25,7 @@ var_dump($c); echo "Test 2\n"; $tt = microtime(true); -$c = oci_connect('notemtpy', 'notemtpy', 'sql1', null, OCI_CRED_EXT); +$c = oci_connect('notemtpy', 'notemtpy', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -36,7 +36,7 @@ var_dump($c); echo "Test 3\n"; $tt = microtime(true); -$c = oci_connect('notemtpy', '', 'sql1', null, OCI_CRED_EXT); +$c = oci_connect('notemtpy', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -47,7 +47,7 @@ var_dump($c); echo "Test 4\n"; $tt = microtime(true); -$c = oci_connect('a', 'b', 'sql1', null, OCI_SYSDBA+OCI_SYSOPER); +$c = oci_connect('a', 'b', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_SYSDBA+OCI_SYSOPER); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -58,7 +58,7 @@ var_dump($c); echo "Test 5\n"; $tt = microtime(true); -$c = oci_connect('a', 'b', 'sql1', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_connect('a', 'b', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -69,7 +69,7 @@ var_dump($c); echo "Test 6\n"; $tt = microtime(true); -$c = oci_connect('', '', 'sql1', null, OCI_CRED_EXT); +$c = oci_connect('', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -80,7 +80,7 @@ var_dump($c); echo "Test 7\n"; $tt = microtime(true); -$c = oci_connect('/', '', 'sql1', null, OCI_CRED_EXT); +$c = oci_connect('/', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -91,7 +91,7 @@ var_dump($c); echo "Test 8\n"; $tt = microtime(true); -$c = oci_connect('/', null, 'sql1', null, OCI_CRED_EXT); +$c = oci_connect('/', null, 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -102,7 +102,7 @@ var_dump($c); echo "Test 9\n"; $tt = microtime(true); -$c = oci_connect('/', '', 'sql1', null, OCI_SYSDBA+OCI_CRED_EXT); +$c = oci_connect('/', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_SYSDBA+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -113,7 +113,7 @@ var_dump($c); echo "Test 10\n"; $tt = microtime(true); -$c = oci_connect('/', '', 'sql1', null, OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_connect('/', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_SYSOPER+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); diff --git a/ext/oci8/tests/extauth_02.phpt b/ext/oci8/tests/extauth_02.phpt index 30899364e063a..452d2f2635ede 100644 --- a/ext/oci8/tests/extauth_02.phpt +++ b/ext/oci8/tests/extauth_02.phpt @@ -14,7 +14,7 @@ oci8.privileged_connect=1 echo "Test 1\n"; $tt = microtime(true); -$c = oci_new_connect('/', 'notemtpy', 'sql1', null, OCI_CRED_EXT); +$c = oci_new_connect('/', 'notemtpy', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -25,7 +25,7 @@ var_dump($c); echo "Test 2\n"; $tt = microtime(true); -$c = oci_new_connect('notemtpy', 'notemtpy', 'sql1', null, OCI_CRED_EXT); +$c = oci_new_connect('notemtpy', 'notemtpy', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -36,7 +36,7 @@ var_dump($c); echo "Test 3\n"; $tt = microtime(true); -$c = oci_new_connect('notemtpy', '', 'sql1', null, OCI_CRED_EXT); +$c = oci_new_connect('notemtpy', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -47,7 +47,7 @@ var_dump($c); echo "Test 4\n"; $tt = microtime(true); -$c = oci_new_connect('a', 'b', 'sql1', null, OCI_SYSDBA+OCI_SYSOPER); +$c = oci_new_connect('a', 'b', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_SYSDBA+OCI_SYSOPER); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -58,7 +58,7 @@ var_dump($c); echo "Test 5\n"; $tt = microtime(true); -$c = oci_new_connect('a', 'b', 'sql1', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_new_connect('a', 'b', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -69,7 +69,7 @@ var_dump($c); echo "Test 6\n"; $tt = microtime(true); -$c = oci_new_connect('', '', 'sql1', null, OCI_CRED_EXT); +$c = oci_new_connect('', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -80,7 +80,7 @@ var_dump($c); echo "Test 7\n"; $tt = microtime(true); -$c = oci_new_connect('/', '', 'sql1', null, OCI_CRED_EXT); +$c = oci_new_connect('/', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -91,7 +91,7 @@ var_dump($c); echo "Test 8\n"; $tt = microtime(true); -$c = oci_new_connect('/', null, 'sql1', null, OCI_CRED_EXT); +$c = oci_new_connect('/', null, 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -102,7 +102,7 @@ var_dump($c); echo "Test 9\n"; $tt = microtime(true); -$c = oci_new_connect('/', '', 'sql1', null, OCI_SYSDBA+OCI_CRED_EXT); +$c = oci_new_connect('/', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_SYSDBA+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -113,7 +113,7 @@ var_dump($c); echo "Test 10\n"; $tt = microtime(true); -$c = oci_new_connect('/', '', 'sql1', null, OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_new_connect('/', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_SYSOPER+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); diff --git a/ext/oci8/tests/extauth_03.phpt b/ext/oci8/tests/extauth_03.phpt index 9f2db4109b85d..20101324fb030 100644 --- a/ext/oci8/tests/extauth_03.phpt +++ b/ext/oci8/tests/extauth_03.phpt @@ -14,7 +14,7 @@ oci8.privileged_connect=1 echo "Test 1\n"; $tt = microtime(true); -$c = oci_pconnect('/', 'notemtpy', 'sql1', null, OCI_CRED_EXT); +$c = oci_pconnect('/', 'notemtpy', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -25,7 +25,7 @@ var_dump($c); echo "Test 2\n"; $tt = microtime(true); -$c = oci_pconnect('notemtpy', 'notemtpy', 'sql1', null, OCI_CRED_EXT); +$c = oci_pconnect('notemtpy', 'notemtpy', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -36,7 +36,7 @@ var_dump($c); echo "Test 3\n"; $tt = microtime(true); -$c = oci_pconnect('notemtpy', '', 'sql1', null, OCI_CRED_EXT); +$c = oci_pconnect('notemtpy', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -47,7 +47,7 @@ var_dump($c); echo "Test 4\n"; $tt = microtime(true); -$c = oci_pconnect('a', 'b', 'sql1', null, OCI_SYSDBA+OCI_SYSOPER); +$c = oci_pconnect('a', 'b', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_SYSDBA+OCI_SYSOPER); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -58,7 +58,7 @@ var_dump($c); echo "Test 5\n"; $tt = microtime(true); -$c = oci_pconnect('a', 'b', 'sql1', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_pconnect('a', 'b', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -69,7 +69,7 @@ var_dump($c); echo "Test 6\n"; $tt = microtime(true); -$c = oci_pconnect('', '', 'sql1', null, OCI_CRED_EXT); +$c = oci_pconnect('', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -80,7 +80,7 @@ var_dump($c); echo "Test 7\n"; $tt = microtime(true); -$c = oci_pconnect('/', '', 'sql1', null, OCI_CRED_EXT); +$c = oci_pconnect('/', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -91,7 +91,7 @@ var_dump($c); echo "Test 8\n"; $tt = microtime(true); -$c = oci_pconnect('/', null, 'sql1', null, OCI_CRED_EXT); +$c = oci_pconnect('/', null, 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -102,7 +102,7 @@ var_dump($c); echo "Test 9\n"; $tt = microtime(true); -$c = oci_pconnect('/', '', 'sql1', null, OCI_SYSDBA+OCI_CRED_EXT); +$c = oci_pconnect('/', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_SYSDBA+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -113,7 +113,7 @@ var_dump($c); echo "Test 10\n"; $tt = microtime(true); -$c = oci_pconnect('/', '', 'sql1', null, OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_pconnect('/', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_SYSOPER+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); From 30786fe766fed3793c5a8f1b50ecf4c7c86fda00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 19:43:12 +0200 Subject: [PATCH 21/29] anything?connect_timeout=6&transport_connect_timeout=3 --- ext/oci8/tests/extauth_01.phpt | 20 ++++++++++---------- ext/oci8/tests/extauth_02.phpt | 20 ++++++++++---------- ext/oci8/tests/extauth_03.phpt | 20 ++++++++++---------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/ext/oci8/tests/extauth_01.phpt b/ext/oci8/tests/extauth_01.phpt index e2358c19ec495..696f2290edcb5 100644 --- a/ext/oci8/tests/extauth_01.phpt +++ b/ext/oci8/tests/extauth_01.phpt @@ -14,7 +14,7 @@ oci8.privileged_connect=1 echo "Test 1\n"; $tt = microtime(true); -$c = oci_connect('/', 'notemtpy', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); +$c = oci_connect('/', 'notemtpy', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -25,7 +25,7 @@ var_dump($c); echo "Test 2\n"; $tt = microtime(true); -$c = oci_connect('notemtpy', 'notemtpy', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); +$c = oci_connect('notemtpy', 'notemtpy', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -36,7 +36,7 @@ var_dump($c); echo "Test 3\n"; $tt = microtime(true); -$c = oci_connect('notemtpy', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); +$c = oci_connect('notemtpy', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -47,7 +47,7 @@ var_dump($c); echo "Test 4\n"; $tt = microtime(true); -$c = oci_connect('a', 'b', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_SYSDBA+OCI_SYSOPER); +$c = oci_connect('a', 'b', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_SYSDBA+OCI_SYSOPER); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -58,7 +58,7 @@ var_dump($c); echo "Test 5\n"; $tt = microtime(true); -$c = oci_connect('a', 'b', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_connect('a', 'b', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -69,7 +69,7 @@ var_dump($c); echo "Test 6\n"; $tt = microtime(true); -$c = oci_connect('', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); +$c = oci_connect('', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -80,7 +80,7 @@ var_dump($c); echo "Test 7\n"; $tt = microtime(true); -$c = oci_connect('/', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); +$c = oci_connect('/', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -91,7 +91,7 @@ var_dump($c); echo "Test 8\n"; $tt = microtime(true); -$c = oci_connect('/', null, 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); +$c = oci_connect('/', null, 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -102,7 +102,7 @@ var_dump($c); echo "Test 9\n"; $tt = microtime(true); -$c = oci_connect('/', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_SYSDBA+OCI_CRED_EXT); +$c = oci_connect('/', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_SYSDBA+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -113,7 +113,7 @@ var_dump($c); echo "Test 10\n"; $tt = microtime(true); -$c = oci_connect('/', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_connect('/', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_SYSOPER+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); diff --git a/ext/oci8/tests/extauth_02.phpt b/ext/oci8/tests/extauth_02.phpt index 452d2f2635ede..f8a3fef5534d2 100644 --- a/ext/oci8/tests/extauth_02.phpt +++ b/ext/oci8/tests/extauth_02.phpt @@ -14,7 +14,7 @@ oci8.privileged_connect=1 echo "Test 1\n"; $tt = microtime(true); -$c = oci_new_connect('/', 'notemtpy', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); +$c = oci_new_connect('/', 'notemtpy', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -25,7 +25,7 @@ var_dump($c); echo "Test 2\n"; $tt = microtime(true); -$c = oci_new_connect('notemtpy', 'notemtpy', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); +$c = oci_new_connect('notemtpy', 'notemtpy', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -36,7 +36,7 @@ var_dump($c); echo "Test 3\n"; $tt = microtime(true); -$c = oci_new_connect('notemtpy', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); +$c = oci_new_connect('notemtpy', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -47,7 +47,7 @@ var_dump($c); echo "Test 4\n"; $tt = microtime(true); -$c = oci_new_connect('a', 'b', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_SYSDBA+OCI_SYSOPER); +$c = oci_new_connect('a', 'b', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_SYSDBA+OCI_SYSOPER); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -58,7 +58,7 @@ var_dump($c); echo "Test 5\n"; $tt = microtime(true); -$c = oci_new_connect('a', 'b', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_new_connect('a', 'b', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -69,7 +69,7 @@ var_dump($c); echo "Test 6\n"; $tt = microtime(true); -$c = oci_new_connect('', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); +$c = oci_new_connect('', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -80,7 +80,7 @@ var_dump($c); echo "Test 7\n"; $tt = microtime(true); -$c = oci_new_connect('/', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); +$c = oci_new_connect('/', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -91,7 +91,7 @@ var_dump($c); echo "Test 8\n"; $tt = microtime(true); -$c = oci_new_connect('/', null, 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); +$c = oci_new_connect('/', null, 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -102,7 +102,7 @@ var_dump($c); echo "Test 9\n"; $tt = microtime(true); -$c = oci_new_connect('/', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_SYSDBA+OCI_CRED_EXT); +$c = oci_new_connect('/', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_SYSDBA+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -113,7 +113,7 @@ var_dump($c); echo "Test 10\n"; $tt = microtime(true); -$c = oci_new_connect('/', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_new_connect('/', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_SYSOPER+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); diff --git a/ext/oci8/tests/extauth_03.phpt b/ext/oci8/tests/extauth_03.phpt index 20101324fb030..698d97c478682 100644 --- a/ext/oci8/tests/extauth_03.phpt +++ b/ext/oci8/tests/extauth_03.phpt @@ -14,7 +14,7 @@ oci8.privileged_connect=1 echo "Test 1\n"; $tt = microtime(true); -$c = oci_pconnect('/', 'notemtpy', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); +$c = oci_pconnect('/', 'notemtpy', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -25,7 +25,7 @@ var_dump($c); echo "Test 2\n"; $tt = microtime(true); -$c = oci_pconnect('notemtpy', 'notemtpy', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); +$c = oci_pconnect('notemtpy', 'notemtpy', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -36,7 +36,7 @@ var_dump($c); echo "Test 3\n"; $tt = microtime(true); -$c = oci_pconnect('notemtpy', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); +$c = oci_pconnect('notemtpy', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -47,7 +47,7 @@ var_dump($c); echo "Test 4\n"; $tt = microtime(true); -$c = oci_pconnect('a', 'b', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_SYSDBA+OCI_SYSOPER); +$c = oci_pconnect('a', 'b', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_SYSDBA+OCI_SYSOPER); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -58,7 +58,7 @@ var_dump($c); echo "Test 5\n"; $tt = microtime(true); -$c = oci_pconnect('a', 'b', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_pconnect('a', 'b', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -69,7 +69,7 @@ var_dump($c); echo "Test 6\n"; $tt = microtime(true); -$c = oci_pconnect('', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); +$c = oci_pconnect('', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -80,7 +80,7 @@ var_dump($c); echo "Test 7\n"; $tt = microtime(true); -$c = oci_pconnect('/', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); +$c = oci_pconnect('/', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -91,7 +91,7 @@ var_dump($c); echo "Test 8\n"; $tt = microtime(true); -$c = oci_pconnect('/', null, 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_CRED_EXT); +$c = oci_pconnect('/', null, 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -102,7 +102,7 @@ var_dump($c); echo "Test 9\n"; $tt = microtime(true); -$c = oci_pconnect('/', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_SYSDBA+OCI_CRED_EXT); +$c = oci_pconnect('/', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_SYSDBA+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); @@ -113,7 +113,7 @@ var_dump($c); echo "Test 10\n"; $tt = microtime(true); -$c = oci_pconnect('/', '', 'anything?connect_timeout=60&transport_connect_timeout=30', null, OCI_SYSOPER+OCI_CRED_EXT); +$c = oci_pconnect('/', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_SYSOPER+OCI_CRED_EXT); echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; if (!$c) { $m = oci_error(); From 0a9dc032cf70aaf9db1d2476aa71ff702c24ec6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 00:10:25 +0200 Subject: [PATCH 22/29] Revert "DEBUG run 2x 20 tests" This reverts commit 77663d2c5a387b7bae42bb8779720cd149ecef67. --- .github/workflows/push.yml | 117 ------------------------------------- 1 file changed, 117 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index c3904b635fae8..191a39f723538 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -22,125 +22,8 @@ jobs: include: - debug: true zts: false - i: 0 - - debug: true - zts: false - i: 1 - - debug: true - zts: false - i: 2 - - debug: true - zts: false - i: 3 - - debug: true - zts: false - i: 4 - - debug: true - zts: false - i: 5 - - debug: true - zts: false - i: 6 - - debug: true - zts: false - i: 7 - - debug: true - zts: false - i: 8 - - debug: true - zts: false - i: 9 - - debug: true - zts: false - i: 10 - - debug: true - zts: false - i: 11 - - debug: true - zts: false - i: 12 - - debug: true - zts: false - i: 13 - - debug: true - zts: false - i: 14 - - debug: true - zts: false - i: 15 - - debug: true - zts: false - i: 16 - - debug: true - zts: false - i: 17 - - debug: true - zts: false - i: 18 - - debug: true - zts: false - i: 19 - - - debug: false - zts: true - i: 0 - - debug: false - zts: true - i: 1 - - debug: false - zts: true - i: 2 - - debug: false - zts: true - i: 3 - - debug: false - zts: true - i: 4 - - debug: false - zts: true - i: 5 - - debug: false - zts: true - i: 6 - - debug: false - zts: true - i: 7 - - debug: false - zts: true - i: 8 - - debug: false - zts: true - i: 9 - - debug: false - zts: true - i: 10 - - debug: false - zts: true - i: 11 - - debug: false - zts: true - i: 12 - - debug: false - zts: true - i: 13 - - debug: false - zts: true - i: 14 - - debug: false - zts: true - i: 15 - - debug: false - zts: true - i: 16 - - debug: false - zts: true - i: 17 - - debug: false - zts: true - i: 18 - debug: false zts: true - i: 19 name: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}" runs-on: ubuntu-20.04 steps: From 6e2bb7e3cfd1af4bbaffed9267f313e415c0ed9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 19:49:29 +0200 Subject: [PATCH 23/29] strace extauth test --- .github/actions/apt-x64/action.yml | 1 + .github/actions/test-linux/action.yml | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/actions/apt-x64/action.yml b/.github/actions/apt-x64/action.yml index abae59c8fdea4..c0ac4ba0e48af 100644 --- a/.github/actions/apt-x64/action.yml +++ b/.github/actions/apt-x64/action.yml @@ -14,6 +14,7 @@ runs: ldap-utils \ openssl \ slapd \ + strace \ language-pack-de \ libgmp-dev \ libicu-dev \ diff --git a/.github/actions/test-linux/action.yml b/.github/actions/test-linux/action.yml index eeed8808345b0..f4f14746f53ac 100644 --- a/.github/actions/test-linux/action.yml +++ b/.github/actions/test-linux/action.yml @@ -24,10 +24,4 @@ runs: export PDO_OCI_TEST_PASS="pass" export PDO_OCI_TEST_DSN="oci:dbname=localhost/XEPDB1;charset=AL32UTF8" export SKIP_IO_CAPTURE_TESTS=1 - sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \ - -j1 \ - -g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP \ - --offline \ - --show-diff \ - --show-slow 1000 \ - --set-timeout 1200 + strace -t sapi/cli/php ext/oci8/tests/extauth_02.phpt From f509e3872885ee56330f0f154fb3fae896066422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 00:10:25 +0200 Subject: [PATCH 24/29] Revert "Revert "DEBUG run 2x 20 tests"" This reverts commit 0a9dc032cf70aaf9db1d2476aa71ff702c24ec6b. --- .github/workflows/push.yml | 117 +++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 191a39f723538..c3904b635fae8 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -22,8 +22,125 @@ jobs: include: - debug: true zts: false + i: 0 + - debug: true + zts: false + i: 1 + - debug: true + zts: false + i: 2 + - debug: true + zts: false + i: 3 + - debug: true + zts: false + i: 4 + - debug: true + zts: false + i: 5 + - debug: true + zts: false + i: 6 + - debug: true + zts: false + i: 7 + - debug: true + zts: false + i: 8 + - debug: true + zts: false + i: 9 + - debug: true + zts: false + i: 10 + - debug: true + zts: false + i: 11 + - debug: true + zts: false + i: 12 + - debug: true + zts: false + i: 13 + - debug: true + zts: false + i: 14 + - debug: true + zts: false + i: 15 + - debug: true + zts: false + i: 16 + - debug: true + zts: false + i: 17 + - debug: true + zts: false + i: 18 + - debug: true + zts: false + i: 19 + + - debug: false + zts: true + i: 0 + - debug: false + zts: true + i: 1 + - debug: false + zts: true + i: 2 + - debug: false + zts: true + i: 3 + - debug: false + zts: true + i: 4 + - debug: false + zts: true + i: 5 + - debug: false + zts: true + i: 6 + - debug: false + zts: true + i: 7 + - debug: false + zts: true + i: 8 + - debug: false + zts: true + i: 9 + - debug: false + zts: true + i: 10 + - debug: false + zts: true + i: 11 + - debug: false + zts: true + i: 12 + - debug: false + zts: true + i: 13 + - debug: false + zts: true + i: 14 + - debug: false + zts: true + i: 15 + - debug: false + zts: true + i: 16 + - debug: false + zts: true + i: 17 + - debug: false + zts: true + i: 18 - debug: false zts: true + i: 19 name: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}" runs-on: ubuntu-20.04 steps: From a0ab11293dad2d9266ec70e408f9830d7f17f3d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 20:46:33 +0200 Subject: [PATCH 25/29] ltrace -fS --- .github/actions/apt-x64/action.yml | 1 + .github/actions/test-linux/action.yml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/actions/apt-x64/action.yml b/.github/actions/apt-x64/action.yml index c0ac4ba0e48af..5864a793ea568 100644 --- a/.github/actions/apt-x64/action.yml +++ b/.github/actions/apt-x64/action.yml @@ -15,6 +15,7 @@ runs: openssl \ slapd \ strace \ + ltrace \ language-pack-de \ libgmp-dev \ libicu-dev \ diff --git a/.github/actions/test-linux/action.yml b/.github/actions/test-linux/action.yml index f4f14746f53ac..56cd50b247618 100644 --- a/.github/actions/test-linux/action.yml +++ b/.github/actions/test-linux/action.yml @@ -24,4 +24,5 @@ runs: export PDO_OCI_TEST_PASS="pass" export PDO_OCI_TEST_DSN="oci:dbname=localhost/XEPDB1;charset=AL32UTF8" export SKIP_IO_CAPTURE_TESTS=1 - strace -t sapi/cli/php ext/oci8/tests/extauth_02.phpt + ltrace -fS -t sapi/cli/php ext/oci8/tests/extauth_02.phpt + ltrace -fS -t sapi/cli/php ext/oci8/tests/extauth_02.phpt From a5fc4e914fe4b48d2b083e457deb382492ee0db0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 20:47:13 +0200 Subject: [PATCH 26/29] strace -k --- .github/actions/test-linux/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/test-linux/action.yml b/.github/actions/test-linux/action.yml index 56cd50b247618..2b316e43bda91 100644 --- a/.github/actions/test-linux/action.yml +++ b/.github/actions/test-linux/action.yml @@ -24,5 +24,5 @@ runs: export PDO_OCI_TEST_PASS="pass" export PDO_OCI_TEST_DSN="oci:dbname=localhost/XEPDB1;charset=AL32UTF8" export SKIP_IO_CAPTURE_TESTS=1 - ltrace -fS -t sapi/cli/php ext/oci8/tests/extauth_02.phpt - ltrace -fS -t sapi/cli/php ext/oci8/tests/extauth_02.phpt + strace -k -t sapi/cli/php ext/oci8/tests/extauth_02.phpt + strace -k -t sapi/cli/php ext/oci8/tests/extauth_02.phpt From bad65035766849a9e226f5a2a8c158d385322ac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 22:45:05 +0200 Subject: [PATCH 27/29] revert all --- .github/actions/apt-x64/action.yml | 2 - .github/actions/configure-x64/action.yml | 25 +++ .github/actions/test-linux/action.yml | 9 +- .github/workflows/push.yml | 171 ++++-------------- ext/oci8/tests/bug42496_1.phpt | 57 ++++++ ext/oci8/tests/bug42496_2.phpt | 55 ++++++ ext/oci8/tests/bug44113.phpt | 48 +++++ ext/oci8/tests/calltimeout1.phpt | 48 +++++ ext/oci8/tests/extauth_01.phpt | 50 +---- ext/oci8/tests/extauth_02.phpt | 50 +---- ext/oci8/tests/extauth_03.phpt | 50 +---- ext/oci8/tests/lob_043.phpt | 85 +++++++++ .../tests/pdo_oci_attr_call_timeout.phpt | 66 +++++++ run-tests.php | 2 +- 14 files changed, 460 insertions(+), 258 deletions(-) create mode 100644 ext/oci8/tests/bug42496_1.phpt create mode 100644 ext/oci8/tests/bug42496_2.phpt create mode 100644 ext/oci8/tests/bug44113.phpt create mode 100644 ext/oci8/tests/calltimeout1.phpt create mode 100644 ext/oci8/tests/lob_043.phpt create mode 100644 ext/pdo_oci/tests/pdo_oci_attr_call_timeout.phpt diff --git a/.github/actions/apt-x64/action.yml b/.github/actions/apt-x64/action.yml index 5864a793ea568..abae59c8fdea4 100644 --- a/.github/actions/apt-x64/action.yml +++ b/.github/actions/apt-x64/action.yml @@ -14,8 +14,6 @@ runs: ldap-utils \ openssl \ slapd \ - strace \ - ltrace \ language-pack-de \ libgmp-dev \ libicu-dev \ diff --git a/.github/actions/configure-x64/action.yml b/.github/actions/configure-x64/action.yml index 4f394859f1769..73ce6322d25af 100644 --- a/.github/actions/configure-x64/action.yml +++ b/.github/actions/configure-x64/action.yml @@ -15,11 +15,26 @@ runs: --prefix=/usr \ --enable-phpdbg \ --enable-fpm \ + --with-pdo-mysql=mysqlnd \ + --with-mysqli=mysqlnd \ + --with-pgsql \ + --with-pdo-pgsql \ --with-pdo-sqlite \ + --enable-intl \ --without-pear \ + --enable-gd \ + --with-jpeg \ + --with-webp \ + --with-freetype \ + --with-xpm \ + --enable-exif \ + --with-zip \ --with-zlib \ --with-zlib-dir=/usr \ + --enable-soap \ --enable-xmlreader \ + --with-xsl \ + --with-tidy \ --enable-sysvsem \ --enable-sysvshm \ --enable-shmop \ @@ -31,7 +46,11 @@ runs: --enable-sockets \ --with-bz2 \ --with-openssl \ + --with-gmp \ --enable-bcmath \ + --enable-calendar \ + --enable-ftp \ + --with-pspell=/usr \ --with-enchant=/usr \ --with-kerberos \ --enable-sysvmsg \ @@ -41,6 +60,7 @@ runs: --with-ldap-sasl \ --with-password-argon2 \ --with-mhash \ + --with-sodium \ --enable-dba \ --with-cdb \ --enable-flatfile \ @@ -49,6 +69,11 @@ runs: --with-lmdb \ --with-qdbm \ --with-snmp \ + --with-unixODBC \ + --with-imap \ + --with-kerberos \ + --with-imap-ssl \ + --with-pdo-odbc=unixODBC,/usr \ --with-pdo-oci=shared,instantclient,/opt/oracle/instantclient \ --with-oci8=shared,instantclient,/opt/oracle/instantclient \ --with-config-file-path=/etc \ diff --git a/.github/actions/test-linux/action.yml b/.github/actions/test-linux/action.yml index 2b316e43bda91..7db8fa58900d3 100644 --- a/.github/actions/test-linux/action.yml +++ b/.github/actions/test-linux/action.yml @@ -24,5 +24,10 @@ runs: export PDO_OCI_TEST_PASS="pass" export PDO_OCI_TEST_DSN="oci:dbname=localhost/XEPDB1;charset=AL32UTF8" export SKIP_IO_CAPTURE_TESTS=1 - strace -k -t sapi/cli/php ext/oci8/tests/extauth_02.phpt - strace -k -t sapi/cli/php ext/oci8/tests/extauth_02.phpt + sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \ + -j$(/usr/bin/nproc) \ + -g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP \ + --offline \ + --show-diff \ + --show-slow 1000 \ + --set-timeout 120 diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index c3904b635fae8..520a701a0de43 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -10,7 +10,10 @@ on: - CONTRIBUTING.md - CODING_STANDARDS.md branches: - - '**' + - PHP-7.4 + - PHP-8.0 + - PHP-8.1 + - master pull_request: branches: - '**' @@ -22,125 +25,8 @@ jobs: include: - debug: true zts: false - i: 0 - - debug: true - zts: false - i: 1 - - debug: true - zts: false - i: 2 - - debug: true - zts: false - i: 3 - - debug: true - zts: false - i: 4 - - debug: true - zts: false - i: 5 - - debug: true - zts: false - i: 6 - - debug: true - zts: false - i: 7 - - debug: true - zts: false - i: 8 - - debug: true - zts: false - i: 9 - - debug: true - zts: false - i: 10 - - debug: true - zts: false - i: 11 - - debug: true - zts: false - i: 12 - - debug: true - zts: false - i: 13 - - debug: true - zts: false - i: 14 - - debug: true - zts: false - i: 15 - - debug: true - zts: false - i: 16 - - debug: true - zts: false - i: 17 - - debug: true - zts: false - i: 18 - - debug: true - zts: false - i: 19 - - - debug: false - zts: true - i: 0 - - debug: false - zts: true - i: 1 - - debug: false - zts: true - i: 2 - - debug: false - zts: true - i: 3 - debug: false zts: true - i: 4 - - debug: false - zts: true - i: 5 - - debug: false - zts: true - i: 6 - - debug: false - zts: true - i: 7 - - debug: false - zts: true - i: 8 - - debug: false - zts: true - i: 9 - - debug: false - zts: true - i: 10 - - debug: false - zts: true - i: 11 - - debug: false - zts: true - i: 12 - - debug: false - zts: true - i: 13 - - debug: false - zts: true - i: 14 - - debug: false - zts: true - i: 15 - - debug: false - zts: true - i: 16 - - debug: false - zts: true - i: 17 - - debug: false - zts: true - i: 18 - - debug: false - zts: true - i: 19 name: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}" runs-on: ubuntu-20.04 steps: @@ -164,24 +50,43 @@ jobs: uses: ./.github/actions/install-linux - name: Setup uses: ./.github/actions/setup-x64 - - name: Test 1 - uses: ./.github/actions/test-linux - - name: Test 2 - uses: ./.github/actions/test-linux - - name: Test 3 - uses: ./.github/actions/test-linux - - name: Test 4 - uses: ./.github/actions/test-linux - - name: Test Tracing JIT 1 - uses: ./.github/actions/test-linux - - name: Test Tracing JIT 2 - uses: ./.github/actions/test-linux - - name: Test Tracing JIT 3 + - name: Test uses: ./.github/actions/test-linux - - name: Test Tracing JIT 4 + - name: Test Tracing JIT uses: ./.github/actions/test-linux with: runTestsParameters: >- -d zend_extension=opcache.so -d opcache.enable_cli=1 - -d opcache.jit_buffer_size=16M \ No newline at end of file + -d opcache.jit_buffer_size=16M + - name: Verify generated files are up to date + uses: ./.github/actions/verify-generated-files + MACOS_DEBUG_NTS: + runs-on: macos-11 + steps: + - name: git checkout + uses: actions/checkout@v2 + - name: brew + uses: ./.github/actions/brew + - name: ./configure + uses: ./.github/actions/configure-macos + with: + configurationParameters: --enable-debug --disable-zts + - name: make + run: |- + export PATH="/usr/local/opt/bison/bin:$PATH" + make -j$(sysctl -n hw.logicalcpu) >/dev/null + - name: make install + run: sudo make install + - name: Test + uses: ./.github/actions/test-macos + - name: Test Tracing JIT + uses: ./.github/actions/test-macos + with: + runTestsParameters: >- + -d zend_extension=opcache.so + -d opcache.enable_cli=1 + -d opcache.protect_memory=1 + -d opcache.jit_buffer_size=16M + - name: Verify generated files are up to date + uses: ./.github/actions/verify-generated-files diff --git a/ext/oci8/tests/bug42496_1.phpt b/ext/oci8/tests/bug42496_1.phpt new file mode 100644 index 0000000000000..9db7d720e9f14 --- /dev/null +++ b/ext/oci8/tests/bug42496_1.phpt @@ -0,0 +1,57 @@ +--TEST-- +Bug #42496 (LOB fetch leaks cursors, eventually failing with ORA-1000 maximum open cursors reached) +--SKIPIF-- + true, 'timesten' => false); // test runs on these DBs +require(__DIR__.'/skipif.inc'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); +?> +--FILE-- +free(); + $arr['C2']->free(); + } + } + oci_free_statement($s); +} + +echo "Done\n"; + +// Cleanup + +$stmtarray = array( + "DROP table bug42496_1_tab" +); + +oci8_test_sql_execute($c, $stmtarray); + +?> +--EXPECT-- +Test 1 +Done diff --git a/ext/oci8/tests/bug42496_2.phpt b/ext/oci8/tests/bug42496_2.phpt new file mode 100644 index 0000000000000..52c42f8bcfdd0 --- /dev/null +++ b/ext/oci8/tests/bug42496_2.phpt @@ -0,0 +1,55 @@ +--TEST-- +Bug #42496 (LOB fetch leaks cursors, eventually failing with ORA-1000 maximum open cursors reached) +--SKIPIF-- + true, 'timesten' => false); // test runs on these DBs +require(__DIR__.'/skipif.inc'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); +?> +--FILE-- +free(); + $arr['C2']->free(); + } + } + oci_free_statement($s); +} + +echo "Done\n"; + +// Cleanup + +$stmtarray = array( + "DROP table bug42496_2_tab" +); + +oci8_test_sql_execute($c, $stmtarray); + +?> +--EXPECT-- +Test 2 +Done diff --git a/ext/oci8/tests/bug44113.phpt b/ext/oci8/tests/bug44113.phpt new file mode 100644 index 0000000000000..ca2a03e9145a2 --- /dev/null +++ b/ext/oci8/tests/bug44113.phpt @@ -0,0 +1,48 @@ +--TEST-- +Bug #44113 (New collection creation can fail with OCI-22303) +--SKIPIF-- + true, 'timesten' => false); // test runs on these DBs +require(__DIR__.'/skipif.inc'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); +?> +--FILE-- + +--EXPECT-- +Completed 70000 +Done diff --git a/ext/oci8/tests/calltimeout1.phpt b/ext/oci8/tests/calltimeout1.phpt new file mode 100644 index 0000000000000..81d4af3e4cedd --- /dev/null +++ b/ext/oci8/tests/calltimeout1.phpt @@ -0,0 +1,48 @@ +--TEST-- +oci_set_call_timeout: test timing out +--SKIPIF-- + true, 'timesten' => false); // test runs on these DBs +require(__DIR__.'/skipif.inc'); +if (strcasecmp($user, "system") && strcasecmp($user, "sys")) { + die("skip needs to be run as a user with access to DBMS_LOCK"); +} +preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); +if (!(isset($matches[0]) && $matches[0] >= 18)) { + die("skip works only with Oracle 18c or greater version of Oracle client libraries"); +} + +?> +--FILE-- + +--EXPECTF-- +Test 1 +Execute error was ORA-%r(03136|03156)%r: %s diff --git a/ext/oci8/tests/extauth_01.phpt b/ext/oci8/tests/extauth_01.phpt index 696f2290edcb5..fdd3e9565ebf3 100644 --- a/ext/oci8/tests/extauth_01.phpt +++ b/ext/oci8/tests/extauth_01.phpt @@ -13,9 +13,7 @@ oci8.privileged_connect=1 echo "Test 1\n"; -$tt = microtime(true); -$c = oci_connect('/', 'notemtpy', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_connect('/', 'notemtpy', 'anything', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -24,9 +22,7 @@ var_dump($c); echo "Test 2\n"; -$tt = microtime(true); -$c = oci_connect('notemtpy', 'notemtpy', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_connect('notemtpy', 'notemtpy', 'anything', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -35,9 +31,7 @@ var_dump($c); echo "Test 3\n"; -$tt = microtime(true); -$c = oci_connect('notemtpy', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_connect('notemtpy', '', 'anything', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -46,9 +40,7 @@ var_dump($c); echo "Test 4\n"; -$tt = microtime(true); -$c = oci_connect('a', 'b', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_SYSDBA+OCI_SYSOPER); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_connect('a', 'b', 'c', null, OCI_SYSDBA+OCI_SYSOPER); if (!$c) { $m = oci_error(); var_dump($m); @@ -57,9 +49,7 @@ var_dump($c); echo "Test 5\n"; -$tt = microtime(true); -$c = oci_connect('a', 'b', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_connect('a', 'b', 'c', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -68,9 +58,7 @@ var_dump($c); echo "Test 6\n"; -$tt = microtime(true); -$c = oci_connect('', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_connect('', '', 'anything', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -79,9 +67,7 @@ var_dump($c); echo "Test 7\n"; -$tt = microtime(true); -$c = oci_connect('/', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_connect('/', '', 'anything', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -90,9 +76,7 @@ var_dump($c); echo "Test 8\n"; -$tt = microtime(true); -$c = oci_connect('/', null, 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_connect('/', null, 'anything', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -101,9 +85,7 @@ var_dump($c); echo "Test 9\n"; -$tt = microtime(true); -$c = oci_connect('/', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_SYSDBA+OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_connect('/', '', 'd', null, OCI_SYSDBA+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -112,9 +94,7 @@ var_dump($c); echo "Test 10\n"; -$tt = microtime(true); -$c = oci_connect('/', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_SYSOPER+OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_connect('/', '', 'd', null, OCI_SYSOPER+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -127,43 +107,36 @@ var_dump($c); Test 1 Warning: oci_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d -elapsed: %c secs bool(false) bool(false) Test 2 Warning: oci_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d -elapsed: %c secs bool(false) bool(false) Test 3 Warning: oci_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d -elapsed: %c secs bool(false) bool(false) Test 4 Warning: oci_connect(): OCI_SYSDBA and OCI_SYSOPER cannot be used together in %s on line %d -elapsed: %c secs bool(false) bool(false) Test 5 Warning: oci_connect(): OCI_SYSDBA and OCI_SYSOPER cannot be used together in %s on line %d -elapsed: %c secs bool(false) bool(false) Test 6 Warning: oci_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d -elapsed: %c secs bool(false) bool(false) Test 7 Warning: oci_connect(): ORA-12154: %s in %s on line %d -elapsed: %c secs array(4) { ["code"]=> int(12154) @@ -178,7 +151,6 @@ bool(false) Test 8 Warning: oci_connect(): ORA-12154: %s in %s on line %d -elapsed: %c secs array(4) { ["code"]=> int(12154) @@ -193,7 +165,6 @@ bool(false) Test 9 Warning: oci_connect(): ORA-%d: TNS:%s in %s on line %d -elapsed: %c secs array(4) { ["code"]=> int(%d) @@ -208,7 +179,6 @@ bool(false) Test 10 Warning: oci_connect(): ORA-%d: TNS:%s in %s on line %d -elapsed: %c secs array(4) { ["code"]=> int(%d) diff --git a/ext/oci8/tests/extauth_02.phpt b/ext/oci8/tests/extauth_02.phpt index f8a3fef5534d2..db38d8c98e020 100644 --- a/ext/oci8/tests/extauth_02.phpt +++ b/ext/oci8/tests/extauth_02.phpt @@ -13,9 +13,7 @@ oci8.privileged_connect=1 echo "Test 1\n"; -$tt = microtime(true); -$c = oci_new_connect('/', 'notemtpy', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_new_connect('/', 'notemtpy', 'anything', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -24,9 +22,7 @@ var_dump($c); echo "Test 2\n"; -$tt = microtime(true); -$c = oci_new_connect('notemtpy', 'notemtpy', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_new_connect('notemtpy', 'notemtpy', 'anything', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -35,9 +31,7 @@ var_dump($c); echo "Test 3\n"; -$tt = microtime(true); -$c = oci_new_connect('notemtpy', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_new_connect('notemtpy', '', 'anything', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -46,9 +40,7 @@ var_dump($c); echo "Test 4\n"; -$tt = microtime(true); -$c = oci_new_connect('a', 'b', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_SYSDBA+OCI_SYSOPER); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_new_connect('a', 'b', 'c', null, OCI_SYSDBA+OCI_SYSOPER); if (!$c) { $m = oci_error(); var_dump($m); @@ -57,9 +49,7 @@ var_dump($c); echo "Test 5\n"; -$tt = microtime(true); -$c = oci_new_connect('a', 'b', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_new_connect('a', 'b', 'c', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -68,9 +58,7 @@ var_dump($c); echo "Test 6\n"; -$tt = microtime(true); -$c = oci_new_connect('', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_new_connect('', '', 'anything', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -79,9 +67,7 @@ var_dump($c); echo "Test 7\n"; -$tt = microtime(true); -$c = oci_new_connect('/', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_new_connect('/', '', 'anything', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -90,9 +76,7 @@ var_dump($c); echo "Test 8\n"; -$tt = microtime(true); -$c = oci_new_connect('/', null, 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_new_connect('/', null, 'anything', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -101,9 +85,7 @@ var_dump($c); echo "Test 9\n"; -$tt = microtime(true); -$c = oci_new_connect('/', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_SYSDBA+OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_new_connect('/', '', 'd', null, OCI_SYSDBA+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -112,9 +94,7 @@ var_dump($c); echo "Test 10\n"; -$tt = microtime(true); -$c = oci_new_connect('/', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_SYSOPER+OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_new_connect('/', '', 'd', null, OCI_SYSOPER+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -127,43 +107,36 @@ var_dump($c); Test 1 Warning: oci_new_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d -elapsed: %c secs bool(false) bool(false) Test 2 Warning: oci_new_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d -elapsed: %c secs bool(false) bool(false) Test 3 Warning: oci_new_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d -elapsed: %c secs bool(false) bool(false) Test 4 Warning: oci_new_connect(): OCI_SYSDBA and OCI_SYSOPER cannot be used together in %s on line %d -elapsed: %c secs bool(false) bool(false) Test 5 Warning: oci_new_connect(): OCI_SYSDBA and OCI_SYSOPER cannot be used together in %s on line %d -elapsed: %c secs bool(false) bool(false) Test 6 Warning: oci_new_connect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d -elapsed: %c secs bool(false) bool(false) Test 7 Warning: oci_new_connect(): ORA-12154: %s in %s on line %d -elapsed: %c secs array(4) { ["code"]=> int(12154) @@ -178,7 +151,6 @@ bool(false) Test 8 Warning: oci_new_connect(): ORA-12154: %s in %s on line %d -elapsed: %c secs array(4) { ["code"]=> int(12154) @@ -193,7 +165,6 @@ bool(false) Test 9 Warning: oci_new_connect(): ORA-%d: TNS:%s %s on line %d -elapsed: %c secs array(4) { ["code"]=> int(%d) @@ -208,7 +179,6 @@ bool(false) Test 10 Warning: oci_new_connect(): ORA-%d: TNS:%s %s on line %d -elapsed: %c secs array(4) { ["code"]=> int(%d) diff --git a/ext/oci8/tests/extauth_03.phpt b/ext/oci8/tests/extauth_03.phpt index 698d97c478682..e7d5441e60ac8 100644 --- a/ext/oci8/tests/extauth_03.phpt +++ b/ext/oci8/tests/extauth_03.phpt @@ -13,9 +13,7 @@ oci8.privileged_connect=1 echo "Test 1\n"; -$tt = microtime(true); -$c = oci_pconnect('/', 'notemtpy', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_pconnect('/', 'notemtpy', 'anything', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -24,9 +22,7 @@ var_dump($c); echo "Test 2\n"; -$tt = microtime(true); -$c = oci_pconnect('notemtpy', 'notemtpy', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_pconnect('notemtpy', 'notemtpy', 'anything', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -35,9 +31,7 @@ var_dump($c); echo "Test 3\n"; -$tt = microtime(true); -$c = oci_pconnect('notemtpy', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_pconnect('notemtpy', '', 'anything', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -46,9 +40,7 @@ var_dump($c); echo "Test 4\n"; -$tt = microtime(true); -$c = oci_pconnect('a', 'b', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_SYSDBA+OCI_SYSOPER); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_pconnect('a', 'b', 'c', null, OCI_SYSDBA+OCI_SYSOPER); if (!$c) { $m = oci_error(); var_dump($m); @@ -57,9 +49,7 @@ var_dump($c); echo "Test 5\n"; -$tt = microtime(true); -$c = oci_pconnect('a', 'b', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_pconnect('a', 'b', 'c', null, OCI_SYSDBA+OCI_SYSOPER+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -68,9 +58,7 @@ var_dump($c); echo "Test 6\n"; -$tt = microtime(true); -$c = oci_pconnect('', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_pconnect('', '', 'anything', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -79,9 +67,7 @@ var_dump($c); echo "Test 7\n"; -$tt = microtime(true); -$c = oci_pconnect('/', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_pconnect('/', '', 'anything', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -90,9 +76,7 @@ var_dump($c); echo "Test 8\n"; -$tt = microtime(true); -$c = oci_pconnect('/', null, 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_pconnect('/', null, 'anything', null, OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -101,9 +85,7 @@ var_dump($c); echo "Test 9\n"; -$tt = microtime(true); -$c = oci_pconnect('/', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_SYSDBA+OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_pconnect('/', '', 'd', null, OCI_SYSDBA+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -112,9 +94,7 @@ var_dump($c); echo "Test 10\n"; -$tt = microtime(true); -$c = oci_pconnect('/', '', 'anything?connect_timeout=6&transport_connect_timeout=3', null, OCI_SYSOPER+OCI_CRED_EXT); -echo 'elapsed: ' . round(microtime(true) - $tt) . " secs\n"; +$c = oci_pconnect('/', '', 'd', null, OCI_SYSOPER+OCI_CRED_EXT); if (!$c) { $m = oci_error(); var_dump($m); @@ -127,43 +107,36 @@ var_dump($c); Test 1 Warning: oci_pconnect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d -elapsed: %c secs bool(false) bool(false) Test 2 Warning: oci_pconnect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d -elapsed: %c secs bool(false) bool(false) Test 3 Warning: oci_pconnect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d -elapsed: %c secs bool(false) bool(false) Test 4 Warning: oci_pconnect(): OCI_SYSDBA and OCI_SYSOPER cannot be used together in %s on line %d -elapsed: %c secs bool(false) bool(false) Test 5 Warning: oci_pconnect(): OCI_SYSDBA and OCI_SYSOPER cannot be used together in %s on line %d -elapsed: %c secs bool(false) bool(false) Test 6 Warning: oci_pconnect(): OCI_CRED_EXT can only be used with a username of "/" and a NULL password in %s on line %d -elapsed: %c secs bool(false) bool(false) Test 7 Warning: oci_pconnect(): ORA-12154: %s in %s on line %d -elapsed: %c secs array(4) { ["code"]=> int(12154) @@ -178,7 +151,6 @@ bool(false) Test 8 Warning: oci_pconnect(): ORA-12154: %s in %s on line %d -elapsed: %c secs array(4) { ["code"]=> int(12154) @@ -193,7 +165,6 @@ bool(false) Test 9 Warning: oci_pconnect(): ORA-%d: TNS:%s in %s on line %d -elapsed: %c secs array(4) { ["code"]=> int(%d) @@ -208,7 +179,6 @@ bool(false) Test 10 Warning: oci_pconnect(): ORA-%d: TNS:%s in %s on line %d -elapsed: %c secs array(4) { ["code"]=> int(%d) diff --git a/ext/oci8/tests/lob_043.phpt b/ext/oci8/tests/lob_043.phpt new file mode 100644 index 0000000000000..c0f8973dfd145 --- /dev/null +++ b/ext/oci8/tests/lob_043.phpt @@ -0,0 +1,85 @@ +--TEST-- +Bug #49560 (LOB resource destructor and refcount test) +--SKIPIF-- + true, 'timesten' => false); // test runs on these DBs +require(__DIR__.'/skipif.inc'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); +?> +--FILE-- +load(), "\n"; + } +*/ + +// Clean up + +$stmtarray = array( + "drop table lob_043_tab" +); + +oci8_test_sql_execute($c, $stmtarray); + +oci_close($c); + +?> +--EXPECT-- +Test 1 +f1 ended +Test 2 +f2 ended diff --git a/ext/pdo_oci/tests/pdo_oci_attr_call_timeout.phpt b/ext/pdo_oci/tests/pdo_oci_attr_call_timeout.phpt new file mode 100644 index 0000000000000..31df15320ea6b --- /dev/null +++ b/ext/pdo_oci/tests/pdo_oci_attr_call_timeout.phpt @@ -0,0 +1,66 @@ +--TEST-- +PDO_OCI: Attribute: Setting and using call timeout +--SKIPIF-- +getAttribute(PDO::ATTR_CLIENT_VERSION), $matches); +if (!(isset($matches[0]) && $matches[0] >= 18)) { + die("skip works only with Oracle 18c or greater version of Oracle client libraries"); +} + +?> +--FILE-- +prepare("begin dbms_lock.sleep(:t); end;"); + + if (!$stmt) { + $error = $dbh->errorInfo(); + echo "Prepare error was ", $error[2], "\n"; + return; + } + $stmt->bindParam(":t", $t, PDO::PARAM_INT); + + $r = $stmt->execute(); + if ($r) { + echo "Execute succeeded\n"; + } else { + $error = $dbh->errorInfo(); + echo "Execute error was ", $error[2], "\n"; + } +} + +$dbh = PDOTest::factory(); +$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT); + +echo "Test 1\n"; + +$dbh->setAttribute(PDO::OCI_ATTR_CALL_TIMEOUT, 4000); // milliseconds + +echo "call timeout:\n"; +var_dump($dbh->getAttribute(PDO::OCI_ATTR_CALL_TIMEOUT)); + +$r = mysleep($dbh, 8); // seconds + +?> +===DONE=== + +--EXPECTF-- +Test 1 +call timeout: +int(4000) +Execute error was OCIStmtExecute: ORA-%r(03136|03156)%r: %s + (%s:%d) +===DONE=== diff --git a/run-tests.php b/run-tests.php index f484de1a2a00e..2c93f53ab453f 100755 --- a/run-tests.php +++ b/run-tests.php @@ -754,7 +754,7 @@ function main(): void $ignored_by_ext = 0; sort($exts_to_test); $test_dirs = []; - $optionals = ['ext/bcmath', 'ext/oci8', 'ext/pdo_oci']; + $optionals = ['Zend', 'tests', 'ext', 'sapi']; foreach ($optionals as $dir) { if (is_dir($dir)) { From 474c6d7c67d249d74fec090c83e6bfd71e358ab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 22:48:24 +0200 Subject: [PATCH 28/29] skip the problematic extauth_xx.phpt tests --- ext/oci8/tests/extauth_01.phpt | 1 + ext/oci8/tests/extauth_02.phpt | 1 + ext/oci8/tests/extauth_03.phpt | 1 + 3 files changed, 3 insertions(+) diff --git a/ext/oci8/tests/extauth_01.phpt b/ext/oci8/tests/extauth_01.phpt index fdd3e9565ebf3..cc6f94ec3982b 100644 --- a/ext/oci8/tests/extauth_01.phpt +++ b/ext/oci8/tests/extauth_01.phpt @@ -5,6 +5,7 @@ Test External Authentication errors with oci_connect if (!extension_loaded('oci8')) die ("skip no oci8 extension"); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (substr(PHP_OS, 0, 3) == 'WIN') die("skip feature not available on Windows platforms"); +die("skip random CI timeouts caused by Oracle Instant Client, see https://github.com/php/php-src/pull/9524#issuecomment-1244409815"); ?> --INI-- oci8.privileged_connect=1 diff --git a/ext/oci8/tests/extauth_02.phpt b/ext/oci8/tests/extauth_02.phpt index db38d8c98e020..9394593396ac0 100644 --- a/ext/oci8/tests/extauth_02.phpt +++ b/ext/oci8/tests/extauth_02.phpt @@ -5,6 +5,7 @@ Test External Authentication errors with oci_new_connect if (!extension_loaded('oci8')) die ("skip no oci8 extension"); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (substr(PHP_OS, 0, 3) == 'WIN') die("skip feature not available on Windows platforms"); +die("skip random CI timeouts caused by Oracle Instant Client, see https://github.com/php/php-src/pull/9524#issuecomment-1244409815"); ?> --INI-- oci8.privileged_connect=1 diff --git a/ext/oci8/tests/extauth_03.phpt b/ext/oci8/tests/extauth_03.phpt index e7d5441e60ac8..4891961f3079b 100644 --- a/ext/oci8/tests/extauth_03.phpt +++ b/ext/oci8/tests/extauth_03.phpt @@ -5,6 +5,7 @@ Test External Authentication errors with oci_pconnect if (!extension_loaded('oci8')) die ("skip no oci8 extension"); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (substr(PHP_OS, 0, 3) == 'WIN') die("skip feature not available on Windows platforms"); +die("skip random CI timeouts caused by Oracle Instant Client, see https://github.com/php/php-src/pull/9524#issuecomment-1244409815"); ?> --INI-- oci8.privileged_connect=1 From 7f5a754025a91b3a83b9d12c59826856b12fd299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 12 Sep 2022 22:53:15 +0200 Subject: [PATCH 29/29] the tests are not slow --- ext/oci8/tests/extauth_01.phpt | 1 - ext/oci8/tests/extauth_02.phpt | 1 - ext/oci8/tests/extauth_03.phpt | 1 - 3 files changed, 3 deletions(-) diff --git a/ext/oci8/tests/extauth_01.phpt b/ext/oci8/tests/extauth_01.phpt index cc6f94ec3982b..00c94b67c0d06 100644 --- a/ext/oci8/tests/extauth_01.phpt +++ b/ext/oci8/tests/extauth_01.phpt @@ -3,7 +3,6 @@ Test External Authentication errors with oci_connect --SKIPIF-- diff --git a/ext/oci8/tests/extauth_02.phpt b/ext/oci8/tests/extauth_02.phpt index 9394593396ac0..1cb283740d144 100644 --- a/ext/oci8/tests/extauth_02.phpt +++ b/ext/oci8/tests/extauth_02.phpt @@ -3,7 +3,6 @@ Test External Authentication errors with oci_new_connect --SKIPIF-- diff --git a/ext/oci8/tests/extauth_03.phpt b/ext/oci8/tests/extauth_03.phpt index 4891961f3079b..b611a645247a9 100644 --- a/ext/oci8/tests/extauth_03.phpt +++ b/ext/oci8/tests/extauth_03.phpt @@ -3,7 +3,6 @@ Test External Authentication errors with oci_pconnect --SKIPIF--