Files
apfstests/tests/btrfs
Filipe Manana 255affa11c btrfs: fix local array declarations
We were declaring local arrays using a notation that does not seem to be
standard resulting in failures on some systems, like for example in a
Debian Stretch installation with bash version 4.4.11(1)-release:

$ ./check btrfs/003 btrfs/027
FSTYP         -- btrfs
PLATFORM      -- Linux/x86_64 debian3 4.10.0-rc8-btrfs-next-37+
MKFS_OPTIONS  -- /dev/sdc
MOUNT_OPTIONS -- /dev/sdc /home/fdmanana/btrfs-tests/scratch_1

btrfs/003 45s ... [failed, exit status 1] - output mismatch (see /home/fdmanana/git/hub/xfstests/results//btrfs/003.out.bad)
    --- tests/btrfs/003.out	2016-08-23 10:17:35.027012095 +0100
    +++ /home/fdmanana/git/hub/xfstests/results//btrfs/003.out.bad	2017-04-21 15:53:58.807366940 +0100
    @@ -1,2 +1,4 @@
     QA output created by 003
    -Silence is golden
    +./tests/btrfs/003: line 102: devs[]: bad array subscript
    +dev balance failed
    +(see /home/fdmanana/git/hub/xfstests/results//btrfs/003.full for details)
    ...
    (Run 'diff -u tests/btrfs/003.out /home/fdmanana/git/hub/xfstests/results//btrfs/003.out.bad'  to see the entire diff)
btrfs/027 7s ... [failed, exit status 1] - output mismatch (see /home/fdmanana/git/hub/xfstests/results//btrfs/027.out.bad)
    --- tests/btrfs/027.out	2016-08-23 10:17:35.035012077 +0100
    +++ /home/fdmanana/git/hub/xfstests/results//btrfs/027.out.bad	2017-04-21 15:53:59.835367271 +0100
    @@ -1,2 +1,7 @@
     QA output created by 027
     Silence is golden
    +./common/rc: line 935: devs[]: bad array subscript
    +./common/rc: line 893: devs[]: bad array subscript
    +mkfs -m raid1 -d raid1 failed
    +Bug: str empty, must call _spare_dev_get before its put
    +(see /home/fdmanana/git/hub/xfstests/results//btrfs/027.full for details)
    ...
    (Run 'diff -u tests/btrfs/027.out /home/fdmanana/git/hub/xfstests/results//btrfs/027.out.bad'  to see the entire diff)
Ran: btrfs/003 btrfs/027
Failures: btrfs/003 btrfs/027
Failed 2 of 2 tests

So fix this by changing the declaration pattern "local dev[]=..." to the
standard way of "local -a dev=...".

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-04-24 18:01:33 +08:00
..
2017-02-07 12:15:33 +08:00
2017-04-24 18:01:33 +08:00
2016-02-19 10:49:17 +11:00
2017-02-07 12:15:33 +08:00
2013-10-12 19:30:19 -05:00
2014-12-12 11:26:15 +11:00
2014-12-12 11:26:15 +11:00
2014-12-12 11:26:15 +11:00
2017-03-13 11:59:04 +08:00
2017-02-07 12:15:33 +08:00
2013-12-03 10:29:29 +11:00
2013-12-03 10:29:31 +11:00
2016-04-05 11:46:12 +10:00
2014-02-03 10:06:14 +11:00
2016-02-19 10:49:17 +11:00
2017-03-31 13:09:27 +08:00
2016-02-19 10:49:17 +11:00
2016-01-11 15:05:20 +11:00
2016-02-19 10:49:17 +11:00
2015-10-14 14:19:34 +11:00
2015-10-14 14:19:34 +11:00
2016-02-19 10:49:17 +11:00
2016-02-19 10:49:17 +11:00
2017-01-27 16:06:12 +08:00
2017-01-27 16:06:12 +08:00
2016-02-19 10:49:17 +11:00
2016-02-19 10:49:17 +11:00
2014-08-13 10:59:59 +10:00
2016-02-19 10:49:17 +11:00
2016-02-19 10:49:17 +11:00
2016-02-19 10:49:17 +11:00
2016-02-19 10:49:17 +11:00
2015-04-01 11:38:40 +11:00
2015-04-01 11:32:01 +11:00
2017-03-31 13:09:27 +08:00
2015-04-01 11:35:44 +11:00
2016-02-19 10:49:17 +11:00
2016-02-19 10:49:17 +11:00
2016-02-19 10:49:17 +11:00
2016-02-19 10:49:17 +11:00
2016-02-19 10:49:17 +11:00
2016-02-19 10:49:17 +11:00
2016-02-19 10:49:17 +11:00
2015-09-21 13:06:18 +10:00
2016-02-19 10:49:17 +11:00
2016-02-19 10:49:17 +11:00
2016-02-19 10:49:17 +11:00
2016-02-19 10:49:17 +11:00
2016-02-19 10:49:17 +11:00
2016-03-23 14:34:47 +11:00
2016-07-19 12:20:43 +08:00
2016-07-19 12:20:43 +08:00
2016-12-28 19:19:03 +08:00
2017-02-15 18:02:15 +08:00
2017-04-13 10:14:32 +08:00