amdgpu: make userptr unit test more interesting
PATCH 1/1 amdgpu: make userptr unit test more interesting
From: Christian König <[email protected]>
Do a fork() to force some MMU callbacks.
--- tests/amdgpu/basic_tests.c | 8 ++++++++ 1 file changed, 8 insertions(+)
tests/amdgpu/basic_tests.c +8 -0
@@ -31,6 +31,7 @@#ifdef HAVE_ALLOCA_H # include <alloca.h> #endif +#include <sys/wait.h> #include "CUnit/Basic.h"
@@ -1403,6 +1404,11 @@ static void amdgpu_userptr_test(void)while (j++ < sdma_write_length) pm4[i++] =0xdeadbeaf ; +if (!fork ()) { + pm4[0 ] =0x0 ; +exit (0 ); + } + amdgpu_test_exec_cs_helper(context_handle, AMDGPU_HW_IP_DMA, 0, i, pm4,
@@ -1426,4 +1432,6 @@ static void amdgpu_userptr_test(void) r =amdgpu_cs_ctx_free (context_handle);CU_ASSERT_EQUAL (r,0 ); + +wait (NULL ); }
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1504772213-14952-1-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org
Deucher, Alexander
Acked-by Alex DeucherQuoted 7 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Christian König
Sent: Thursday, September 07, 2017 4:17 AM
To: [email protected]
Subject: [PATCH libdrm] amdgpu: make userptr unit test more interesting
Quoted 5 lines
From: Christian König <[email protected]>
Do a
fork()to force some MMU callbacks.Signed-off-by Christian König <[email protected]>
Quoted 38 lines
--- tests/amdgpu/basic_tests.c | 8 ++++++++ 1 file changed, 8 insertions(+)tests/amdgpu/basic_tests.c +8
-1@@ -31,6 +31,7 @@#ifdef HAVE_ALLOCA_H # include <alloca.h> #endif +#include <sys/wait.h> #include "CUnit/Basic.h" @@ -1403,6 +1404,11 @@ static void amdgpu_userptr_test(void)while (j++ < sdma_write_length) pm4[i++] =0xdeadbeaf ; +if (!fork ()) { + pm4[0 ] =0x0 ; +exit (0 ); + } + amdgpu_test_exec_cs_helper(context_handle, AMDGPU_HW_IP_DMA, 0, i, pm4,@@ -1426,4 +1432,6 @@ static void amdgpu_userptr_test(void) r =amdgpu_cs_ctx_free (context_handle);CU_ASSERT_EQUAL (r,0 ); + +wait (NULL ); } --2.7.4
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx