From e52739afd3199b0348985fee549d56449eb96151 Mon Sep 17 00:00:00 2001 From: Alexey Toptygin Date: Tue, 27 Sep 2022 23:58:01 -0700 Subject: [PATCH 1/6] Skip locale-using tests if locales used are not available Summary: A number of tests fail in environments where we run cmake builds, apparently because the locales we use in those tests are not available. Make these tests all declare their dependency on the locales they use so that they can be skipped when the locales are not present on the system running the test. Differential Revision: D39861973 fbshipit-source-id: 41a3d78572d42b5b707129108a488232719a0218 --- hphp/test/slow/array/zend_sort_locale.php.runif | 1 + hphp/test/slow/ext_datetime/gmfoo.php.runif | 1 + hphp/test/slow/ext_datetime/strftime.php.runif | 1 + hphp/test/slow/ext_hsl/invalid_locale.php.runif | 1 + hphp/test/slow/ext_hsl/locale.php.runif | 3 +++ hphp/test/slow/ext_hsl/newlocale_all.php.runif | 2 ++ hphp/test/slow/ext_hsl/str_locale_case.php.runif | 2 ++ hphp/test/slow/ext_hsl/str_locale_chunk.php.runif | 1 + hphp/test/slow/ext_hsl/str_locale_compare.php.runif | 2 ++ hphp/test/slow/ext_hsl/str_locale_format.php.runif | 1 + hphp/test/slow/ext_hsl/str_locale_pad.php.runif | 1 + hphp/test/slow/ext_hsl/str_locale_pos.php.runif | 2 ++ hphp/test/slow/ext_hsl/str_locale_replace.php.runif | 2 ++ hphp/test/slow/ext_hsl/str_locale_replace_every.php.runif | 2 ++ hphp/test/slow/ext_hsl/str_locale_reverse.php.runif | 1 + hphp/test/slow/ext_hsl/str_locale_slice.php.runif | 1 + hphp/test/slow/ext_hsl/str_locale_splice.php.runif | 1 + hphp/test/slow/ext_hsl/str_locale_split.php.runif | 1 + hphp/test/slow/ext_hsl/str_locale_starts_ends_with.php.runif | 2 ++ .../slow/ext_hsl/str_locale_strip_prefix_suffix.php.runif | 1 + hphp/test/slow/ext_hsl/str_locale_trim.php.runif | 1 + hphp/test/slow/ext_hsl/str_locale_vsprintf.php.runif | 4 ++++ hphp/test/slow/ext_json/2053.php.runif | 1 + hphp/test/slow/ext_string/7157.php.runif | 1 + hphp/test/slow/ext_string/setlocale-multiple-calls.php.runif | 2 ++ hphp/test/slow/ext_string/setlocale-threaded.php.runif | 2 ++ hphp/test/slow/invalid_argument/1381.php.runif | 1 + hphp/test/slow/locale/176.php.runif | 1 + hphp/test/slow/locale/decimal_point.php.runif | 1 + hphp/test/zend/good/ext/intl/tests/bug67052.php.runif | 1 + .../ext/intl/tests/rbbiter_getBinaryRules_basic.php.runif | 1 + .../zend/good/ext/intl/tests/rbbiter_getRules_basic.php.runif | 1 + 32 files changed, 46 insertions(+) create mode 100644 hphp/test/slow/array/zend_sort_locale.php.runif create mode 100644 hphp/test/slow/ext_datetime/gmfoo.php.runif create mode 100644 hphp/test/slow/ext_datetime/strftime.php.runif create mode 100644 hphp/test/slow/ext_hsl/invalid_locale.php.runif create mode 100644 hphp/test/slow/ext_hsl/locale.php.runif create mode 100644 hphp/test/slow/ext_hsl/newlocale_all.php.runif create mode 100644 hphp/test/slow/ext_hsl/str_locale_case.php.runif create mode 100644 hphp/test/slow/ext_hsl/str_locale_chunk.php.runif create mode 100644 hphp/test/slow/ext_hsl/str_locale_compare.php.runif create mode 100644 hphp/test/slow/ext_hsl/str_locale_format.php.runif create mode 100644 hphp/test/slow/ext_hsl/str_locale_pad.php.runif create mode 100644 hphp/test/slow/ext_hsl/str_locale_pos.php.runif create mode 100644 hphp/test/slow/ext_hsl/str_locale_replace.php.runif create mode 100644 hphp/test/slow/ext_hsl/str_locale_replace_every.php.runif create mode 100644 hphp/test/slow/ext_hsl/str_locale_reverse.php.runif create mode 100644 hphp/test/slow/ext_hsl/str_locale_slice.php.runif create mode 100644 hphp/test/slow/ext_hsl/str_locale_splice.php.runif create mode 100644 hphp/test/slow/ext_hsl/str_locale_split.php.runif create mode 100644 hphp/test/slow/ext_hsl/str_locale_starts_ends_with.php.runif create mode 100644 hphp/test/slow/ext_hsl/str_locale_strip_prefix_suffix.php.runif create mode 100644 hphp/test/slow/ext_hsl/str_locale_trim.php.runif create mode 100644 hphp/test/slow/ext_hsl/str_locale_vsprintf.php.runif create mode 100644 hphp/test/slow/ext_json/2053.php.runif create mode 100644 hphp/test/slow/ext_string/7157.php.runif create mode 100644 hphp/test/slow/ext_string/setlocale-multiple-calls.php.runif create mode 100644 hphp/test/slow/ext_string/setlocale-threaded.php.runif create mode 100644 hphp/test/slow/invalid_argument/1381.php.runif create mode 100644 hphp/test/slow/locale/176.php.runif create mode 100644 hphp/test/slow/locale/decimal_point.php.runif diff --git a/hphp/test/slow/array/zend_sort_locale.php.runif b/hphp/test/slow/array/zend_sort_locale.php.runif new file mode 100644 index 0000000000000..95b378a0fe9cb --- /dev/null +++ b/hphp/test/slow/array/zend_sort_locale.php.runif @@ -0,0 +1 @@ +locale LC_ALL fr_FR.ISO8859-1 fr_FR diff --git a/hphp/test/slow/ext_datetime/gmfoo.php.runif b/hphp/test/slow/ext_datetime/gmfoo.php.runif new file mode 100644 index 0000000000000..ab94dbdd44ff9 --- /dev/null +++ b/hphp/test/slow/ext_datetime/gmfoo.php.runif @@ -0,0 +1 @@ +locale LC_TIME en_US.utf8 diff --git a/hphp/test/slow/ext_datetime/strftime.php.runif b/hphp/test/slow/ext_datetime/strftime.php.runif new file mode 100644 index 0000000000000..0872bc8cb4d90 --- /dev/null +++ b/hphp/test/slow/ext_datetime/strftime.php.runif @@ -0,0 +1 @@ +locale LC_TIME de_DE diff --git a/hphp/test/slow/ext_hsl/invalid_locale.php.runif b/hphp/test/slow/ext_hsl/invalid_locale.php.runif new file mode 100644 index 0000000000000..a2e5af58ddca1 --- /dev/null +++ b/hphp/test/slow/ext_hsl/invalid_locale.php.runif @@ -0,0 +1 @@ +locale LC_ALL en_US.UTF-8 diff --git a/hphp/test/slow/ext_hsl/locale.php.runif b/hphp/test/slow/ext_hsl/locale.php.runif new file mode 100644 index 0000000000000..788c6adbc4629 --- /dev/null +++ b/hphp/test/slow/ext_hsl/locale.php.runif @@ -0,0 +1,3 @@ +locale LC_ALL en_GB.UTF-8 +locale LC_MONETARY fr_FR.UTF-8 +locale LC_NUMERIC fr_FR.UTF-8 diff --git a/hphp/test/slow/ext_hsl/newlocale_all.php.runif b/hphp/test/slow/ext_hsl/newlocale_all.php.runif new file mode 100644 index 0000000000000..ccbbbe204fa42 --- /dev/null +++ b/hphp/test/slow/ext_hsl/newlocale_all.php.runif @@ -0,0 +1,2 @@ +locale LC_ALL en_GB.UTF-8 +locale LC_ALL fr_FR.UTF-8 diff --git a/hphp/test/slow/ext_hsl/str_locale_case.php.runif b/hphp/test/slow/ext_hsl/str_locale_case.php.runif new file mode 100644 index 0000000000000..ea8db08fd6c58 --- /dev/null +++ b/hphp/test/slow/ext_hsl/str_locale_case.php.runif @@ -0,0 +1,2 @@ +locale LC_ALL en_US.UTF-8 +locale LC_ALL tr_TR.UTF-8 diff --git a/hphp/test/slow/ext_hsl/str_locale_chunk.php.runif b/hphp/test/slow/ext_hsl/str_locale_chunk.php.runif new file mode 100644 index 0000000000000..a2e5af58ddca1 --- /dev/null +++ b/hphp/test/slow/ext_hsl/str_locale_chunk.php.runif @@ -0,0 +1 @@ +locale LC_ALL en_US.UTF-8 diff --git a/hphp/test/slow/ext_hsl/str_locale_compare.php.runif b/hphp/test/slow/ext_hsl/str_locale_compare.php.runif new file mode 100644 index 0000000000000..767e4a03eb020 --- /dev/null +++ b/hphp/test/slow/ext_hsl/str_locale_compare.php.runif @@ -0,0 +1,2 @@ +locale LC_ALL en_US +locale LC_ALL en_US.UTF-8 diff --git a/hphp/test/slow/ext_hsl/str_locale_format.php.runif b/hphp/test/slow/ext_hsl/str_locale_format.php.runif new file mode 100644 index 0000000000000..3cdb9408d4850 --- /dev/null +++ b/hphp/test/slow/ext_hsl/str_locale_format.php.runif @@ -0,0 +1 @@ +locale LC_ALL fr_FR diff --git a/hphp/test/slow/ext_hsl/str_locale_pad.php.runif b/hphp/test/slow/ext_hsl/str_locale_pad.php.runif new file mode 100644 index 0000000000000..a2e5af58ddca1 --- /dev/null +++ b/hphp/test/slow/ext_hsl/str_locale_pad.php.runif @@ -0,0 +1 @@ +locale LC_ALL en_US.UTF-8 diff --git a/hphp/test/slow/ext_hsl/str_locale_pos.php.runif b/hphp/test/slow/ext_hsl/str_locale_pos.php.runif new file mode 100644 index 0000000000000..ea8db08fd6c58 --- /dev/null +++ b/hphp/test/slow/ext_hsl/str_locale_pos.php.runif @@ -0,0 +1,2 @@ +locale LC_ALL en_US.UTF-8 +locale LC_ALL tr_TR.UTF-8 diff --git a/hphp/test/slow/ext_hsl/str_locale_replace.php.runif b/hphp/test/slow/ext_hsl/str_locale_replace.php.runif new file mode 100644 index 0000000000000..ea8db08fd6c58 --- /dev/null +++ b/hphp/test/slow/ext_hsl/str_locale_replace.php.runif @@ -0,0 +1,2 @@ +locale LC_ALL en_US.UTF-8 +locale LC_ALL tr_TR.UTF-8 diff --git a/hphp/test/slow/ext_hsl/str_locale_replace_every.php.runif b/hphp/test/slow/ext_hsl/str_locale_replace_every.php.runif new file mode 100644 index 0000000000000..ea8db08fd6c58 --- /dev/null +++ b/hphp/test/slow/ext_hsl/str_locale_replace_every.php.runif @@ -0,0 +1,2 @@ +locale LC_ALL en_US.UTF-8 +locale LC_ALL tr_TR.UTF-8 diff --git a/hphp/test/slow/ext_hsl/str_locale_reverse.php.runif b/hphp/test/slow/ext_hsl/str_locale_reverse.php.runif new file mode 100644 index 0000000000000..a2e5af58ddca1 --- /dev/null +++ b/hphp/test/slow/ext_hsl/str_locale_reverse.php.runif @@ -0,0 +1 @@ +locale LC_ALL en_US.UTF-8 diff --git a/hphp/test/slow/ext_hsl/str_locale_slice.php.runif b/hphp/test/slow/ext_hsl/str_locale_slice.php.runif new file mode 100644 index 0000000000000..a2e5af58ddca1 --- /dev/null +++ b/hphp/test/slow/ext_hsl/str_locale_slice.php.runif @@ -0,0 +1 @@ +locale LC_ALL en_US.UTF-8 diff --git a/hphp/test/slow/ext_hsl/str_locale_splice.php.runif b/hphp/test/slow/ext_hsl/str_locale_splice.php.runif new file mode 100644 index 0000000000000..a2e5af58ddca1 --- /dev/null +++ b/hphp/test/slow/ext_hsl/str_locale_splice.php.runif @@ -0,0 +1 @@ +locale LC_ALL en_US.UTF-8 diff --git a/hphp/test/slow/ext_hsl/str_locale_split.php.runif b/hphp/test/slow/ext_hsl/str_locale_split.php.runif new file mode 100644 index 0000000000000..a2e5af58ddca1 --- /dev/null +++ b/hphp/test/slow/ext_hsl/str_locale_split.php.runif @@ -0,0 +1 @@ +locale LC_ALL en_US.UTF-8 diff --git a/hphp/test/slow/ext_hsl/str_locale_starts_ends_with.php.runif b/hphp/test/slow/ext_hsl/str_locale_starts_ends_with.php.runif new file mode 100644 index 0000000000000..ea8db08fd6c58 --- /dev/null +++ b/hphp/test/slow/ext_hsl/str_locale_starts_ends_with.php.runif @@ -0,0 +1,2 @@ +locale LC_ALL en_US.UTF-8 +locale LC_ALL tr_TR.UTF-8 diff --git a/hphp/test/slow/ext_hsl/str_locale_strip_prefix_suffix.php.runif b/hphp/test/slow/ext_hsl/str_locale_strip_prefix_suffix.php.runif new file mode 100644 index 0000000000000..a2e5af58ddca1 --- /dev/null +++ b/hphp/test/slow/ext_hsl/str_locale_strip_prefix_suffix.php.runif @@ -0,0 +1 @@ +locale LC_ALL en_US.UTF-8 diff --git a/hphp/test/slow/ext_hsl/str_locale_trim.php.runif b/hphp/test/slow/ext_hsl/str_locale_trim.php.runif new file mode 100644 index 0000000000000..a2e5af58ddca1 --- /dev/null +++ b/hphp/test/slow/ext_hsl/str_locale_trim.php.runif @@ -0,0 +1 @@ +locale LC_ALL en_US.UTF-8 diff --git a/hphp/test/slow/ext_hsl/str_locale_vsprintf.php.runif b/hphp/test/slow/ext_hsl/str_locale_vsprintf.php.runif new file mode 100644 index 0000000000000..a4fb23a899e1d --- /dev/null +++ b/hphp/test/slow/ext_hsl/str_locale_vsprintf.php.runif @@ -0,0 +1,4 @@ +locale LC_NUMERIC en_US +locale LC_NUMERIC en_US.UTF-8 +locale LC_NUMERIC fr_FR +locale LC_NUMERIC fr_FR.UTF-8 diff --git a/hphp/test/slow/ext_json/2053.php.runif b/hphp/test/slow/ext_json/2053.php.runif new file mode 100644 index 0000000000000..2b3b63a45493c --- /dev/null +++ b/hphp/test/slow/ext_json/2053.php.runif @@ -0,0 +1 @@ +locale LC_ALL es_ES diff --git a/hphp/test/slow/ext_string/7157.php.runif b/hphp/test/slow/ext_string/7157.php.runif new file mode 100644 index 0000000000000..e6ae5aba4b6b8 --- /dev/null +++ b/hphp/test/slow/ext_string/7157.php.runif @@ -0,0 +1 @@ +locale LC_CTYPE de_DE de german ge de_DE.ISO8859-1 ISO8859-1 diff --git a/hphp/test/slow/ext_string/setlocale-multiple-calls.php.runif b/hphp/test/slow/ext_string/setlocale-multiple-calls.php.runif new file mode 100644 index 0000000000000..903e503eefb23 --- /dev/null +++ b/hphp/test/slow/ext_string/setlocale-multiple-calls.php.runif @@ -0,0 +1,2 @@ +locale LC_TIME fr_FR +locale LC_NUMERIC fr_FR diff --git a/hphp/test/slow/ext_string/setlocale-threaded.php.runif b/hphp/test/slow/ext_string/setlocale-threaded.php.runif new file mode 100644 index 0000000000000..903e503eefb23 --- /dev/null +++ b/hphp/test/slow/ext_string/setlocale-threaded.php.runif @@ -0,0 +1,2 @@ +locale LC_TIME fr_FR +locale LC_NUMERIC fr_FR diff --git a/hphp/test/slow/invalid_argument/1381.php.runif b/hphp/test/slow/invalid_argument/1381.php.runif new file mode 100644 index 0000000000000..1623e06a4d9f7 --- /dev/null +++ b/hphp/test/slow/invalid_argument/1381.php.runif @@ -0,0 +1 @@ +locale LC_ALL de_DE diff --git a/hphp/test/slow/locale/176.php.runif b/hphp/test/slow/locale/176.php.runif new file mode 100644 index 0000000000000..494b7d197dd0d --- /dev/null +++ b/hphp/test/slow/locale/176.php.runif @@ -0,0 +1 @@ +locale LC_ALL zh_CN.utf8 diff --git a/hphp/test/slow/locale/decimal_point.php.runif b/hphp/test/slow/locale/decimal_point.php.runif new file mode 100644 index 0000000000000..3cdb9408d4850 --- /dev/null +++ b/hphp/test/slow/locale/decimal_point.php.runif @@ -0,0 +1 @@ +locale LC_ALL fr_FR diff --git a/hphp/test/zend/good/ext/intl/tests/bug67052.php.runif b/hphp/test/zend/good/ext/intl/tests/bug67052.php.runif index 070b16ca6f9d3..f04666988ba32 100644 --- a/hphp/test/zend/good/ext/intl/tests/bug67052.php.runif +++ b/hphp/test/zend/good/ext/intl/tests/bug67052.php.runif @@ -1 +1,2 @@ extension intl +locale LC_ALL de_DE diff --git a/hphp/test/zend/good/ext/intl/tests/rbbiter_getBinaryRules_basic.php.runif b/hphp/test/zend/good/ext/intl/tests/rbbiter_getBinaryRules_basic.php.runif index 070b16ca6f9d3..4592c91c27e41 100644 --- a/hphp/test/zend/good/ext/intl/tests/rbbiter_getBinaryRules_basic.php.runif +++ b/hphp/test/zend/good/ext/intl/tests/rbbiter_getBinaryRules_basic.php.runif @@ -1 +1,2 @@ extension intl +locale LC_ALL pt_PT diff --git a/hphp/test/zend/good/ext/intl/tests/rbbiter_getRules_basic.php.runif b/hphp/test/zend/good/ext/intl/tests/rbbiter_getRules_basic.php.runif index 070b16ca6f9d3..4592c91c27e41 100644 --- a/hphp/test/zend/good/ext/intl/tests/rbbiter_getRules_basic.php.runif +++ b/hphp/test/zend/good/ext/intl/tests/rbbiter_getRules_basic.php.runif @@ -1 +1,2 @@ extension intl +locale LC_ALL pt_PT From c0519b62fad2a536c641d8433f32f7368d40577f Mon Sep 17 00:00:00 2001 From: Alexey Toptygin Date: Tue, 27 Sep 2022 23:58:01 -0700 Subject: [PATCH 2/6] Make ext_hash unit test accept 2 versions of crc32b output Summary: I appear to have been mistaken in D39591758 (https://github.com/facebook/hhvm/commit/c80973682c92d3916e07af8fed13235c05fb7a5b) re: the crc32b hash always producing the same value for the same input. It appears that the way we implement this hash depends not on whether we're building facebook-specific extension functionality, but whether we build with buck or cmake (i.e. both default and hhvm.no_facebook=1 buck builds produce one value, and all cmake builds produce another value). The state before D39591758 (https://github.com/facebook/hhvm/commit/c80973682c92d3916e07af8fed13235c05fb7a5b) was still broken, just not in the way that I thought (the test was trying to use the presence of facebook-specific code to determine which output to expect, but that's not what the behavior change is linked to). Since there is no good way to tell a hhvm.no_facebook=1 buck build from a cmake build, we can't correctly do what the test was originally trying to do. Instead, this diff updates the test expectatsions to accept either output. Differential Revision: D39861974 fbshipit-source-id: 1cd053e4714d9e0552e19755e8e35a93e16c394e --- .../slow/ext_hash/{ext_hash.php.expect => ext_hash.php.expectf} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename hphp/test/slow/ext_hash/{ext_hash.php.expect => ext_hash.php.expectf} (98%) diff --git a/hphp/test/slow/ext_hash/ext_hash.php.expect b/hphp/test/slow/ext_hash/ext_hash.php.expectf similarity index 98% rename from hphp/test/slow/ext_hash/ext_hash.php.expect rename to hphp/test/slow/ext_hash/ext_hash.php.expectf index 5827cd748d36d..9ef3d3771058d 100644 --- a/hphp/test/slow/ext_hash/ext_hash.php.expect +++ b/hphp/test/slow/ext_hash/ext_hash.php.expectf @@ -36,7 +36,7 @@ string(48) "da27cf4bdb2decd4731c69a017534535eecd6d9b9015fc41" string(56) "f8a5d442ef5b82e062599fe38ddbf46999b29f0a15caa8bebabbff68" string(64) "16e1688c75cf09338fce299455ec0f6f783ca1cbb2006203ae6ae98b23f9294a" string(8) "7bf1105e" -string(8) "4246a382" +string(8) "%r(4246a382|82a34642)%r" bool(true) ==== test_hash_init ==== string(32) "5c6ffbdd40d9556b73a21e63c3e0e904" From 09c16041d2f4339e3c1f02636eb76484426349d6 Mon Sep 17 00:00:00 2001 From: Alexey Toptygin Date: Tue, 27 Sep 2022 23:58:01 -0700 Subject: [PATCH 3/6] Fix parser error in unit test that only runs in cmake builds Summary: We failed to update this test when we banned the ${...} interpolation syntax (because we never ran this test internally). Try to fix the test by using the currently supported syntax. Differential Revision: D39861972 fbshipit-source-id: ecc740c2d4ebec0e151cc777eaa0107040f0e1df --- hphp/test/slow/ext_gd/imagewebp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hphp/test/slow/ext_gd/imagewebp.php b/hphp/test/slow/ext_gd/imagewebp.php index 4491653c26b49..1e18cb5426e64 100644 --- a/hphp/test/slow/ext_gd/imagewebp.php +++ b/hphp/test/slow/ext_gd/imagewebp.php @@ -21,7 +21,7 @@ $header = unpack("A4fourcc/L1length/A4chunkheader", $header); if ($header["fourcc"] != "RIFF") echo "Invalid FourCC in created image file\n"; -if ($header["length"] != $size) echo "The length specified in the image header is different from the actual size: (${header['length']} != ${size})\n"; +if ($header["length"] != $size) echo "The length specified in the image header is different from the actual size: ({$header['length']} != {$size})\n"; fclose($fp); unlink($filename); From 206c8d4b5eef6b02e5c6a302b4467b1c855f1c5c Mon Sep 17 00:00:00 2001 From: Alexey Toptygin Date: Tue, 27 Sep 2022 23:58:01 -0700 Subject: [PATCH 4/6] Fix arguments in editline tests that only run in cmake builds Summary: We failed to update these unit tests when we banned argument coercion for builtin arguments (because we never run these tests internally). Try to fix these tests by replacing values of the wrong type with the values that they would have been coerced to when that was still allowed. Also fix one test expectation that was not adjusted to deal with hack array migration. Differential Revision: D39861971 fbshipit-source-id: 7052b9ebe84d41fca4eb9eea099d991e564d1a08 --- hphp/test/slow/ext_readline/libedit_write_history.php | 4 ++-- .../zend/good/ext/readline/tests/libedit_info_001.php | 8 ++++---- .../good/ext/readline/tests/libedit_info_001.php.expectf | 4 ++-- .../good/ext/readline/tests/libedit_write_history_001.php | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/hphp/test/slow/ext_readline/libedit_write_history.php b/hphp/test/slow/ext_readline/libedit_write_history.php index 25c78045fed78..13325df10751d 100644 --- a/hphp/test/slow/ext_readline/libedit_write_history.php +++ b/hphp/test/slow/ext_readline/libedit_write_history.php @@ -4,8 +4,8 @@ readline_add_history('foo'); readline_add_history(''); -readline_add_history(1); -readline_add_history(NULL); +readline_add_history('1'); +readline_add_history(''); var_dump(readline_write_history($name)); var_dump(readline_read_history($name)); diff --git a/hphp/test/zend/good/ext/readline/tests/libedit_info_001.php b/hphp/test/zend/good/ext/readline/tests/libedit_info_001.php index 048d53fdc3f8a..eb0de6f03fef4 100644 --- a/hphp/test/zend/good/ext/readline/tests/libedit_info_001.php +++ b/hphp/test/zend/good/ext/readline/tests/libedit_info_001.php @@ -1,12 +1,12 @@ > function main(): void { var_dump(@readline_info()); -var_dump(@readline_info(1)); -var_dump(@readline_info(1,1)); +var_dump(@readline_info('1')); +var_dump(@readline_info('1','1')); var_dump(@readline_info('line_buffer')); var_dump(@readline_info('readline_name')); -var_dump(@readline_info('readline_name', 1)); +var_dump(@readline_info('readline_name', '1')); var_dump(@readline_info('readline_name')); -var_dump(@readline_info('attempted_completion_over',1)); +var_dump(@readline_info('attempted_completion_over', '1')); var_dump(@readline_info('attempted_completion_over')); } diff --git a/hphp/test/zend/good/ext/readline/tests/libedit_info_001.php.expectf b/hphp/test/zend/good/ext/readline/tests/libedit_info_001.php.expectf index cc76026dffc29..ec22817122de5 100644 --- a/hphp/test/zend/good/ext/readline/tests/libedit_info_001.php.expectf +++ b/hphp/test/zend/good/ext/readline/tests/libedit_info_001.php.expectf @@ -1,4 +1,4 @@ -array(6) { +dict(6) { ["line_buffer"]=> string(0) "" ["point"]=> @@ -19,4 +19,4 @@ string(0) "" string(0) "" string(1) "1" int(0) -int(1) \ No newline at end of file +int(1) diff --git a/hphp/test/zend/good/ext/readline/tests/libedit_write_history_001.php b/hphp/test/zend/good/ext/readline/tests/libedit_write_history_001.php index 43d002b8b11c6..d1be58c0bdeb8 100644 --- a/hphp/test/zend/good/ext/readline/tests/libedit_write_history_001.php +++ b/hphp/test/zend/good/ext/readline/tests/libedit_write_history_001.php @@ -4,8 +4,8 @@ readline_add_history('foo'); readline_add_history(''); -readline_add_history(1); -readline_add_history(NULL); +readline_add_history('1'); +readline_add_history(''); readline_write_history($name); var_dump(file_get_contents($name)); From 0507ca55a20a93aab4e42beeed031946a6330379 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Tue, 27 Sep 2022 23:58:01 -0700 Subject: [PATCH 5/6] Run full tests instead of quick tests in the hhvm-ubuntu Sandcastle job Summary: For now, exclude some tests that do not work for various reasons (some that are unavoidable and some that we need to fix later). Differential Revision: D39477972 fbshipit-source-id: 8259e1fa5fd830ba93272436b581f4f58d74dd38 --- hphp/test/cmake_builds_excluded_tests | 113 ++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 hphp/test/cmake_builds_excluded_tests diff --git a/hphp/test/cmake_builds_excluded_tests b/hphp/test/cmake_builds_excluded_tests new file mode 100644 index 0000000000000..89973be791c3b --- /dev/null +++ b/hphp/test/cmake_builds_excluded_tests @@ -0,0 +1,113 @@ +# fail apparently due to stale or out of sync tzdata +slow/dv_array/ext_datetime.php +slow/ext_date/date_sunrise_test.php +slow/ext_date/date_sunset_test.php +slow/ext_datetime/date.php +slow/ext_datetime/date_sun_info.php +slow/ext_datetime/date_timezone.php +slow/ext_datetime/date_timezone_transitions.php +zend/good/ext/date/tests/DateTimeZone_getTransitions_basic1.php +zend/good/ext/date/tests/bug33415-2.php +zend/good/ext/date/tests/bug35499.php +zend/good/ext/date/tests/bug41964.php +zend/good/ext/date/tests/bug45866.php +zend/good/ext/date/tests/bug51819.php +zend/good/ext/date/tests/bug67253.php +zend/good/ext/date/tests/date_parse_001.php +zend/good/ext/date/tests/date_sun_info_001.php +zend/good/ext/date/tests/date_sun_info_002.php +zend/good/ext/date/tests/date_sun_info_variation1.php +zend/good/ext/date/tests/date_sun_info_variation2.php +zend/good/ext/date/tests/date_sun_info_variation3.php +zend/good/ext/date/tests/date_sunrise_variation3.php +zend/good/ext/date/tests/date_sunrise_variation4.php +zend/good/ext/date/tests/date_sunrise_variation5.php +zend/good/ext/date/tests/date_sunrise_variation6.php +zend/good/ext/date/tests/date_sunrise_variation7.php +zend/good/ext/date/tests/date_sunrise_variation9.php +zend/good/ext/date/tests/date_sunset_variation3.php +zend/good/ext/date/tests/date_sunset_variation4.php +zend/good/ext/date/tests/date_sunset_variation5.php +zend/good/ext/date/tests/date_sunset_variation6.php +zend/good/ext/date/tests/date_sunset_variation7.php +zend/good/ext/date/tests/date_sunset_variation9.php +zend/good/ext/date/tests/date-time-modify-times.php +zend/good/ext/date/tests/rfc-datetime_and_daylight_saving_time-type3-bd1.php +zend/good/ext/date/tests/timezone_transitions_get_basic1.php +zend/good/ext/date/tests/timezone_name_from_abbr_basic1.php +zend/good/ext/date/tests/sunfuncts.php +zend/good/ext/xsl/tests/xslt010.php + +# TODO(alexeyt) fail due to inability to start watchman +slow/decl-provider/embed_type_decl.php +slow/dynamic-calls/watchman-callback.php +slow/dynamic-calls/watchman-callback-notice.php +slow/dynamic-calls/watchman-callback-throw.php +slow/ext_watchman/ext_watchman.php +slow/facts/facts.php +slow/native-autoload/native-autoload.php +slow/native-autoload2/native-autoload.php +slow/native-autoload-path-to-symbols/autoload_path_symbol_inverse.php +slow/native-autoload-path-to-symbols/autoload_path_to_symbols.php +slow/native-autoload-symlinked/native-autoload-symlinked.php +slow/native-autoload-xhp/mangle.php +slow/native-autoload-xhp/nomangle.php +slow/readonly_tdb/basic.php +slow/readonly_tdb/method_1.php +slow/readonly_tdb/scope_closure_1.php +slow/readonly_tdb/scope_for_3.php +slow/readonly_tdb/scope_if_1.php +slow/readonly_tdb/scope_if_2.php +slow/readonly_tdb/scope_if_3.php +slow/readonly_tdb/scope_switch_1.php +slow/readonly_tdb/scope_try_1.php +slow/readonly_tdb/scope_try_2.php +slow/readonly_tdb/self_method_1.php +slow/readonly_tdb/self_method_2.php +slow/readonly_tdb/static_method_1.php +slow/readonly_tdb/static_method_2.php +slow/readonly_tdb/static_prop_1.php +slow/types/autoload_alias/autoload_alias.php + +# TODO(alexeyt) jit assertion failure +slow/u_converter/2135.php +zend/good/ext/intl/tests/uconverter_oop_callback.php +zend/good/ext/intl/uchar/tests/basic-functionality.php + +# TODO(alexeyt) zip open fails +slow/ext_zlib/zip_stream.php +slow/ext_zlib/ziparchive_setencryption.php +zend/good/ext/zip/tests/bug53885.php + +# TODO(alexeyt) failures not yet categorized +server/fastcgi/tests/invalid.php +slow/coeffects/apc_pure.php +slow/dom_document/clone.php +slow/ext_hsl/execve_execvpe.php +slow/ext_hsl/execve_execvpe_lightprocess.php +slow/ext_hsl/str_locale_compare.php +slow/ext_icu/date_pattern_gen.php +slow/ext_icu/uspoof.php +slow/ext_intl/numberformat_other.php +slow/ext_string/htmlspecialchars.php +slow/ext_posix/ext_posix.php +slow/ext_process/no_stdin.php +slow/implicit-context/inaccessible-1.php +slow/implicit-context/memo-dynamic-1.php +slow/included-enum-modify.php +slow/object_property/dynprop_read_notice.php +slow/object_property/dynprop_write_notice.php +slow/program_functions/config_overrides.php +slow/program_functions/tier_overrides_default.php +slow/program_functions/tier_overrides_tier.php +slow/xhp/xhpchild.php +zend/good/ext/intl/tests/spoofchecker_001.php +zend/good/ext/intl/tests/spoofchecker_004.php +zend/good/ext/intl/tests/breakiter_preceding_basic.php +zend/good/ext/intl/tests/formatter_get_set_text_attribute.php +zend/good/ext/gmp/tests/bug50175.php +zend/good/ext/mbstring/bug28220.php +zend/good/ext/sqlite3/tests/sqlite3_22_loadextension.php +zend/good/ext/standard/tests/network/gethostbynamel_basic1.php +zend/good/ext/xmlreader/tests/008.php +zend/good/ext/xsl/tests/bug53965.php From 9263778d71681689178847ef10f79d0cb1f77671 Mon Sep 17 00:00:00 2001 From: Alexey Toptygin Date: Tue, 27 Sep 2022 23:58:47 -0700 Subject: [PATCH 6/6] Run all tests (with some exclusions) in github actions (#9230) Summary: Pull Request resolved: https://github.com/facebook/hhvm/pull/9230 Unfortunately run.php doesn't support multiple exclude files, so this diff copies the file with the smaller set of excludes used for local cmake testing and expands it. For now, if we want to mutate the list of excluded tests we will need to touch both files (but my hope is to get them to be identical and much smaller soon, which will allow us to have only one exclude file in the future). Differential Revision: D39861976 fbshipit-source-id: baa4f55a24f69c8aa2a8279c26cc4571fa3e8e8d --- hhvm.nix | 2 +- hphp/test/github_excluded_tests | 157 ++++++++++++++++++++++++++++++++ 2 files changed, 158 insertions(+), 1 deletion(-) create mode 100644 hphp/test/github_excluded_tests diff --git a/hhvm.nix b/hhvm.nix index fedaf3dbecee9..f0d99ba4f5a2c 100644 --- a/hhvm.nix +++ b/hhvm.nix @@ -257,7 +257,7 @@ stdenv.mkDerivation rec { set -ex runHook preCheck export HHVM_BIN="$PWD/hphp/hhvm/hhvm" - (cd ${./.} && "$HHVM_BIN" hphp/test/run.php quick) + (cd ${./.} && "$HHVM_BIN" hphp/test/run.php -x hphp/test/github_excluded_tests all) runHook postCheck ''; diff --git a/hphp/test/github_excluded_tests b/hphp/test/github_excluded_tests new file mode 100644 index 0000000000000..7b83c6489e628 --- /dev/null +++ b/hphp/test/github_excluded_tests @@ -0,0 +1,157 @@ +# fail apparently due to stale or out of sync tzdata +slow/dv_array/ext_datetime.php +slow/ext_date/date_sunrise_test.php +slow/ext_date/date_sunset_test.php +slow/ext_datetime/date.php +slow/ext_datetime/date_sun_info.php +slow/ext_datetime/date_timezone.php +slow/ext_datetime/date_timezone_transitions.php +zend/good/ext/date/tests/DateTimeZone_getTransitions_basic1.php +zend/good/ext/date/tests/bug33415-2.php +zend/good/ext/date/tests/bug35499.php +zend/good/ext/date/tests/bug41964.php +zend/good/ext/date/tests/bug45866.php +zend/good/ext/date/tests/bug51819.php +zend/good/ext/date/tests/bug67253.php +zend/good/ext/date/tests/date_parse_001.php +zend/good/ext/date/tests/date_sun_info_001.php +zend/good/ext/date/tests/date_sun_info_002.php +zend/good/ext/date/tests/date_sun_info_variation1.php +zend/good/ext/date/tests/date_sun_info_variation2.php +zend/good/ext/date/tests/date_sun_info_variation3.php +zend/good/ext/date/tests/date_sunrise_variation3.php +zend/good/ext/date/tests/date_sunrise_variation4.php +zend/good/ext/date/tests/date_sunrise_variation5.php +zend/good/ext/date/tests/date_sunrise_variation6.php +zend/good/ext/date/tests/date_sunrise_variation7.php +zend/good/ext/date/tests/date_sunrise_variation9.php +zend/good/ext/date/tests/date_sunset_variation3.php +zend/good/ext/date/tests/date_sunset_variation4.php +zend/good/ext/date/tests/date_sunset_variation5.php +zend/good/ext/date/tests/date_sunset_variation6.php +zend/good/ext/date/tests/date_sunset_variation7.php +zend/good/ext/date/tests/date_sunset_variation9.php +zend/good/ext/date/tests/date-time-modify-times.php +zend/good/ext/date/tests/rfc-datetime_and_daylight_saving_time-type3-bd1.php +zend/good/ext/date/tests/timezone_transitions_get_basic1.php +zend/good/ext/date/tests/timezone_name_from_abbr_basic1.php +zend/good/ext/date/tests/sunfuncts.php +zend/good/ext/xsl/tests/xslt010.php + +# TODO(alexeyt) fail due to inability to start watchman +slow/decl-provider/embed_type_decl.php +slow/dynamic-calls/watchman-callback.php +slow/dynamic-calls/watchman-callback-notice.php +slow/dynamic-calls/watchman-callback-throw.php +slow/ext_watchman/ext_watchman.php +slow/facts/facts.php +slow/native-autoload/native-autoload.php +slow/native-autoload2/native-autoload.php +slow/native-autoload-path-to-symbols/autoload_path_symbol_inverse.php +slow/native-autoload-path-to-symbols/autoload_path_to_symbols.php +slow/native-autoload-symlinked/native-autoload-symlinked.php +slow/native-autoload-xhp/mangle.php +slow/native-autoload-xhp/nomangle.php +slow/readonly_tdb/basic.php +slow/readonly_tdb/method_1.php +slow/readonly_tdb/scope_closure_1.php +slow/readonly_tdb/scope_for_3.php +slow/readonly_tdb/scope_if_1.php +slow/readonly_tdb/scope_if_2.php +slow/readonly_tdb/scope_if_3.php +slow/readonly_tdb/scope_switch_1.php +slow/readonly_tdb/scope_try_1.php +slow/readonly_tdb/scope_try_2.php +slow/readonly_tdb/self_method_1.php +slow/readonly_tdb/self_method_2.php +slow/readonly_tdb/static_method_1.php +slow/readonly_tdb/static_method_2.php +slow/readonly_tdb/static_prop_1.php +slow/types/autoload_alias/autoload_alias.php + +# TODO(alexeyt) jit assertion failure +slow/u_converter/2135.php +zend/good/ext/intl/tests/uconverter_oop_callback.php +zend/good/ext/intl/uchar/tests/basic-functionality.php + +# TODO(alexeyt) zip open fails +slow/ext_zlib/zip_stream.php +slow/ext_zlib/ziparchive_setencryption.php +zend/good/ext/zip/tests/bug53885.php + +# TODO(alexeyt) failures related to localization but apparently not just missing locale +zend/good/ext/intl/tests/formatter_format_currency2.php +zend/good/ext/intl/tests/formatter_get_locale_variant2.php +zend/good/ext/intl/tests/formatter_get_set_pattern.php +zend/good/ext/intl/tests/formatter_get_set_symbol2.php +zend/good/ext/intl/tests/grapheme.php +zend/good/ext/intl/tests/locale_filter_matches3.php +zend/good/ext/intl/tests/locale_get_display_language.php +zend/good/ext/intl/tests/locale_get_primary_language.php +zend/good/ext/intl/tests/locale_lookup_variant2.php +zend/good/ext/intl/tests/msgfmt_millisecond_dates.php +zend/good/ext/mbstring/tests/mb_ereg_replace_variation1.php + +# TODO(alexeyt) failures due to pgrep missing from system +server/debugger/tests/runTest1.php +server/fastcgi/tests/authDigestTest.php +server/fastcgi/tests/disable_ini_zend_compat.php +server/fastcgi/tests/global_variables_server.php +server/fastcgi/tests/headerTest.php +server/fastcgi/tests/httpsTest.php +server/fastcgi/tests/runTest1.php +server/http/tests/apache_proxygen_headers.php +server/http/tests/client_blocking_read_test.php +server/http/tests/codeCoverageTest.php +server/http/tests/get_headers_secure_dv_array.php +server/http/tests/globalDocumentTest.php +server/http/tests/method.php +server/http/tests/requesIdTest.php +server/http/tests/rqtrace.php +server/http/tests/runTest1.php +server/http/tests/staticContentHeaderTest.php +server/http/tests/staticContentTest.php +server/http/tests/takeoverTest.php + +# TODO(alexeyt) failures not yet categorized +server/fastcgi/tests/invalid.php +slow/coeffects/apc_pure.php +slow/dom_document/clone.php +slow/ext_hsl/execve_execvpe.php +slow/ext_hsl/execve_execvpe_lightprocess.php +slow/ext_hsl/str_locale_compare.php +slow/ext_hsl/ext_os_sockets.php +slow/ext_icu/date_pattern_gen.php +slow/ext_icu/ucsdet.php +slow/ext_icu/uspoof.php +slow/ext_imagick/php_imagick_tests/009_properties.php +slow/ext_intl/numberformat_other.php +slow/ext_string/htmlspecialchars.php +slow/ext_posix/ext_posix.php +slow/ext_process/no_stdin.php +slow/file/1684.php +slow/implicit-context/inaccessible-1.php +slow/implicit-context/memo-dynamic-1.php +slow/included-enum-modify.php +slow/object_property/dynprop_read_notice.php +slow/object_property/dynprop_write_notice.php +slow/program_functions/config_overrides.php +slow/program_functions/tier_overrides_default.php +slow/program_functions/tier_overrides_tier.php +slow/xhp/xhpchild.php +zend/good/ext/curl/tests/curl_basic_007.php +zend/good/ext/dom/tests/bug43364.php +zend/good/ext/gmp/tests/gmp_cmp.php +zend/good/ext/intl/tests/spoofchecker_001.php +zend/good/ext/intl/tests/spoofchecker_004.php +zend/good/ext/intl/tests/breakiter_preceding_basic.php +zend/good/ext/intl/tests/formatter_get_set_text_attribute.php +zend/good/ext/gmp/tests/bug50175.php +zend/good/ext/mbstring/bug28220.php +zend/good/ext/sqlite3/tests/sqlite3_22_loadextension.php +zend/good/ext/standard/tests/file/006_variation2.php +zend/good/ext/standard/tests/file/chmod_basic.php +zend/good/ext/standard/tests/general_functions/bug41518.php +zend/good/ext/standard/tests/network/gethostbynamel_basic1.php +zend/good/ext/xmlreader/tests/008.php +zend/good/ext/xsl/tests/bug53965.php