* [PATCH ndctl] test/cxl-update-firmware: Fix checksum sysfs query
@ 2023-09-13 0:14 Ira Weiny
2023-09-13 0:17 ` Dave Jiang
2023-09-13 2:58 ` Dan Williams
0 siblings, 2 replies; 3+ messages in thread
From: Ira Weiny @ 2023-09-13 0:14 UTC (permalink / raw)
To: Vishal Verma, Dan Williams; +Cc: linux-cxl, Ira Weiny
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(-)
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 <ira.weiny@intel.com>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH ndctl] test/cxl-update-firmware: Fix checksum sysfs query
2023-09-13 0:14 [PATCH ndctl] test/cxl-update-firmware: Fix checksum sysfs query Ira Weiny
@ 2023-09-13 0:17 ` Dave Jiang
2023-09-13 2:58 ` Dan Williams
1 sibling, 0 replies; 3+ messages in thread
From: Dave Jiang @ 2023-09-13 0:17 UTC (permalink / raw)
To: Ira Weiny, Vishal Verma, Dan Williams; +Cc: linux-cxl
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,
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH ndctl] test/cxl-update-firmware: Fix checksum sysfs query
2023-09-13 0:14 [PATCH ndctl] test/cxl-update-firmware: Fix checksum sysfs query Ira Weiny
2023-09-13 0:17 ` Dave Jiang
@ 2023-09-13 2:58 ` Dan Williams
1 sibling, 0 replies; 3+ messages in thread
From: Dan Williams @ 2023-09-13 2:58 UTC (permalink / raw)
To: Ira Weiny, Vishal Verma, Dan Williams; +Cc: linux-cxl, Ira Weiny
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-13 2:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-13 0:14 [PATCH ndctl] test/cxl-update-firmware: Fix checksum sysfs query Ira Weiny
2023-09-13 0:17 ` Dave Jiang
2023-09-13 2:58 ` Dan Williams
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.