Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/drv_hangman: remove check for other drm clients
@ 2014-12-01 14:42 tim.gore
  2014-12-01 17:09 ` Daniel Vetter
  0 siblings, 1 reply; 2+ messages in thread
From: tim.gore @ 2014-12-01 14:42 UTC (permalink / raw)
  To: intel-gfx; +Cc: daniel.vetter

From: Tim Gore <tim.gore@intel.com>

This test will not run on Android as the coreu service
remains running even after the android system is stopped.
Coreu is a client of drm and when the test finds this it
fails an assert.
Coreu is started by the init process and there is no
tidy, non invasive way to stop it (init just restarts it).
Coreu isn't doing anything and would not be expected to
interfere with this test. In addition, all the other
igt tests just rely on the user/test script to ensure
that there are no other drm clients, so this test can
do the same. On Android we must rely on coreu being
dormant when this test runs.

Signed-off-by: Tim Gore <tim.gore@intel.com>
---
 tests/drv_hangman.c | 22 ----------------------
 1 file changed, 22 deletions(-)

diff --git a/tests/drv_hangman.c b/tests/drv_hangman.c
index 8fbc2d3..cdbded2 100644
--- a/tests/drv_hangman.c
+++ b/tests/drv_hangman.c
@@ -163,26 +163,6 @@ static int get_line_count(const char *s)
 	return count;
 }
 
-static void check_other_clients(void)
-{
-	char tmp[1024];
-	char *s;
-	int dev, pid, uid, magic;
-
-	read_dfs("clients", tmp, sizeof(tmp));
-	if (get_line_count(tmp) <= 2)
-		return;
-
-	s = strstr(tmp, "y");
-	igt_assert(s != NULL);
-	igt_assert(sscanf(s, "y %d %d %d %d",
-			  &dev, &pid, &uid, &magic) == 4);
-
-	igt_debug("client %d %d %d %d\n", dev, pid, uid, magic);
-	igt_assert(pid == getpid());
-	igt_debug("found myself in client list\n");
-}
-
 #define MAGIC_NUMBER 0x10001
 const uint32_t batch[] = { MI_NOOP,
 			   MI_BATCH_BUFFER_END,
@@ -252,7 +232,6 @@ static void test_error_state_basic(void)
 {
 	int fd;
 
-	check_other_clients();
 	clear_error_state();
 	assert_error_state_clear();
 
@@ -406,7 +385,6 @@ static void test_error_state_capture(unsigned ring_id,
 	uint64_t offset;
 	bool cmd_parser;
 
-	check_other_clients();
 	clear_error_state();
 
 	fd = drm_open_any();
-- 
2.1.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH i-g-t] tests/drv_hangman: remove check for other drm clients
  2014-12-01 14:42 [PATCH i-g-t] tests/drv_hangman: remove check for other drm clients tim.gore
@ 2014-12-01 17:09 ` Daniel Vetter
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2014-12-01 17:09 UTC (permalink / raw)
  To: tim.gore; +Cc: daniel.vetter, intel-gfx

On Mon, Dec 01, 2014 at 02:42:37PM +0000, tim.gore@intel.com wrote:
> From: Tim Gore <tim.gore@intel.com>
> 
> This test will not run on Android as the coreu service
> remains running even after the android system is stopped.
> Coreu is a client of drm and when the test finds this it
> fails an assert.
> Coreu is started by the init process and there is no
> tidy, non invasive way to stop it (init just restarts it).
> Coreu isn't doing anything and would not be expected to
> interfere with this test. In addition, all the other
> igt tests just rely on the user/test script to ensure
> that there are no other drm clients, so this test can
> do the same. On Android we must rely on coreu being
> dormant when this test runs.
> 
> Signed-off-by: Tim Gore <tim.gore@intel.com>

Yeah makes sense (we've discussed this a bit in private). Patch applied,
thanks.
-Daniel

> ---
>  tests/drv_hangman.c | 22 ----------------------
>  1 file changed, 22 deletions(-)
> 
> diff --git a/tests/drv_hangman.c b/tests/drv_hangman.c
> index 8fbc2d3..cdbded2 100644
> --- a/tests/drv_hangman.c
> +++ b/tests/drv_hangman.c
> @@ -163,26 +163,6 @@ static int get_line_count(const char *s)
>  	return count;
>  }
>  
> -static void check_other_clients(void)
> -{
> -	char tmp[1024];
> -	char *s;
> -	int dev, pid, uid, magic;
> -
> -	read_dfs("clients", tmp, sizeof(tmp));
> -	if (get_line_count(tmp) <= 2)
> -		return;
> -
> -	s = strstr(tmp, "y");
> -	igt_assert(s != NULL);
> -	igt_assert(sscanf(s, "y %d %d %d %d",
> -			  &dev, &pid, &uid, &magic) == 4);
> -
> -	igt_debug("client %d %d %d %d\n", dev, pid, uid, magic);
> -	igt_assert(pid == getpid());
> -	igt_debug("found myself in client list\n");
> -}
> -
>  #define MAGIC_NUMBER 0x10001
>  const uint32_t batch[] = { MI_NOOP,
>  			   MI_BATCH_BUFFER_END,
> @@ -252,7 +232,6 @@ static void test_error_state_basic(void)
>  {
>  	int fd;
>  
> -	check_other_clients();
>  	clear_error_state();
>  	assert_error_state_clear();
>  
> @@ -406,7 +385,6 @@ static void test_error_state_capture(unsigned ring_id,
>  	uint64_t offset;
>  	bool cmd_parser;
>  
> -	check_other_clients();
>  	clear_error_state();
>  
>  	fd = drm_open_any();
> -- 
> 2.1.3
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2014-12-01 17:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-01 14:42 [PATCH i-g-t] tests/drv_hangman: remove check for other drm clients tim.gore
2014-12-01 17:09 ` Daniel Vetter

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