annotate tests/blkid.test @ 1650:a740a876c76c draft

Cleanup pass on printf. Alas, passing a union as the last argument to printf does not appear to work reliably, and there's no obvious way to manually assemble varargs in a portable manner. So I have to repeat the printf once for each data type. Oh well.
author Rob Landley <rob@landley.net>
date Sun, 11 Jan 2015 01:22:36 -0600
parents 8700cbe1cb29
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1122
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
1 #!/bin/bash
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
2
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
3 [ -f testing.sh ] && . testing.sh
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
4
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
5 #testing "name" "command" "result" "infile" "stdin"
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
6
1485
8700cbe1cb29 Move testsuite out of scripts/test into its own top level tests directory, and make ctrl-c kill "make test" more reliably.
Rob Landley <rob@landley.net>
parents: 1161
diff changeset
7 BDIR="$TOPDIR/tests/blkid"
1122
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
8
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
9 bzcat "$BDIR"/squashfs.bz2 > temp.img
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
10 testing "blkid file" "blkid temp.img" 'temp.img: TYPE="squashfs"\n' "" ""
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
11 rm temp.img
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
12
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
13 testing "blkid cramfs" 'bzcat "$BDIR"/cramfs.bz2 | blkid -' \
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
14 '-: LABEL="mycramfs" TYPE="cramfs"\n' "" ""
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
15 testing "blkid ext2" 'bzcat "$BDIR"/ext2.bz2 | blkid -' \
1161
9dc339b4ac2c Clean up half-finished blkid.test.
Rob Landley <rob@landley.net>
parents: 1122
diff changeset
16 '-: LABEL="myext2" UUID="e59093ba-4135-4fdb-bcc4-f20beae4dfaf" TYPE="ext2"\n' \
1122
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
17 "" ""
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
18 testing "blkid ext3" 'bzcat "$BDIR"/ext3.bz2 | blkid -' \
1161
9dc339b4ac2c Clean up half-finished blkid.test.
Rob Landley <rob@landley.net>
parents: 1122
diff changeset
19 '-: LABEL="myext3" UUID="79d1c877-1a0f-4e7d-b21d-fc32ae3ef101" TYPE="ext2"\n' \
1122
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
20 "" ""
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
21 testing "blkid ext4" 'bzcat "$BDIR"/ext4.bz2 | blkid -' \
1161
9dc339b4ac2c Clean up half-finished blkid.test.
Rob Landley <rob@landley.net>
parents: 1122
diff changeset
22 '-: LABEL="myext4" UUID="dc4b7c00-c0c0-4600-af7e-0335f09770fa" TYPE="ext2"\n' \
1122
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
23 "" ""
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
24 testing "blkid f2fs" 'bzcat "$BDIR"/f2fs.bz2 | blkid -' \
1161
9dc339b4ac2c Clean up half-finished blkid.test.
Rob Landley <rob@landley.net>
parents: 1122
diff changeset
25 '-: LABEL="" UUID="b53d3619-c204-4c0b-8504-36363578491c" TYPE="f2fs"\n' \
1122
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
26 "" ""
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
27 testing "blkid msdos" 'bzcat "$BDIR"/msdos.bz2 | blkid -' \
1161
9dc339b4ac2c Clean up half-finished blkid.test.
Rob Landley <rob@landley.net>
parents: 1122
diff changeset
28 '-: LABEL="mymsdos " UUID="5108-1e6e" TYPE="vfat"\n' "" ""
1122
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
29 testing "blkid ntfs" 'bzcat "$BDIR"/ntfs.bz2 | blkid -' \
1161
9dc339b4ac2c Clean up half-finished blkid.test.
Rob Landley <rob@landley.net>
parents: 1122
diff changeset
30 '-: UUID="8585600838bfe16e" TYPE="ntfs"\n' "" ""
1122
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
31 testing "blkid reiserfs" 'bzcat "$BDIR"/reiser3.bz2 | blkid -' \
1161
9dc339b4ac2c Clean up half-finished blkid.test.
Rob Landley <rob@landley.net>
parents: 1122
diff changeset
32 '-: LABEL="" UUID="a5b99bec-45cc-41d7-986e-32f4b6fc28f2" TYPE="reiserfs"\n' \
1122
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
33 "" ""
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
34 testing "blkid squashfs" 'bzcat "$BDIR"/squashfs.bz2 | blkid -' \
1161
9dc339b4ac2c Clean up half-finished blkid.test.
Rob Landley <rob@landley.net>
parents: 1122
diff changeset
35 '-: TYPE="squashfs"\n' "" ""
1122
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
36 testing "blkid vfat" 'bzcat "$BDIR"/vfat.bz2 | blkid -' \
1161
9dc339b4ac2c Clean up half-finished blkid.test.
Rob Landley <rob@landley.net>
parents: 1122
diff changeset
37 '-: LABEL="myvfat " UUID="1db9-5673" TYPE="vfat"\n' "" ""
1122
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
38 testing "blkid xfs" 'bzcat "$BDIR"/xfs.bz2 | blkid -' \
1161
9dc339b4ac2c Clean up half-finished blkid.test.
Rob Landley <rob@landley.net>
parents: 1122
diff changeset
39 '-: LABEL="XFS_test" UUID="d63a1dc3-27d5-4dd4-8b38-f4f97f495c6f" TYPE="xfs"\n' \
1122
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
40 "" ""
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
41
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
42 #testing "blkid minix" 'bzcat "$BDIR"/minix.bz2 | blkid -'
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
43 #adfs bfs btrfs cramfs jfs nilfs romfs
663242f2962c Add test suite for blkid and clean up an editorial comment that shouldn't have been checked in.
Rob Landley <rob@landley.net>
parents:
diff changeset
44 #vfat // fat32 fat12 fat16