xfs
[Top] [All Lists]

Re: [PATCH v3] xfstests: Btrfs: add test for large metadata blocks

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH v3] xfstests: Btrfs: add test for large metadata blocks
From: Koen De Wit <koen.de.wit@xxxxxxxxxx>
Date: Tue, 11 Feb 2014 20:01:08 +0100
Cc: xfs@xxxxxxxxxxx, linux-btrfs@xxxxxxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20140210220400.GV13647@dastard>
Organization: Oracle Corporation
References: <1392068362-14049-1-git-send-email-koen.de.wit@xxxxxxxxxx> <20140210220400.GV13647@dastard>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
On 02/10/2014 11:04 PM, Dave Chinner wrote:
On Mon, Feb 10, 2014 at 10:39:22PM +0100, Koen De Wit wrote:
+
+_test_illegal_leafsize() {
+        _scratch_mkfs -l $1 >>$seqres.full 2>&1
+        [ $? -ne 0 ] || _fail "'$1' is an illegal value for the" \
+                "leafsize option, mkfs should have failed."
+}
You just re-implemented run_check....

I believe I didn't :
run_check()
{
        echo "# $@" >> $seqres.full 2>&1
        "$@" >> $seqres.full 2>&1 || _fail "failed: '$@'"
}
run_check() takes an arbitrary command and executes it, _test_illegal_leafsize() takes a leafsize as parameter and tries mkfs.btrfs with that leafsize. run_check() makes the test fail if the return code is not zero, _test_illegal_leafsize() does the opposite.

Thanks,
Koen.
<Prev in Thread] Current Thread [Next in Thread>