Created
April 21, 2018 15:40
-
-
Save ricarkol/f72687245e143bc04ba4814c6088d13e to your computer and use it in GitHub Desktop.
Test for the ocaml-fat bin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
umount /tmp/mnt_fat_test || true | |
mkdir -p /tmp/mnt_fat_test | |
( | |
dd if=/dev/zero of=test/disk-512.dat count=4096 bs=4096 | |
mkfs.fat -f 1 -S 512 test/disk-512.dat | |
mount test/disk-512.dat /tmp/mnt_fat_test | |
cd /tmp/mnt_fat_test | |
bash -c "mkdir -p {root1,root2}/{abc,xyz/cba/zyx}" | |
echo bla > bla | |
echo root1_bla > root1/bla | |
echo root1_abc_bla > root1/abc/bla | |
echo root1_xyz_bla > root1/xyz/bla | |
echo root1_xyz_cba_bla > root1/xyz/cba/bla | |
echo root1_xyz_cba_zyx_bla > root1/xyz/cba/zyx/bla | |
echo root2_bla > root2/bla | |
echo root2_abc_bla > root2/abc/bla | |
echo root2_xyz_bla > root2/xyz/bla | |
echo root2_xyz_cba_bla > root2/xyz/cba/bla | |
echo root2_xyz_cba_zyx_bla > root2/xyz/cba/zyx/bla | |
) | |
sync | |
umount /tmp/mnt_fat_test | |
echo both should print 41 | |
fsck.fat -vl test/disk-512.dat | grep "Checking file" | wc -l | |
./_build/install/default/bin/fat list --unbuffered test/disk-512.dat | grep -a bytes | wc -l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment