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)
Sun, Aug 18, 9:35 PM
Unknown Object (File)
Fri, Aug 2, 10:30 AM
Unknown Object (File)
Jul 8 2024, 5:12 AM
Unknown Object (File)
May 17 2024, 5:46 PM
Unknown Object (File)
Feb 26 2024, 10:03 PM
Unknown Object (File)
Feb 26 2024, 9:29 PM
Unknown Object (File)
Jan 23 2024, 5:30 PM
Unknown Object (File)
Jan 20 2024, 3:05 AM
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.