Message ID | 865e28870eb8c072c2e368362a6d86fc4fb9cb61.1724813664.git.alison.schofield@intel.com |
---|---|
State | Accepted |
Commit | ceb596056aa612b88c4fb9fdebafb531d586ade7 |
Headers | show |
Series | Use CXL regions in daxctl-create unit test | expand |
On Tue, 2024-08-27 at 20:14 -0700, alison.schofield@intel.com wrote: > From: Alison Schofield <alison.schofield@intel.com> > > The check for 1GB of available space in a DAX region always returned > true due to being wrapped inside a [[ ... ]] test, even when space > wasn't available. That caused set size to fail. > > Update to use bash arithmetic evaluation instead. > > This issue likely went unnoticed because users allocated >= 1GB of > efi_fake_mem. This fix is part of the transition to use CXL regions > in this test as efi_fake_mem support is being removed from the > kernel. > > Signed-off-by: Alison Schofield <alison.schofield@intel.com> > --- > test/daxctl-create.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/test/daxctl-create.sh b/test/daxctl-create.sh > index c093cb9e306a..d968e7bedd82 100755 > --- a/test/daxctl-create.sh > +++ b/test/daxctl-create.sh > @@ -363,7 +363,7 @@ daxctl_test6() > > # Use 2M by default or 1G if supported > align=2097152 > - if [[ $((available >= 1073741824 )) ]]; then > + if (( available >= 1073741824 )); then Yikes, good find! Reviewed-by: Vishal Verma <vishal.l.verma@intel.com> > align=1073741824 > size=$align > fi
diff --git a/test/daxctl-create.sh b/test/daxctl-create.sh index c093cb9e306a..d968e7bedd82 100755 --- a/test/daxctl-create.sh +++ b/test/daxctl-create.sh @@ -363,7 +363,7 @@ daxctl_test6() # Use 2M by default or 1G if supported align=2097152 - if [[ $((available >= 1073741824 )) ]]; then + if (( available >= 1073741824 )); then align=1073741824 size=$align fi