Page MenuHomeFreeBSD

Skip tarfs regression test if module doesn't exist
ClosedPublic

Authored by olivier on Feb 28 2023, 8:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 8:06 AM
Unknown Object (File)
Dec 11 2023, 7:18 AM
Unknown Object (File)
Aug 27 2023, 12:21 AM
Unknown Object (File)
Jul 9 2023, 8:28 AM
Unknown Object (File)
Jul 9 2023, 7:56 AM
Unknown Object (File)
Jul 6 2023, 6:09 PM
Unknown Object (File)
May 14 2023, 1:36 AM
Unknown Object (File)
May 3 2023, 7:08 PM
Subscribers

Details

Summary

When building customized FreeBSD without tarfs module, this regression test fail because
it can't load the module.

Test Plan
 mv /boot/kernel/tarfs.ko /boot/kernel/tarfs.ko.bak
# kyua test sys/fs/tarfs/
sys/fs/tarfs/tarfs_test:tarfs_basic  ->  skipped: This test requires tarfs and could not load it  [0.020s]
sys/fs/tarfs/tarfs_test:tarfs_notdir_device  ->  skipped: This test requires tarfs and could not load it  [0.020s]
sys/fs/tarfs/tarfs_test:tarfs_notdir_dot  ->  skipped: This test requires tarfs and could not load it  [0.019s]
sys/fs/tarfs/tarfs_test:tarfs_notdir_dotdot  ->  skipped: This test requires tarfs and could not load it  [0.019s]
sys/fs/tarfs/tarfs_test:tarfs_notdir_file  ->  skipped: This test requires tarfs and could not load it  [0.019s]

Results file id is usr_tests.20230228-200204-811621
Results saved to /root/.kyua/store/results.usr_tests.20230228-200204-811621.db

5/5 passed (0 failed)

Diff Detail

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

Event Timeline

olivier created this revision.
This revision is now accepted and ready to land.Feb 28 2023, 8:10 PM

The kldload check function seems like it should be in a common function. Also: I might reword the message to state: “This test requires the tarfs kernel module (not available).”

tests/sys/fs/tarfs/tarfs_test.sh
51

Should this use umount -f ?

tests/sys/fs/tarfs/tarfs_test.sh
51

Or maybe a different sanity check to run beforehand, like ‘test -d “${mnt}”’?

In D38828#884135, @ngie wrote:

The kldload check function seems like it should be in a common function. Also: I might reword the message to state: “This test requires the tarfs kernel module (not available).”

About the "not available", I didn't add this precision because in some case it could be a loading failure too (like a child module not available).