[PATCH liburing 1/1] tests: improve zcrx export tests
Pavel Begunkov <[email protected]>
| Newsgroups | org.kernel.vger.io-uring |
|---|---|
| Message-ID | <df5e866a3c0582ae42538841dc54fffc45004aa9.1778775960.git.asml.silence@gmail.com> |
Use the right zcrx id in test_zcrx_invalid_clone(). And fetch the fd after exporting, it's currently just 0 and is not checked. Signed-off-by: Pavel Begunkov <[email protected]> --- test/zcrx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/zcrx.c b/test/zcrx.c index a0e8a863..e4d2213e 100644 --- a/test/zcrx.c +++ b/test/zcrx.c @@ -751,11 +751,11 @@ static int test_zcrx_invalid_clone(void) return ret; } ctrl = (struct zcrx_ctrl) { - .zcrx_id = 0, + .zcrx_id = reg.zcrx.zcrx_id, .op = ZCRX_CTRL_EXPORT, }; - box_fd = ctrl.zc_export.zcrx_fd; ret = t_zcrx_ctrl(&r1, &ctrl); + box_fd = ctrl.zc_export.zcrx_fd; if (ret < 0 || (int)box_fd < 0) { fprintf(stderr, "Can'r export zcrx %i\n", ret); return -1; -- 2.53.0