diff options
author | Dimitri John Ledkov <xnox@ubuntu.com> | 2016-05-10 10:13:23 +0100 |
---|---|---|
committer | Dimitri John Ledkov <xnox@ubuntu.com> | 2016-05-10 10:13:23 +0100 |
commit | 58e631d01823afd60e52f3a09887f270a91889a0 (patch) | |
tree | 6afbca5492c1ad1040608e01fe0c9d909482adeb /tests/misc-tests/014-filesystem-label/test.sh | |
parent | cec572daccafa1e912cbed363df6f84687778c6f (diff) |
New upstream release 4.5.2.
* Thanks for NMU of package rename.
* New upstream release 4.5.2.
* Upload using dgit.
* Source-only upload.
* btrfs-convert should not be included in the initramfs, but should be
compiled. Using btrfs-convert is not a trivial operation, and
especially not from a minimal shell. Also it is known to fail, and for
a sophisticated user it is trivial to include it in the
initramfs. Thus won't fix Closes: #801192
* No sponsorship required Closes: #823474
* Add Provides btrfs-tools-udeb to the -progs-udeb package.
Diffstat (limited to 'tests/misc-tests/014-filesystem-label/test.sh')
-rwxr-xr-x | tests/misc-tests/014-filesystem-label/test.sh | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/tests/misc-tests/014-filesystem-label/test.sh b/tests/misc-tests/014-filesystem-label/test.sh new file mode 100755 index 00000000..a5e08ccc --- /dev/null +++ b/tests/misc-tests/014-filesystem-label/test.sh @@ -0,0 +1,69 @@ +#!/bin/bash +# +# test label settings + +source $TOP/tests/common + +check_prereq mkfs.btrfs +check_prereq btrfs + +setup_root_helper + +run_check truncate -s 2G $IMAGE +run_check $TOP/mkfs.btrfs -L BTRFS-TEST-LABEL -f $IMAGE +run_check $SUDO_HELPER mount $IMAGE $TEST_MNT +run_check $SUDO_HELPER chmod a+rw $TEST_MNT + +cd $TEST_MNT +run_check $SUDO_HELPER $TOP/btrfs filesystem label $TEST_MNT +# shortest label +run_check $SUDO_HELPER $TOP/btrfs filesystem label $TEST_MNT a +run_check $SUDO_HELPER $TOP/btrfs filesystem label $TEST_MNT +run_check $SUDO_HELPER $TOP/btrfs filesystem label $TEST_MNT '' + +longlabel=\ +0123456789\ +0123456789\ +0123456789\ +0123456789\ +0123456789\ +\ +0123456789\ +0123456789\ +0123456789\ +0123456789\ +0123456789\ +\ +0123456789\ +0123456789\ +0123456789\ +0123456789\ +0123456789\ +\ +0123456789\ +0123456789\ +0123456789\ +0123456789\ +0123456789\ +\ +0123456789\ +0123456789\ +0123456789\ +0123456789\ +0123456789\ +\ +01234 + +run_check $SUDO_HELPER $TOP/btrfs filesystem label $TEST_MNT "$longlabel" +run_check $SUDO_HELPER $TOP/btrfs filesystem label $TEST_MNT +# 256, must fail +run_mustfail "label 256 bytes long succeeded" \ + $SUDO_HELPER $TOP/btrfs filesystem label $TEST_MNT "$longlabel"5 +run_check $SUDO_HELPER $TOP/btrfs filesystem label $TEST_MNT +run_mustfail "label 2 * 255 bytes long succeeded" \ + $SUDO_HELPER $TOP/btrfs filesystem label $TEST_MNT "$longlabel$longlabel" +run_check $SUDO_HELPER $TOP/btrfs filesystem label $TEST_MNT + +cd .. + +run_check $SUDO_HELPER umount $TEST_MNT |