Commit Graph

4 Commits

Author SHA1 Message Date
Mike Fleetwood 7b6922c988 btrfs-progs: dump-super: exit with failure when printing bad superblock
Attempting to dump a bad btrfs superblock returns successful exit status
zero.  According to the manual page non-zero should be returned on
failure.  Fix this.

    $ btrfs inspect-internal dump-super /dev/zero
    superblock: bytenr=65536, device=/dev/zero
    ---------------------------------------------------------
    ERROR: bad magic on superblock on /dev/zero at 65536

    $ echo $?
    0

Signed-off-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2022-08-16 15:18:12 +02:00
David Sterba dcb174ce2e btrfs-progs: tests: add shell quotes to misc test scripts
Signed-off-by: David Sterba <dsterba@suse.com>
2018-03-30 22:15:55 +02:00
Gu Jinxiang cebf3b3722 btrfs-progs: introduce TEST_TOP and INTERNAL_BIN for tests
Use TEST_TOP as base for tests to reference any files, this will be used
for git and external testsuite.

INTERNAL_BIN is needed for referencing binaries that could reside in
different paths in git vs external testsuite.

Signed-off-by: Gu Jinxiang <gujx@cn.fujitsu.com>
[ add quotes around sourced files, update changelog ]
Signed-off-by: David Sterba <dsterba@suse.com>
2018-02-13 15:41:32 +01:00
David Sterba f919530b3a btrfs-progs: tests: add 015-dump-super-garbage
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-05 12:20:23 +02:00