]> www.infradead.org Git - users/sagi/blktests.git/commit
nvme/rc: silence fcloop cleanup failures
authorDaniel Wagner <dwagner@suse.de>
Tue, 26 Mar 2024 13:13:44 +0000 (14:13 +0100)
committerShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Fri, 29 Mar 2024 05:36:25 +0000 (14:36 +0900)
commit862c4167ed19353c201b1dfa10c3f75a03b0c99a
treef5c1648d5340576d0b1b1399ca6f3d0376bb3092
parent385a6160963c0a2ecc4216c13445cd0c8b80fe41
nvme/rc: silence fcloop cleanup failures

When the ctl file is missing we are logging

  tests/nvme/rc: line 265: /sys/class/fcloop/ctl/del_target_port: No such file or directory
  tests/nvme/rc: line 257: /sys/class/fcloop/ctl/del_local_port: No such file or directory
  tests/nvme/rc: line 249: /sys/class/fcloop/ctl/del_remote_port: No such file or directory

because the first redirect operator fails. Also it's not possible to
redirect the 'echo' error to /dev/null, because it's a builtin command
which escapes the stderr redirect operator (why?).

Anyway, the simplest way to catch this error is to first check if the
control file exists before attempting to write to it.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
tests/nvme/rc