Skip to content

[bug] time 的 TIMEFORMAT 变量消费与精度/长修饰展开与 GNU 不符(cli_tests 存量钉 ×2 红) #2192

Closed

Description

@caomengxuan666

现象

cli_tests 两条存量钉在 master 上红(#2176 普查现形,PR #2186 的 cli-tests lane:472 run / 8 failed 之二):

  • time_uses_timeformat_variable
  • timeformat_supports_precision_and_long_modifiers

即 time 关键字对 TIMEFORMAT 变量的消费、以及精度修饰(%3R 类)与长修饰的展开面与 GNU 不符。两钉的期望先以 GNU 5.3.20 oracle 复核(期望错则按错钉纪律改钉留证),期望对则修 time 的格式展开机制。

同族不同面(勿混账)

本单只管变量消费 + 精度/长修饰两面;修复时若与上三单的面相遇,在本单报告中划界,不顺手扩大。

处置

oracle 复核 → 修格式展开机制(% 指令表按 GNU time 语义补齐精度与长修饰)或改钉;回归钉随行。归宿:里程碑缺陷批。

Activity

  1. added this to the 1.5.0 milestone on Oct 30, 2026
  2. added
    bug
    P2-medium
    on Oct 30, 2026
  3. caomengxuan666 commented on Oct 30, 2026

    @caomengxuan666
    MemberAuthor

    Scope note from the PR #2194 CI adjudication (run 41028563565, 2026-10-30): a third pin in this family failed there — time_reports_elapsed_wall_clock_for_slow_command. The reported stderr was "real 0.66 / user 0.00 / sys 0.01" against a pin pattern requiring sys exactly 0.00. It was green in the #2176 census run, so treat it as part of this issue's adjudication set: either the product's sys accounting/rounding diverges from GNU, or the pin is load-sensitive (asserting an exact zero sys time under CI load). The other family member's failure in the same run showed the same shape (cpu:100.21 vs the expected cpu:0.00).

  4. added a commit that references this issue on Oct 30, 2026
  5. caomengxuan666 commented on Oct 30, 2026

    @caomengxuan666
    MemberAuthor

    已随 census 簇 PR #2224 合入关闭(merge 2479975;CI 第二轮 run 41064636731 全绿,含 Compatibility CLI tests SUCCESS)。

    定性:三条全是错钉,产品代码零改动。先对 oracle 复核了格式展开机制本身——rubash 的 expand_time_format_percent 与 GNU print_formatted_time(execute_cmd.c:1346)逐项一致(精度单数字默认 3、上限 6、%% 字面量、%P 精度/长修饰报错、长形分钟分解),产品输出与原 regex 除 %P 外全合。错的是钉里的时间量期望:

    • time_uses_timeformat_variable / timeformat_supports_precision_and_long_modifiers:GNU print_time_info 量的是 RUSAGE_SELF + RUSAGE_CHILDREN 差值;oracle 对同一探针多跑给出 %P = 1.00 / 2.00 / 87.00 / 90.00 / 91.00——亚毫秒窗口内 %P 本质是不稳定比值,钉里写死的 0.00 不是 GNU 不变量。改法:%P 改形状检查 \d+\.\d{2},%R 消费与 %% 字面量断言保持逐字节。
    • time_reports_elapsed_wall_clock_for_slow_command:sys 0.01 是 spawn 的 SELF rusage 差在 5 ms 取整边界上翻转(rubash 与 oracle 独立五跑均全 0.00、该钉隔离跑 5/5 过、并跑负载下翻转)。user/sys 改形状检查;本钉主体断言 real ≥ 0.50s 与 real 形状保持。

    留证在簇 REPORT(~/workspace/fix-census-2190-2192/REPORT.md,主会话归档)。cli-tests 普查中本 issue 的 3 个名字清零。

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

Metadata

Metadata

Labels

P2-mediumbug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions