Skip to content

Latest commit

 

History

History
62 lines (52 loc) · 2.64 KB

File metadata and controls

62 lines (52 loc) · 2.64 KB

ash fix log

Tracking the 21 fixes applied to reach 349/349 on the BusyBox ash test suite.

Result

349/349 (100%). Started at 328/349 (21 failures).

Category Pass Total
ash-alias 5 5
ash-arith 6 6
ash-comm 3 3
ash-getopts 8 8
ash-glob 10 10
ash-heredoc 25 25
ash-invert 3 3
ash-misc 99 99
ash-parsing 35 35
ash-quoting 24 24
ash-read 10 10
ash-redir 27 27
ash-signals 22 22
ash-standalone 6 6
ash-vars 69 69
ash-z_slow 3 3
Total 349 349

Fixes

Parser/syntax (7)

  1. Backslash-newline continuation — joins at line-read level; lineContMarker for offsets.
  2. if across \<newline>peekNextNonMarker for operator lookahead.
  3. $empty"" and $empty'' empty wordcontainsUnescapedQuote check.
  4. "$@" with no args → zero words — special case in word expansion and for-loop.
  5. if() reserved-word syntax error — detect reserved words as function names.
  6. Case pattern () quotingfindCasePatternClose tracks single/double quotes.
  7. Alias in case body — disable alias expansion when collecting case compound.

Variable/expansion (7)

  1. Prefix IFS= for all builtinsIFS="," read ... now works.
  2. ${x#'*'} pattern quoting in heredoc — removed premature stripOuterQuotes.
  3. Single-quote pattern in ${x#'\\\\'} — pattern quoting fix.
  4. Backtick inside single quotes — track backtick regions when scanning.
  5. Command-sub newline strippingTrimRight instead of TrimSuffix for trailing \n.
  6. unset -ff flag — accept repeated -f/-v flags.
  7. \<newline> at EOF — only strip if original script had trailing newline.

Redirections (3)

  1. exec 1>&- persistence — update savedStdio before defer return.
  2. 1>&-/2>&- parsing — handle fd close before checking next token.
  3. exec <file + read + cat — persist bufio.Reader wrapping in savedStdio.In.

Signals (4)

  1. Trap exit codeskill in background runs via startSubshellBackground with forwardSignal.
  2. Nested signal traps — inherited signal propagation from subshell to parent.
  3. return in trap handlerkill -s USR1 $$ inside subshell propagates via forwardSignal.
  4. Subshell signal reset — real OS signals terminate subshell (not propagated).

Performance

  • Pipeline fast pathecho/printf | (subshell) avoids goroutine+runner copy overhead.
  • readReady for in-memory readers — detect Len() on bytes.Reader etc.