]> www.infradead.org Git - users/sagi/blktests.git/commitdiff
nbd/002: fix shellcheck warning
authorOmar Sandoval <osandov@fb.com>
Mon, 11 Jun 2018 20:35:49 +0000 (13:35 -0700)
committerOmar Sandoval <osandov@fb.com>
Mon, 11 Jun 2018 20:35:49 +0000 (13:35 -0700)
tests/nbd/002:37:2: note: Consider using { cmd1; cmd2; } >> file instead of individual redirects. [SC2129]

Signed-off-by: Omar Sandoval <osandov@fb.com>
tests/nbd/002

index b1a4b3c3ffeba845c05b189c81d2a00c191d0ae6..c06c94631aabbb67f736e82d70651fd7a759e100 100644 (file)
@@ -34,10 +34,11 @@ requires() {
 test() {
        echo "Running ${TEST_NAME}"
        _start_nbd_server
-       nbd-client -N export localhost /dev/nbd0 >> "$FULL" 2>&1
-
-       parted -s /dev/nbd0 mklabel msdos >> "$FULL" 2>&1
-       parted -s /dev/nbd0 mkpart primary 0 100 >> "$FULL" 2>&1
+       {
+       nbd-client -N export localhost /dev/nbd0
+       parted -s /dev/nbd0 mklabel msdos
+       parted -s /dev/nbd0 mkpart primary 0 100
+       } >> "$FULL" 2>&1
 
        # We need to wait for udev to do its thing before we disconnect or else
        # we'll get timed out requests.