Skip to content

Advance Bash upstream compatibility progress - #4

Merged
arookieofc merged 30 commits into
masterfrom
bash-upstream-ci-progress
Jun 13, 2026
Merged

arookieofc merged 30 commits into
masterfrom
bash-upstream-ci-progress

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

Summary

  • Align more Rubash behavior with GNU Bash upstream tests for alias, tilde, builtins, dirstack, and related expansion paths.
  • Keep GNU Bash upstream test execution isolated under target/bash-upstream-tests and document the current progress baseline.
  • Update Windows path display bridges for cd/pwd so /tmp and /c/... logical paths match Bash test expectations.

Upstream test evidence

  • PASS: run-builtins run-dirstack run-shopt run-type run-strip run-invert run-input-test run-attr run-alias run-tilde2
  • Current full upstream runner baseline on Windows + Git Bash, executed in batches: 10 / 86 passing, 76 failing, 11.63% pass rate.

Notes

  • cargo fmt was run, but compatibility progress is measured against GNU Bash upstream runners, not Rust unit tests.

@arookieofc
arookieofc merged commit 107253a into master Jun 13, 2026
2 checks passed
arookieofc pushed a commit that referenced this pull request Jul 12, 2026
* Harden upstream tests and migrate command lookup basics

* Harden Bash upstream test runner safety

* Migrate Bash word expansion basics

* Migrate Bash alias and source primitives

* Migrate Bash heredoc and script stream basics

* Migrate Bash compound alias constructs

* Migrate Bash alias reparse and quoting cases

* Migrate Bash alias reserved-word cases

* Migrate Bash residual quote removal for echo

* Migrate Bash alias substitution edge cases

* Migrate Bash builtin stderr redirection

* Migrate Bash alias diagnostics and upstream comparison

* Migrate Bash break and continue loops

* Migrate early Bash builtins behavior

* Migrate Bash source pipe and heredoc cases

* Move source execution into Bash builtin module

* Expand Bash source and job control parsing

* Advance bash builtins upstream tests

* Advance bash directory stack tests

* Advance bash shopt upstream tests

* Advance bash type upstream tests

* Advance bash strip upstream tests

* Advance bash invert upstream tests

* Advance bash input upstream tests

* Advance bash attr upstream tests

* Advance bash tilde upstream tests

* Advance bash tilde upstream coverage

* Update lexer quote marker expectation

* Update parser quote marker expectation

* Advance bash appendop upstream coverage
caomengxuan666 added a commit that referenced this pull request Sep 10, 2026
history.tests 284 -> 243 drift lines vs GNU 5.3.0. Ported from
builtins/history.def:190-262 + bashhist.c bash_delete_history_range +
readline remove_history_range:

- separator scan starts after a leading '-': -2-4 = start -2, end 4
- negative numbers count back from the list end (-1 = last entry)
- positive numbers are displayed numbers, offset by history_base
- inclusive range deletion; first > last fails silently (rc=1, no
  message) per remove_history_range
- out-of-range reports "history: {side}: history position out of
  range" where side is the offending END's text -- the C code NUL
  terminates the '-' in place, so start errors print the start text
  and end errors the end text
- valid_number is strtoimax base 10 (general.c:248): 0xaf is INVALID
  and reports the whole argument with the separator restored

Both history backends updated (session history_exec.rs + provider
job_builtins.rs). Probe: target/forms/hist-d.sh -- H1-H5 byte-identical
to GNU 5.3.0 modulo the stderr shell prefix (ledger-noted).

Regression: executor_tests failset identical (114); array.tests drift
unchanged at 436 lines. Docs: census #4/#5 ledger entry -- assoc key
ORDER verified identical across GNU 5.2/5.3/rubash (census #4 premise
refuted for basic shapes); the real assoc.tests gap is compound-
assignment key quoting/splitting (323 lines, next batch).
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.

2 participants