You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug] time keyword always prints the POSIX format ('real 0.00'): GNU default is leading blank line + tab-separated 'real 0m0.000s' (BASH_TIMEFORMAT) #268
Found by: wt5/audit source lane (2026-09-28), script-file-verified against WSL GNU Bash 5.3.0.
Summary: The time reserved word without -p must print GNU's default BASH_TIMEFORMAT — a LEADING blank line, TAB separators, and minute-form durations (real\t0m0.001s). rubash always prints the POSIX format (real 0.00\nuser 0.00\nsys 0.00), i.e. it behaves as if time -p were always in effect for the default case.
GNU C source owner:third_party/bash/execute_cmd.c:
:1552-1557 in print_time_info: posix_time ? POSIX_TIMEFORMAT : (TIMEFORMAT var ?: BASH_TIMEFORMAT) — the POSIX format only when time -p.
Reproducer (tests/fixtures/audit/a4-grammar.sh time section; raw: target/issue-suites/results/source-audit/out/a4-grammar.diff):
timetrue
TIMEFORMAT='%R';time sleep 0
time -p true
GNU 5.3.0 stderr: per time true: blank line + real\t0m0.000s + user\t0m0.000s + sys\t0m0.000s; with TIMEFORMAT set prints the single %R number (honored); time -p true -> real 0.00 style. rubash stderr: every default time prints the 3-line real 0.00 / user 0.00 / sys 0.00 block with no leading blank line and no tab/minute form; TIMEFORMAT itself is partially honored (%R single number printed).
Rubash owner: time-implementation in the executor (grep time -p / TimeFormat in src/executor).
Classification: rubash-caused. Output-format divergence visible to any script or test harness capturing time diagnostics.
Activity
docs: source-audit lane (wt5/audit) — GNU C vs Rust owner gap audit, …
builtins lane: ulimit real engine, declare -i DISCARD, time/select/re…
caomengxuan666 commentedon Sep 27, 2026
已修复并合入 master(commit 2c78889b,lane wt6/builtin2;GNU 引用与全矩阵验证见提交——回归 24/24、set-e/set-x/errors 真基线平价)。感谢报告!