Message ID | 20230912-cxl-fw-test-fix-v1-1-bc544002cd02@intel.com |
---|---|
State | Accepted |
Commit | 1db7dfb0bd1b14baffc7c6ac44ace9046d98a00d |
Headers | show |
Series | [ndctl] test/cxl-update-firmware: Fix checksum sysfs query | expand |
On 9/12/23 17:14, Ira Weiny wrote: > The cxl-update-firmware test is failing on 6.5 and recent 6.6-rc > kernels. > > The checksum check incorrectly uses the mem device id to form the host > name when checking the firmware checksum. > > Get the host value from the mem device and use that in the query. > > Fixes: 813809ed318f ("test/cxl-update-firmware: add a unit test for firmware update") > Cc: Vishal Verma <vishal.l.verma@intel.com> > Signed-off-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> > --- > test/cxl-update-firmware.sh | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/test/cxl-update-firmware.sh b/test/cxl-update-firmware.sh > index c6cd7429bb85..f326868977a9 100755 > --- a/test/cxl-update-firmware.sh > +++ b/test/cxl-update-firmware.sh > @@ -118,14 +118,15 @@ validate_staged_slot() > check_sha() > { > mem="$1" > + host=$($CXL list -m $mem | jq -r '.[].host') > file="$2" > - csum_path="/sys/bus/platform/devices/cxl_mem.${mem#mem}/fw_buf_checksum" > + csum_path="/sys/bus/platform/devices/${host}/fw_buf_checksum" > > mem_csum="$(cat "$csum_path")" > file_csum="$(sha256sum "$file" | awk '{print $1}')" > > if [[ $mem_csum != $file_csum ]]; then > - echo "checksum failure for mem$mem" > + echo "checksum failure for mem=$mem" > err "$LINENO" > fi > } > > --- > base-commit: a871e6153b11fe63780b37cdcb1eb347b296095c > change-id: 20230912-cxl-fw-test-fix-5b11b75412a0 > > Best regards,
Ira Weiny wrote: > The cxl-update-firmware test is failing on 6.5 and recent 6.6-rc > kernels. > > The checksum check incorrectly uses the mem device id to form the host > name when checking the firmware checksum. > > Get the host value from the mem device and use that in the query. > > Fixes: 813809ed318f ("test/cxl-update-firmware: add a unit test for firmware update") > Cc: Vishal Verma <vishal.l.verma@intel.com> > Signed-off-by: Ira Weiny <ira.weiny@intel.com> Works for me: Tested-by: Dan Williams <dan.j.williams@intel.com>
diff --git a/test/cxl-update-firmware.sh b/test/cxl-update-firmware.sh index c6cd7429bb85..f326868977a9 100755 --- a/test/cxl-update-firmware.sh +++ b/test/cxl-update-firmware.sh @@ -118,14 +118,15 @@ validate_staged_slot() check_sha() { mem="$1" + host=$($CXL list -m $mem | jq -r '.[].host') file="$2" - csum_path="/sys/bus/platform/devices/cxl_mem.${mem#mem}/fw_buf_checksum" + csum_path="/sys/bus/platform/devices/${host}/fw_buf_checksum" mem_csum="$(cat "$csum_path")" file_csum="$(sha256sum "$file" | awk '{print $1}')" if [[ $mem_csum != $file_csum ]]; then - echo "checksum failure for mem$mem" + echo "checksum failure for mem=$mem" err "$LINENO" fi }
The cxl-update-firmware test is failing on 6.5 and recent 6.6-rc kernels. The checksum check incorrectly uses the mem device id to form the host name when checking the firmware checksum. Get the host value from the mem device and use that in the query. Fixes: 813809ed318f ("test/cxl-update-firmware: add a unit test for firmware update") Cc: Vishal Verma <vishal.l.verma@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> --- test/cxl-update-firmware.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- base-commit: a871e6153b11fe63780b37cdcb1eb347b296095c change-id: 20230912-cxl-fw-test-fix-5b11b75412a0 Best regards,