[i-g-t,v3,2/2] tests/kms_flip: Change 2x tests execution order

Submitted by Kahola, Mika on Aug. 9, 2018, 10:12 a.m.

Details

Message ID 1533809554-27925-3-git-send-email-mika.kahola@intel.com
State New
Headers show
Series "tests/kms_flip: Binary mode optimizations" ( rev: 4 ) in IGT

Not browsing as part of any series.

Commit Message

Kahola, Mika Aug. 9, 2018, 10:12 a.m.
In order to optimize execution of kms_flip binary mode tests, let's change
the execution order so that 2x tests will be executed after basic tests.

v2: update commit message (Petri)
v3: Change subtest execution order

Signed-off-by: Mika Kahola <mika.kahola@intel.com>
---
 tests/kms_flip.c | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

Patch hide | download patch | download mbox

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 4cd1951..6217d67 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -1640,19 +1640,6 @@  int main(int argc, char **argv)
 			      tests[i].name)
 			run_test(max(opt.duration, tests[i].duration), tests[i].flags);
 
-		if (tests[i].flags & TEST_NO_2X_OUTPUT)
-			continue;
-
-		/* code doesn't disable all crtcs, so skip rpm tests */
-		if (tests[i].flags & TEST_RPM)
-			continue;
-
-		igt_subtest_f( "2x-%s", tests[i].name)
-			run_pair(max(opt.duration, tests[i].duration), tests[i].flags);
-	}
-
-	igt_fork_signal_helper();
-	for (i = 0; i < sizeof(tests) / sizeof (tests[0]); i++) {
 		/* relative blocking vblank waits that get constantly interrupt
 		 * take forver. So don't do them. */
 		if ((tests[i].flags & TEST_VBLANK_BLOCK) &&
@@ -1661,7 +1648,10 @@  int main(int argc, char **argv)
 
 		igt_subtest_f( "%s-interruptible", tests[i].name)
 			run_test(max(opt.duration, tests[i].duration), tests[i].flags);
+	}
 
+	igt_fork_signal_helper();
+	for (i = 0; i < sizeof(tests) / sizeof (tests[0]); i++) {
 		if (tests[i].flags & TEST_NO_2X_OUTPUT)
 			continue;
 
@@ -1669,6 +1659,15 @@  int main(int argc, char **argv)
 		if (tests[i].flags & TEST_RPM)
 			continue;
 
+		igt_subtest_f( "2x-%s", tests[i].name)
+			run_pair(max(opt.duration, tests[i].duration), tests[i].flags);
+
+		/* relative blocking vblank waits that get constantly interrupt
+		 * take forver. So don't do them. */
+		if ((tests[i].flags & TEST_VBLANK_BLOCK) &&
+		    !(tests[i].flags & TEST_VBLANK_ABSOLUTE))
+			continue;
+
 		igt_subtest_f( "2x-%s-interruptible", tests[i].name)
 			run_pair(max(opt.duration, tests[i].duration), tests[i].flags);
 	}

Comments

Op 09-08-18 om 12:12 schreef Mika Kahola:
> In order to optimize execution of kms_flip binary mode tests, let's change
> the execution order so that 2x tests will be executed after basic tests.
>
> v2: update commit message (Petri)
> v3: Change subtest execution order
>
> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> ---
>  tests/kms_flip.c | 25 ++++++++++++-------------
>  1 file changed, 12 insertions(+), 13 deletions(-)
>
> diff --git a/tests/kms_flip.c b/tests/kms_flip.c
> index 4cd1951..6217d67 100644
> --- a/tests/kms_flip.c
> +++ b/tests/kms_flip.c
> @@ -1640,19 +1640,6 @@ int main(int argc, char **argv)
>  			      tests[i].name)
>  			run_test(max(opt.duration, tests[i].duration), tests[i].flags);
>  
> -		if (tests[i].flags & TEST_NO_2X_OUTPUT)
> -			continue;
> -
> -		/* code doesn't disable all crtcs, so skip rpm tests */
> -		if (tests[i].flags & TEST_RPM)
> -			continue;
> -
> -		igt_subtest_f( "2x-%s", tests[i].name)
> -			run_pair(max(opt.duration, tests[i].duration), tests[i].flags);
> -	}
> -
> -	igt_fork_signal_helper();
> -	for (i = 0; i < sizeof(tests) / sizeof (tests[0]); i++) {
>  		/* relative blocking vblank waits that get constantly interrupt
>  		 * take forver. So don't do them. */
>  		if ((tests[i].flags & TEST_VBLANK_BLOCK) &&
> @@ -1661,7 +1648,10 @@ int main(int argc, char **argv)
>  
>  		igt_subtest_f( "%s-interruptible", tests[i].name)
>  			run_test(max(opt.duration, tests[i].duration), tests[i].flags);
> +	}
>  
> +	igt_fork_signal_helper();
Hmm, this forces all the 2x tests as interruptible?
> +	for (i = 0; i < sizeof(tests) / sizeof (tests[0]); i++) {
>  		if (tests[i].flags & TEST_NO_2X_OUTPUT)
>  			continue;
>  
> @@ -1669,6 +1659,15 @@ int main(int argc, char **argv)
>  		if (tests[i].flags & TEST_RPM)
>  			continue;
>  
> +		igt_subtest_f( "2x-%s", tests[i].name)
> +			run_pair(max(opt.duration, tests[i].duration), tests[i].flags);
> +
> +		/* relative blocking vblank waits that get constantly interrupt
> +		 * take forver. So don't do them. */
> +		if ((tests[i].flags & TEST_VBLANK_BLOCK) &&
> +		    !(tests[i].flags & TEST_VBLANK_ABSOLUTE))
> +			continue;
> +
>  		igt_subtest_f( "2x-%s-interruptible", tests[i].name) {
put igt_fork_signal_helper() here
>  			run_pair(max(opt.duration, tests[i].duration), tests[i].flags);
And stop it after.
>  	}

Yeah doing the 2x tests isn't optimal in that order and causes a lot of modesets.