Derrick Stolee <stolee@xxxxxxxxx> writes: >>> + if test $exitcode != $expect_exit >> >> ... this will not trigger and we return "success" (i.e. "failed as >> expected")? > > Am I misunderstanding something here? If exitcode is 2, then this > will always trigger and return 1, signaling a failure. Are, please disregard. Yes, the above does the right thing already.