Page MenuHomeFreeBSD

Add ATF tests for fstyp(8)
ClosedPublic

Authored by asomers on Jun 12 2015, 11:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 28, 8:46 AM
Unknown Object (File)
Sat, Nov 23, 12:35 AM
Unknown Object (File)
Tue, Nov 5, 2:15 PM
Unknown Object (File)
Tue, Nov 5, 4:49 AM
Unknown Object (File)
Sat, Nov 2, 11:38 AM
Unknown Object (File)
Oct 29 2024, 6:07 PM
Unknown Object (File)
Oct 27 2024, 7:34 PM
Unknown Object (File)
Oct 27 2024, 5:00 PM
Subscribers

Details

Summary

Add ATF functional tests for fstyp(8)

Test Plan

"kyua test"

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

asomers retitled this revision from to Add ATF tests for fstyp(8).
asomers updated this object.
asomers edited the test plan for this revision. (Show Details)
asomers added a reviewer: trasz.

Adding tests for multiple flavors of FAT.

Looks ok to me, but I don't know ATF.

Ping? Assuming it works (as in, if it passes, and if it correctly fails when you tweak the code to break it), could you commit it?

In D2801#58321, @trasz wrote:

Ping? Assuming it works (as in, if it passes, and if it correctly fails when you tweak the code to break it), could you commit it?

If you're happy with it, I will. I was just waiting for ngie to review it.

On on vacation now; I'll get to this sometime next Wednesdayish.

General comments:

  • Use atf_check copiously to make sure that commands complete successfully.
  • Use mkdir -p a/b instead of mkdir a; mkdir a/b .
usr.sbin/fstyp/tests/fstyp_test.sh
8–9 ↗(On Diff #6241)
  • mkdir -p dir/emptyfile
  • This should use atf_check to make sure the command executes cleanly
20–21 ↗(On Diff #6241)

Same as above

asomers edited edge metadata.

Address ngie's feedback. Use atf_check on almost every line except the ones
that need to redirect stdout, and condense "mkdir foo; mkdir foo/bar" to "mkdir
-p foo/bar".

Fix permissions on fstyp_test.sh

usr.sbin/fstyp/tests/fstyp_test.sh
49 ↗(On Diff #6931)

All references to zcat should use bzcat for portability..

usr.sbin/fstyp/Makefile
47 ↗(On Diff #6926)

The extra diffs in this file are caused by svn r284589, which went in after I opened this review. I didn't actually change this file in diff 6926

usr.sbin/fstyp/tests/fstyp_test.sh
49 ↗(On Diff #6931)

Whoops! I'm surprised that worked at all. I think I started working with gzipped images then switched to bzip2 for better compression. Fix on its way...

Ping? Does my latest revision fix all review comments?

ngie edited edge metadata.

LGTM -- thanks for all the hard work :)!

This revision is now accepted and ready to land.Aug 9 2015, 7:00 AM
This revision was automatically updated to reflect the committed changes.