On 02/19/2019 08:17 AM, Bart Van Assche wrote: > On Mon, 2019-02-18 at 10:53 -0800, Chaitanya Kulkarni wrote: >> Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx> >> --- >> tests/nvme/017 | 5 ++++- >> tests/nvme/017.out | 11 ----------- >> 2 files changed, 4 insertions(+), 12 deletions(-) >> >> diff --git a/tests/nvme/017 b/tests/nvme/017 >> index 0b86bec..db87759 100755 >> --- a/tests/nvme/017 >> +++ b/tests/nvme/017 >> @@ -37,7 +37,10 @@ test() { >> port="$(_create_nvmet_port "loop")" >> _add_nvmet_subsys_to_port "${port}" "${subsys_name}" >> >> - nvme discover -t loop | sed -r -e "s/portid: [0-9]+/portid: X/" >> + nvme discover -t loop | grep -q "${subsys_nqn}" >> + if [ $? -ne 0 ]; then >> + echo "nvme discover command failed" >> + fi > > Hi Chaitanya, > > Please keep the code style consistent with other blktests code and write that > if-condition as follows: > > if ! nvme discover -t loop | grep -q "${subsys_nqn}"; then > echo "nvme discover command failed" > fi > > Thanks, > > Bart. > Sounds good, will send out new revision.