Message ID | 153073826178.9647.3462886609135347418.stgit@dwillia2-desk3.amr.corp.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, 2018-07-04 at 14:04 -0700, Dan Williams wrote: > Commit 11b349b5236e "ndctl, test: Disable poison tests for now" > inadvertently prevented the dax.sh test from ever succeeding. Revert > the > change to return $rc instead of 0. > > Fixes: 11b349b5236e ("ndctl, test: Disable poison tests for now") > Signed-off-by: Dan Williams <dan.j.williams@intel.com> > --- > test/dax.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/test/dax.sh b/test/dax.sh > index 30fe16721935..2a82281edb35 100755 > --- a/test/dax.sh > +++ b/test/dax.sh > @@ -90,4 +90,4 @@ json=$($NDCTL create-namespace -m raw -f -e $dev) > eval $(echo $json | sed -e "$json2var") > [ $mode != "fsdax" ] && echo "fail: $LINENO" && exit 1 > > -exit $rc > +exit 0 I'm not sure I understand why this will cause it to always fail. rc is set in run_test, and that takes care of erroring out when the test returns anything other than 0 or 77. In case of 0 or 77, it falls through. So in the end here, we do want 'exit $rc' so we propagate the 77 correctly. Am I missing something?
On Fri, Jul 6, 2018 at 1:26 PM, Verma, Vishal L <vishal.l.verma@intel.com> wrote: > > On Wed, 2018-07-04 at 14:04 -0700, Dan Williams wrote: >> Commit 11b349b5236e "ndctl, test: Disable poison tests for now" >> inadvertently prevented the dax.sh test from ever succeeding. Revert >> the >> change to return $rc instead of 0. >> >> Fixes: 11b349b5236e ("ndctl, test: Disable poison tests for now") >> Signed-off-by: Dan Williams <dan.j.williams@intel.com> >> --- >> test/dax.sh | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/test/dax.sh b/test/dax.sh >> index 30fe16721935..2a82281edb35 100755 >> --- a/test/dax.sh >> +++ b/test/dax.sh >> @@ -90,4 +90,4 @@ json=$($NDCTL create-namespace -m raw -f -e $dev) >> eval $(echo $json | sed -e "$json2var") >> [ $mode != "fsdax" ] && echo "fail: $LINENO" && exit 1 >> >> -exit $rc >> +exit 0 > > I'm not sure I understand why this will cause it to always fail. rc is > set in run_test, and that takes care of erroring out when the test > returns anything other than 0 or 77. In case of 0 or 77, it falls > through. So in the end here, we do want 'exit $rc' so we propagate the > 77 correctly. Am I missing something? rc=1 https://github.com/pmem/ndctl/blob/master/test/dax.sh#L47
On Fri, 2018-07-06 at 13:30 -0700, Dan Williams wrote: > On Fri, Jul 6, 2018 at 1:26 PM, Verma, Vishal L > <vishal.l.verma@intel.com> wrote: > > > > On Wed, 2018-07-04 at 14:04 -0700, Dan Williams wrote: > > > Commit 11b349b5236e "ndctl, test: Disable poison tests for now" > > > inadvertently prevented the dax.sh test from ever succeeding. > > > Revert > > > the > > > change to return $rc instead of 0. > > > > > > Fixes: 11b349b5236e ("ndctl, test: Disable poison tests for now") > > > Signed-off-by: Dan Williams <dan.j.williams@intel.com> > > > --- > > > test/dax.sh | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/test/dax.sh b/test/dax.sh > > > index 30fe16721935..2a82281edb35 100755 > > > --- a/test/dax.sh > > > +++ b/test/dax.sh > > > @@ -90,4 +90,4 @@ json=$($NDCTL create-namespace -m raw -f -e > > > $dev) > > > eval $(echo $json | sed -e "$json2var") > > > [ $mode != "fsdax" ] && echo "fail: $LINENO" && exit 1 > > > > > > -exit $rc > > > +exit 0 > > > > I'm not sure I understand why this will cause it to always fail. rc > > is > > set in run_test, and that takes care of erroring out when the test > > returns anything other than 0 or 77. In case of 0 or 77, it falls > > through. So in the end here, we do want 'exit $rc' so we propagate > > the > > 77 correctly. Am I missing something? > > rc=1 > > https://github.com/pmem/ndctl/blob/master/test/dax.sh#L47 Yes, but that gets overriden by: https://github.com/pmem/ndctl/blob/master/test/dax.sh#L33
diff --git a/test/dax.sh b/test/dax.sh index 30fe16721935..2a82281edb35 100755 --- a/test/dax.sh +++ b/test/dax.sh @@ -90,4 +90,4 @@ json=$($NDCTL create-namespace -m raw -f -e $dev) eval $(echo $json | sed -e "$json2var") [ $mode != "fsdax" ] && echo "fail: $LINENO" && exit 1 -exit $rc +exit 0
Commit 11b349b5236e "ndctl, test: Disable poison tests for now" inadvertently prevented the dax.sh test from ever succeeding. Revert the change to return $rc instead of 0. Fixes: 11b349b5236e ("ndctl, test: Disable poison tests for now") Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- test/dax.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)