ndctl/test: correctly adjust rc for skip/fail

commit ea220a25821d upstream

The exit code for daxdev-errors wasn't being set correctly to
distinguish a skipped test from a failure. Fix it by setting rc to 77
prior to probing for nfit_test, and to 1 after it.

Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
diff --git a/test/daxdev-errors.sh b/test/daxdev-errors.sh
index 8115087..ff3db22 100755
--- a/test/daxdev-errors.sh
+++ b/test/daxdev-errors.sh
@@ -44,6 +44,8 @@
 $NDCTL zero-labels $BUS all
 $NDCTL enable-region $BUS all
 
+rc=1
+
 query=". | sort_by(.available_size) | reverse | .[0].dev"
 region=$($NDCTL list $BUS -t pmem -Ri | jq -r "$query")