Commit 6499330
Ewan Crawford
[UR][CTS] Flip command-buffer assert condition (#18409)
The comparison on the assert conditions was incorrect, and should be
flipped to verify that the allocation size is greater than or equal to
the bytes being copied/read/written. Discovered during local testing
with a debug build
```
[ RUN ] urCommandBufferMemcpyCommandsTest.Buffer/NVIDIA_CUDA_BACKEND__NVIDIA_GeForce_GT_1030_ID0ID______W_________B______size__256__offset_src__127__offset_src__127__copy_size__128
test-exp_command_buffer: unified-runtime/test/conformance/exp_command_buffer/copy.cpp:28: virtual void urCommandBufferMemcpyCommandsTest::SetUp(): Assertion `size <= offset_src + copy_size' failed.
Aborted (core dumped)
```
We could just remove these asserts, as they are not present in other CTS
tests, but I think they do add some value in catching programmer error
when adding additional parameterized gtest cases, so kept the corrected
version around1 parent 713a9dd commit 6499330
3 files changed
Lines changed: 4 additions & 4 deletions
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
| 28 | + | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
0 commit comments