]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: avoid a non-standard shell construct in rbd/iscsi_client.t
authorIlya Dryomov <idryomov@gmail.com>
Thu, 26 Sep 2024 15:36:37 +0000 (17:36 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 26 Sep 2024 16:17:05 +0000 (18:17 +0200)
dash which is used as /bin/sh on Ubuntu interprets "2&> /dev/null" as
an instruction to launch iscsiadm in the background.  While that is
mostly compensated by the following sleep, stderr isn't redirected to
/dev/null either -- the output gets polluted and the test fails.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/test/cli-integration/rbd/iscsi_client.t

index f636d540d897da7af78bb18a416a63cd7140555a..9a659e49eca68ee82735c356826ba86f9244d058 100644 (file)
@@ -1,7 +1,7 @@
 Login to the target
 ===================
   $ IP=`cat /etc/ceph/iscsi-gateway.cfg |grep 'trusted_ip_list' | awk -F'[, ]' '{print $3}'`
-  > sudo iscsiadm -m discovery -t st -p $IP -l 2&> /dev/null
+  $ sudo iscsiadm -m discovery -t st -p $IP -l >/dev/null 2>&1
   $ sleep 10
   $ sudo ls /dev/disk/by-path/ |grep 'iscsi-iqn.2003-01.com.redhat.iscsi-gw:ceph-gw' |wc -l
   2