Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/fstyp/tests/fstyp_test.sh
| Show All 21 Lines | |||||
| # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
| # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
| # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
| # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
| # SUCH DAMAGE. | # SUCH DAMAGE. | ||||
| # $FreeBSD$ | # $FreeBSD$ | ||||
| atf_test_case befs | |||||
| befs_head() { | |||||
| atf_set "descr" "fstyp(8) can detect BeFS and label filesystem" | |||||
rpokala: s/befs/BeFS/ | |||||
| } | |||||
| befs_body() { | |||||
| bzcat $(atf_get_srcdir)/befs.img.bz2 > befs.img | |||||
| atf_check -s exit:0 -o inline:"befs\n" fstyp befs.img | |||||
| atf_check -s exit:0 -o inline:"befs BeFS\n" fstyp -l befs.img | |||||
| } | |||||
| atf_test_case cd9660 | atf_test_case cd9660 | ||||
| cd9660_head() { | cd9660_head() { | ||||
| atf_set "descr" "fstyp(8) should detect cd9660 filesystems" | atf_set "descr" "fstyp(8) should detect cd9660 filesystems" | ||||
| } | } | ||||
| cd9660_body() { | cd9660_body() { | ||||
| atf_check -s exit:0 mkdir -p dir/emptydir # makefs requires a nonempty directory | atf_check -s exit:0 mkdir -p dir/emptydir # makefs requires a nonempty directory | ||||
| atf_check -s exit:0 -o ignore makefs -t cd9660 -Z -s 64m cd9660.img dir | atf_check -s exit:0 -o ignore makefs -t cd9660 -Z -s 64m cd9660.img dir | ||||
| atf_check -s exit:0 -o inline:"cd9660\n" fstyp cd9660.img | atf_check -s exit:0 -o inline:"cd9660\n" fstyp cd9660.img | ||||
| ▲ Show 20 Lines • Show All 214 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| zeros_body() { | zeros_body() { | ||||
| atf_check -s exit:0 truncate -s 256m zeros | atf_check -s exit:0 truncate -s 256m zeros | ||||
| atf_check -s exit:1 -e match:"filesystem not recognized" fstyp zeros | atf_check -s exit:1 -e match:"filesystem not recognized" fstyp zeros | ||||
| } | } | ||||
| atf_init_test_cases() { | atf_init_test_cases() { | ||||
| atf_add_test_case befs | |||||
| atf_add_test_case cd9660 | atf_add_test_case cd9660 | ||||
| atf_add_test_case cd9660_label | atf_add_test_case cd9660_label | ||||
| atf_add_test_case dir | atf_add_test_case dir | ||||
| atf_add_test_case empty | atf_add_test_case empty | ||||
| atf_add_test_case exfat | atf_add_test_case exfat | ||||
| atf_add_test_case exfat_label | atf_add_test_case exfat_label | ||||
| atf_add_test_case ext2 | atf_add_test_case ext2 | ||||
| atf_add_test_case ext3 | atf_add_test_case ext3 | ||||
| atf_add_test_case ext4 | atf_add_test_case ext4 | ||||
| atf_add_test_case ext4_label | atf_add_test_case ext4_label | ||||
| atf_add_test_case fat12 | atf_add_test_case fat12 | ||||
| atf_add_test_case fat16 | atf_add_test_case fat16 | ||||
| atf_add_test_case fat32 | atf_add_test_case fat32 | ||||
| atf_add_test_case fat32_label | atf_add_test_case fat32_label | ||||
| atf_add_test_case ntfs | atf_add_test_case ntfs | ||||
| atf_add_test_case ntfs_with_label | atf_add_test_case ntfs_with_label | ||||
| atf_add_test_case ufs1 | atf_add_test_case ufs1 | ||||
| atf_add_test_case ufs2 | atf_add_test_case ufs2 | ||||
| atf_add_test_case ufs2_label | atf_add_test_case ufs2_label | ||||
| atf_add_test_case ufs_on_device | atf_add_test_case ufs_on_device | ||||
| atf_add_test_case zeros | atf_add_test_case zeros | ||||
Done Inline ActionsThis seems to be slightly out of order. 0mp: This seems to be slightly out of order. | |||||
| } | } | ||||
s/befs/BeFS/