summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-09-01 20:05:20 +0200
committerDavid Sterba <dsterba@suse.com>2016-09-05 12:20:23 +0200
commitf919530b3a1d5876d3ce6213dbb0b65b853f2ba8 (patch)
tree5588e588ff1d6221b6ff82bef487666ad435db9e /tests
parentee7bb45ddc5e436a7f22fe170184575426dff9dc (diff)
btrfs-progs: tests: add 015-dump-super-garbage
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/misc-tests/015-dump-super-garbage/test.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/misc-tests/015-dump-super-garbage/test.sh b/tests/misc-tests/015-dump-super-garbage/test.sh
new file mode 100755
index 00000000..33fc8332
--- /dev/null
+++ b/tests/misc-tests/015-dump-super-garbage/test.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+# let dump-super dump random data, must not crash
+
+source $TOP/tests/common
+
+check_prereq btrfs
+
+run_check $TOP/btrfs inspect-internal dump-super /dev/urandom
+run_check $TOP/btrfs inspect-internal dump-super -a /dev/urandom
+run_check $TOP/btrfs inspect-internal dump-super -fa /dev/urandom
+run_check $TOP/btrfs inspect-internal dump-super -Ffa /dev/urandom
+run_check $TOP/btrfs inspect-internal dump-super -Ffa /dev/urandom
+run_check $TOP/btrfs inspect-internal dump-super -Ffa /dev/urandom
+run_check $TOP/btrfs inspect-internal dump-super -Ffa /dev/urandom
+run_check $TOP/btrfs inspect-internal dump-super -Ffa /dev/urandom
+run_check $TOP/btrfs inspect-internal dump-super -Ffa /dev/urandom