Skip to content

test: cover the OpenSSL preflight and build-error surfacing under zsh - #29

Open
devhardiyanto wants to merge 1 commit into
mainfrom
zsh-coverage-preflight
Open

test: cover the OpenSSL preflight and build-error surfacing under zsh#29
devhardiyanto wants to merge 1 commit into
mainfrom
zsh-coverage-preflight

Conversation

@devhardiyanto

Copy link
Copy Markdown
Owner

What

Test-only. Menutup celah coverage yang tersisa dari v1.13.1: guard OpenSSL dan surface build-error belum diuji di zsh. Tanpa perubahan kode, tanpa bump versi.

Why

Ketahuan saat menindaklanjuti log dari pelapor asli. Prompt-nya — dia pengguna zsh, jadi zsh adalah shell tempat kode itu benar-benar berjalan untuknya. Padahal _phpvm_check_openssl_compat dan _phpvm_show_build_error hanya ditutupi bats, yang jalan di bash.

Keduanya sudah kuverifikasi manual di zsh dan memang jalan — tapi verifikasi manual tak menahan regresi. Mengingat v1.13.1 sendiri lahir dari tiga bug yang hanya muncul di zsh, meninggalkan jalur baru tanpa jaring zsh persis mengulang kesalahan yang baru saja kita perbaiki.

How

Menambah ke tests/linux/zsh-smoke.zsh:

  • Matriks guard: blokir PHP 7.3 di OpenSSL 3 (dengan status keluar 1), loloskan 8.3, fail open saat probe bungkam, dan hormati PHPVM_SKIP_OPENSSL_CHECK
  • Pesan blokir menyebut jalan keluarnya (phpvm install 8.1, nama env bypass)
  • Surfacing log: error compiler, error configure, dan diam saat log bersih
  • Helper check_status / check_empty yang dibutuhkan cek di atas

Probe OpenSSL di-stub, jadi hasilnya tak bergantung pada apa yang kebetulan terpasang di runner.

Changes

  • tests/linux/zsh-smoke.zsh — 13 → 23 cek

Testing Done

  • zsh smoke 23/23 pass — zsh 5.9 lokal
  • Dibuktikan menggigit: guard di-stub supaya selalu lolos → 4 cek berubah merah, lalu dipulihkan
  • bats 77/77 tetap hijau (tak ada kode yang disentuh)
  • linux/phpvm.sh dipastikan tak berubah — diff hanya menyentuh file test

Catatan

Tak ada bump versi: ini murni test, jadi biar nebeng rilis berikutnya.

The OpenSSL guard and the build-log error surfacing shipped in 1.13.1
were only exercised by bats, which runs under bash - yet the reporter
who hit the original failure is a zsh user, so that is the shell the
code actually runs in for them. Both were verified by hand at the
time; this makes it automatic.

Adds the guard matrix (blocks 7.3, allows 8.3, fails open when the
probe is silent, honours the bypass) and the three log-surfacing
cases, plus the check_status/check_empty helpers they need.

Verified to bite: stubbing the guard to always pass turns four checks
red.

devhardiyanto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant