public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix combined usage of BISECT_REVERSE and BISECT_SKIP
@ 2012-04-23 23:08 Russ Dill
  2012-04-23 23:15 ` [PATCH v2] ktest.pl: " Russ Dill
  0 siblings, 1 reply; 6+ messages in thread
From: Russ Dill @ 2012-04-23 23:08 UTC (permalink / raw)
  To: linux-kernel; +Cc: Steven Rostedt, Russ Dill

When BISECT_REVERSE and BISECT_SKIP are used together with boot or test testing,
build failures are treated as boot or test failures and 'git bisect bad' is executed instead
of 'git bisect good'. This is because the $ret value of -1 is treated as a build failure, but
the $reverse_bisect logic does not properly handle this.

Simple fix, don't invert $ret if it is -1.

Signed-off-by: Russ Dill <Russ.Dill@ti.com>
---
 tools/testing/ktest/ktest.pl |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 95d6a6f..5221b00 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -2192,7 +2192,7 @@ sub run_bisect {
     }
 
     # Are we looking for where it worked, not failed?
-    if ($reverse_bisect) {
+    if ($reverse_bisect && $ret != -1) {
 	$ret = !$ret;
     }
 
-- 
1.7.9.5


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

* [PATCH v2] ktest.pl: Fix combined usage of BISECT_REVERSE and BISECT_SKIP
  2012-04-23 23:08 [PATCH] Fix combined usage of BISECT_REVERSE and BISECT_SKIP Russ Dill
@ 2012-04-23 23:15 ` Russ Dill
  2012-04-24  0:55   ` Steven Rostedt
  2012-04-24  2:43   ` [PATCH v3] " Russ Dill
  0 siblings, 2 replies; 6+ messages in thread
From: Russ Dill @ 2012-04-23 23:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Steven Rostedt, Russ Dill

When BISECT_REVERSE and BISECT_SKIP are used together with boot or test testing,
build failures are treated as boot or test failures and 'git bisect bad' is executed instead
of 'git bisect skip'. This is because the $ret value of -1 is treated as a build failure, but
the $reverse_bisect logic does not properly handle this.

Simple fix, don't invert $ret if it is -1.

Signed-off-by: Russ Dill <Russ.Dill@ti.com>
---
 tools/testing/ktest/ktest.pl |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 95d6a6f..5221b00 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -2192,7 +2192,7 @@ sub run_bisect {
     }
 
     # Are we looking for where it worked, not failed?
-    if ($reverse_bisect) {
+    if ($reverse_bisect && $ret != -1) {
 	$ret = !$ret;
     }
 
-- 
1.7.9.5


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

* Re: [PATCH v2] ktest.pl: Fix combined usage of BISECT_REVERSE and BISECT_SKIP
  2012-04-23 23:15 ` [PATCH v2] ktest.pl: " Russ Dill
@ 2012-04-24  0:55   ` Steven Rostedt
  2012-04-25  3:59     ` Russ Dill
  2012-04-24  2:43   ` [PATCH v3] " Russ Dill
  1 sibling, 1 reply; 6+ messages in thread
From: Steven Rostedt @ 2012-04-24  0:55 UTC (permalink / raw)
  To: Russ Dill; +Cc: linux-kernel

On Mon, 2012-04-23 at 16:15 -0700, Russ Dill wrote:
> When BISECT_REVERSE and BISECT_SKIP are used together with boot or test testing,
> build failures are treated as boot or test failures and 'git bisect bad' is executed instead
> of 'git bisect skip'. This is because the $ret value of -1 is treated as a build failure, but
> the $reverse_bisect logic does not properly handle this.
> 
> Simple fix, don't invert $ret if it is -1.
> 
> Signed-off-by: Russ Dill <Russ.Dill@ti.com>
> ---
>  tools/testing/ktest/ktest.pl |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
> index 95d6a6f..5221b00 100755
> --- a/tools/testing/ktest/ktest.pl
> +++ b/tools/testing/ktest/ktest.pl
> @@ -2192,7 +2192,7 @@ sub run_bisect {
>      }
>  
>      # Are we looking for where it worked, not failed?
> -    if ($reverse_bisect) {
> +    if ($reverse_bisect && $ret != -1) {

Thanks! But can you resend with the following change:

	... && $ret >= 0) {

Just incase we have $ret be another negative number for something else.

-- Steve

>  	$ret = !$ret;
>      }
>  



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

* [PATCH v3] ktest.pl: Fix combined usage of BISECT_REVERSE and BISECT_SKIP
  2012-04-23 23:15 ` [PATCH v2] ktest.pl: " Russ Dill
  2012-04-24  0:55   ` Steven Rostedt
@ 2012-04-24  2:43   ` Russ Dill
  1 sibling, 0 replies; 6+ messages in thread
From: Russ Dill @ 2012-04-24  2:43 UTC (permalink / raw)
  To: linux-kernel; +Cc: Steven Rostedt, Russ Dill

v3: Ignore all negative values, not just -1.

When BISECT_REVERSE and BISECT_SKIP are used together with boot or test testing,
build failures are treated as boot or test failures and 'git bisect bad' is executed instead
of 'git bisect skip'. This is because the $ret value of -1 is treated as a build failure, but
the $reverse_bisect logic does not properly handle this.

Simple fix, only invert it if it is positive.

Signed-off-by: Russ Dill <Russ.Dill@ti.com>
---
 tools/testing/ktest/ktest.pl |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 95d6a6f..d2ede59 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -2192,7 +2192,7 @@ sub run_bisect {
     }
 
     # Are we looking for where it worked, not failed?
-    if ($reverse_bisect) {
+    if ($reverse_bisect && $ret >= 0) {
 	$ret = !$ret;
     }
 
-- 
1.7.9.5


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

* Re: [PATCH v2] ktest.pl: Fix combined usage of BISECT_REVERSE and BISECT_SKIP
  2012-04-24  0:55   ` Steven Rostedt
@ 2012-04-25  3:59     ` Russ Dill
  2012-04-25 11:09       ` Steven Rostedt
  0 siblings, 1 reply; 6+ messages in thread
From: Russ Dill @ 2012-04-25  3:59 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-kernel

On 04/23/2012 05:55 PM, Steven Rostedt wrote:
> On Mon, 2012-04-23 at 16:15 -0700, Russ Dill wrote:
>> When BISECT_REVERSE and BISECT_SKIP are used together with boot or test testing,
>> build failures are treated as boot or test failures and 'git bisect bad' is executed instead
>> of 'git bisect skip'. This is because the $ret value of -1 is treated as a build failure, but
>> the $reverse_bisect logic does not properly handle this.
>>
>> Simple fix, don't invert $ret if it is -1.
>>
>> Signed-off-by: Russ Dill <Russ.Dill@ti.com>
>> ---
>>  tools/testing/ktest/ktest.pl |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
>> index 95d6a6f..5221b00 100755
>> --- a/tools/testing/ktest/ktest.pl
>> +++ b/tools/testing/ktest/ktest.pl
>> @@ -2192,7 +2192,7 @@ sub run_bisect {
>>      }
>>  
>>      # Are we looking for where it worked, not failed?
>> -    if ($reverse_bisect) {
>> +    if ($reverse_bisect && $ret != -1) {
> Thanks! But can you resend with the following change:
>
> 	... && $ret >= 0) {
>
> Just incase we have $ret be another negative number for something else.

BTW, I can across an additional problem that I'm not sure how to solve.
I'm using PRE_BUILD and POST_BUILD to apply a patch during a bisect. As
soon as the bisect hits a tree where the patch applies, the module
tar-up fails. The kernel version (and module path) has a '-dirty' but
ktest.pl is calling its get_version after POST_BUILD when the tree is clean.


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

* Re: [PATCH v2] ktest.pl: Fix combined usage of BISECT_REVERSE and BISECT_SKIP
  2012-04-25  3:59     ` Russ Dill
@ 2012-04-25 11:09       ` Steven Rostedt
  0 siblings, 0 replies; 6+ messages in thread
From: Steven Rostedt @ 2012-04-25 11:09 UTC (permalink / raw)
  To: Russ Dill; +Cc: linux-kernel

On Tue, 2012-04-24 at 20:59 -0700, Russ Dill wrote:

> BTW, I can across an additional problem that I'm not sure how to solve.
> I'm using PRE_BUILD and POST_BUILD to apply a patch during a bisect. As
> soon as the bisect hits a tree where the patch applies, the module
> tar-up fails. The kernel version (and module path) has a '-dirty' but
> ktest.pl is calling its get_version after POST_BUILD when the tree is clean.

I'm aware of this issue, as I hit this bug myself. I have some patches
that fix it, but they are currently ugly. I'm working on a better fix.

Thanks,

-- Steve



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

end of thread, other threads:[~2012-04-25 11:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-23 23:08 [PATCH] Fix combined usage of BISECT_REVERSE and BISECT_SKIP Russ Dill
2012-04-23 23:15 ` [PATCH v2] ktest.pl: " Russ Dill
2012-04-24  0:55   ` Steven Rostedt
2012-04-25  3:59     ` Russ Dill
2012-04-25 11:09       ` Steven Rostedt
2012-04-24  2:43   ` [PATCH v3] " Russ Dill

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