Page MenuHomeFreeBSD

cp: Add tests involving sparse files.
ClosedPublic

Authored by des on Jan 31 2023, 10:16 AM.
Tags
None
Referenced Files
F173204067: D38290.id116334.diff
Thu, Sep 24, 7:01 AM
Unknown Object (File)
Wed, Sep 16, 11:15 PM
Unknown Object (File)
Fri, Sep 11, 12:51 AM
Unknown Object (File)
Thu, Sep 10, 10:21 PM
Unknown Object (File)
Thu, Sep 10, 8:30 AM
Unknown Object (File)
Thu, Sep 10, 8:28 AM
Unknown Object (File)
Tue, Sep 8, 10:06 PM
Unknown Object (File)
Tue, Sep 8, 11:06 AM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

des requested review of this revision.Jan 31 2023, 10:16 AM

As noted in D38191, our cp(1) transparently and unconditionally preserves holes when copying sparse files.

Remove test cases that make no sense without the -S option.

Pick nit in sparse_only_hole case.

I'm afraid I know nothing about the testing framework,
so I can't help with this one.

Good to see it being done though.

markj added a subscriber: markj.

Seems ok, though these tests might fail if run on unusual filesystems like msdosfs. I think we can address that later if it ever comes up though.

bin/cp/tests/cp_test.sh
314

Since these seem to be alphabetically sorted, the sparse tests should come before standalone_Pflag.

This revision is now accepted and ready to land.Feb 1 2023, 7:35 PM
des marked an inline comment as done.

Order tests lexicographically.

This revision now requires review to proceed.Feb 1 2023, 8:03 PM
This revision is now accepted and ready to land.Feb 1 2023, 8:47 PM
This revision was automatically updated to reflect the committed changes.