Linux CXL
 help / color / mirror / Atom feed
* [PATCH] tools/testing/cxl: slow down the mock firmware transfer
@ 2023-10-26 17:20 Vishal Verma
  2023-10-26 17:23 ` Dan Williams
  0 siblings, 1 reply; 2+ messages in thread
From: Vishal Verma @ 2023-10-26 17:20 UTC (permalink / raw)
  To: linux-cxl
  Cc: Dan Williams, alison.schofield, Davidlohr Bueso, Jonathan Cameron,
	Dave Jiang, Ira Weiny, Vishal Verma

The cxl-cli unit test for firmware update does operations like starting
an asynchronous firmware update, making sure it is in progress, and
attempting to cancel it. In some cases, such as with no or minimal
dynamic debugging turned on, the firmware update completes too quickly,
not allowing the test to have a chance to verify it was in progress.
This caused a failure of the signature:

  expected fw_update_in_progress:true
  test/cxl-update-firmware.sh: failed at line 88

Fix this by adding a fixed delay (2ms) to each firmware transfer
request handled by the mocked interface.

Reported-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
---
 tools/testing/cxl/test/mem.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/cxl/test/mem.c b/tools/testing/cxl/test/mem.c
index 464fc39ed277..a74da69876f2 100644
--- a/tools/testing/cxl/test/mem.c
+++ b/tools/testing/cxl/test/mem.c
@@ -1237,6 +1237,7 @@ static int mock_transfer_fw(struct cxl_mockmem_data *mdata,
 	}
 
 	memcpy(fw + offset, transfer->data, length);
+	udelay(2000);
 	return 0;
 }
 

---
base-commit: 8a749fd1a8720d4619c91c8b6e7528c0a355c0aa
change-id: 20231026-vv-fw_upd_test_fix-533e9a63f005

Best regards,
-- 
Vishal Verma <vishal.l.verma@intel.com>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [PATCH] tools/testing/cxl: slow down the mock firmware transfer
  2023-10-26 17:20 [PATCH] tools/testing/cxl: slow down the mock firmware transfer Vishal Verma
@ 2023-10-26 17:23 ` Dan Williams
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Williams @ 2023-10-26 17:23 UTC (permalink / raw)
  To: Vishal Verma, linux-cxl
  Cc: Dan Williams, alison.schofield, Davidlohr Bueso, Jonathan Cameron,
	Dave Jiang, Ira Weiny, Vishal Verma

Vishal Verma wrote:
> The cxl-cli unit test for firmware update does operations like starting
> an asynchronous firmware update, making sure it is in progress, and
> attempting to cancel it. In some cases, such as with no or minimal
> dynamic debugging turned on, the firmware update completes too quickly,
> not allowing the test to have a chance to verify it was in progress.
> This caused a failure of the signature:
> 
>   expected fw_update_in_progress:true
>   test/cxl-update-firmware.sh: failed at line 88
> 
> Fix this by adding a fixed delay (2ms) to each firmware transfer
> request handled by the mocked interface.
> 
> Reported-by: Dan Williams <dan.j.williams@intel.com>

Tested-by: Dan Williams <dan.j.williams@intel.com>

Thanks, Vishal!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-26 17:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-26 17:20 [PATCH] tools/testing/cxl: slow down the mock firmware transfer Vishal Verma
2023-10-26 17:23 ` Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox