[PATCH] tests/cpu-policy: fix "run" goal

Jan Beulich posted 1 patch 1 year ago
Failed in applying to current master (apply log)
[PATCH] tests/cpu-policy: fix "run" goal
Posted by Jan Beulich 1 year ago
An earlier change converted TARGET-y to TARGETS, but failed to replace
all references. Convert run's dependency, but use $< in the command to
avoid the leading blank that += inserts.

Fixes: 6a9f5477637a ("tests/cpu-policy: Rework Makefile")
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/tools/tests/cpu-policy/Makefile
+++ b/tools/tests/cpu-policy/Makefile
@@ -16,8 +16,8 @@ endif
 all: $(TARGETS)
 
 .PHONY: run
-run: $(TARGET-y)
-	./$(TARGET-y)
+run: $(TARGETS)
+	./$<
 
 .PHONY: clean
 clean:
Re: [PATCH] tests/cpu-policy: fix "run" goal
Posted by Roger Pau Monné 1 year ago
On Tue, Apr 18, 2023 at 11:01:56AM +0200, Jan Beulich wrote:
> An earlier change converted TARGET-y to TARGETS, but failed to replace
> all references. Convert run's dependency, but use $< in the command to
> avoid the leading blank that += inserts.
> 
> Fixes: 6a9f5477637a ("tests/cpu-policy: Rework Makefile")
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> --- a/tools/tests/cpu-policy/Makefile
> +++ b/tools/tests/cpu-policy/Makefile
> @@ -16,8 +16,8 @@ endif
>  all: $(TARGETS)
>  
>  .PHONY: run
> -run: $(TARGET-y)
> -	./$(TARGET-y)
> +run: $(TARGETS)
> +	./$<

Since it seems like TARGETS can contain multiple outputs, do we want
to have a for loop here?

Thanks, Roger.
Re: [PATCH] tests/cpu-policy: fix "run" goal
Posted by Jan Beulich 1 year ago
On 18.04.2023 11:30, Roger Pau Monné wrote:
> On Tue, Apr 18, 2023 at 11:01:56AM +0200, Jan Beulich wrote:
>> An earlier change converted TARGET-y to TARGETS, but failed to replace
>> all references. Convert run's dependency, but use $< in the command to
>> avoid the leading blank that += inserts.
>>
>> Fixes: 6a9f5477637a ("tests/cpu-policy: Rework Makefile")
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>
>> --- a/tools/tests/cpu-policy/Makefile
>> +++ b/tools/tests/cpu-policy/Makefile
>> @@ -16,8 +16,8 @@ endif
>>  all: $(TARGETS)
>>  
>>  .PHONY: run
>> -run: $(TARGET-y)
>> -	./$(TARGET-y)
>> +run: $(TARGETS)
>> +	./$<
> 
> Since it seems like TARGETS can contain multiple outputs, do we want
> to have a for loop here?

Imo TARGETS is just the conventional name, even if it expand to only
a single target. I'd prefer to stick with the simple rule until such
time that there really are multiple executables here.

Jan

Re: [PATCH] tests/cpu-policy: fix "run" goal
Posted by Roger Pau Monné 1 year ago
On Tue, Apr 18, 2023 at 11:38:48AM +0200, Jan Beulich wrote:
> On 18.04.2023 11:30, Roger Pau Monné wrote:
> > On Tue, Apr 18, 2023 at 11:01:56AM +0200, Jan Beulich wrote:
> >> An earlier change converted TARGET-y to TARGETS, but failed to replace
> >> all references. Convert run's dependency, but use $< in the command to
> >> avoid the leading blank that += inserts.
> >>
> >> Fixes: 6a9f5477637a ("tests/cpu-policy: Rework Makefile")
> >> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> >>
> >> --- a/tools/tests/cpu-policy/Makefile
> >> +++ b/tools/tests/cpu-policy/Makefile
> >> @@ -16,8 +16,8 @@ endif
> >>  all: $(TARGETS)
> >>  
> >>  .PHONY: run
> >> -run: $(TARGET-y)
> >> -	./$(TARGET-y)
> >> +run: $(TARGETS)
> >> +	./$<
> > 
> > Since it seems like TARGETS can contain multiple outputs, do we want
> > to have a for loop here?
> 
> Imo TARGETS is just the conventional name, even if it expand to only
> a single target. I'd prefer to stick with the simple rule until such
> time that there really are multiple executables here.

Not specially fuzzed either way, and it's certainly an improvement
from the current status:

Acked-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks, Roger.