The shutdown test utilizes waiting for condition to exit the test. This
addition will return an error for the shutdown command to see if the
condition waiting code will not hang.
Coverity complained about unused variable that contains the shutdown
mode. The original intention was to check it against the requested mode.
Also the fixed check revealed a mistake in the expected shutdown mode.
Reported by John Ferlan.