Skip to content

[Benchmark] add truncate #33

Description

@duncan020313

Add the truncate benchmark, including its specification, implementation, proof, and GNU comparison tests, within the scope below.

Question Answer
Where is the GNU code? truncate.c: main / do_ftruncate
What must I implement? Explicit -c -s N with absolute nonnegative decimal size through signed 64-bit maximum; stable regular files/symlinks, directories and missing paths.
What must the spec guarantee? Missing-path no-create success; otherwise typed FilesystemTruncate request, absolute size and operand order. Ordinary open/path errors use cannot-open wording; no late truncate/close faults in this scope.
Which APIs can I use? Typed filesystem request/result calls selected by this entry; path/kind queries where needed, output outcomes and diagnostics.
What is outside this task? Default file creation, reference/relative/block sizes, nonregular objects, resource/late operation/close faults and injected failures.

Source paths in the table are relative to coreutils/src/.

See implementation notes, common implementation rules, and the contribution workflow.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions