Blank Params in YAML are not ignored

Bug #1283261 reported by Mike Holmes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LAVA Project
Confirmed
Medium
Tyler Baker

Bug Description

With this example

params:
    TESTCASE: "-t 1"
    THREADS:

run:
    steps:
        - lava-test-case odp_atomic --shell /usr/share/odp/odp_atomic $TESTCASE $THREADS
        - lava-test-case odp_atomic --shell /usr/share/odp/odp_atomic $TESTCASE

The result is a failure in the first case with odp_atomic failing to recognize its arguments and displaying help, followed by a successful run.
The expected result was for a blank $THREADS to have no effect.

./odp_atomic -t -n ,

  is
 1 - Test mix(does inc,dec,add,sub on 32/64 bit)
 2 - Test inc dec of signed word
 3 - Test add sub of signed word
 4 - Test inc dec of unsigned word
 5 - Test add sub of unsigned word
 6 - Test inc dec of double word
 7 - Test add sub of double word
  is optional
 <1 - 31> - no of pthreads to start
 if user doesn't specify this option, then
 no of pthreads created is equivalent to no of cores
 available in the system
 Example usage:
 ./odp_atomic -t 2
 ./odp_atomic -t 3 -n 12

 echo LAVA_ACK

 echo LAVA_ACK

 echo LAVA_ACK

 Buffer pool init global
 pool_entry_s size 128
 pool_entry_t size 128
 odp_buffer_hdr_t size 72

 Queue init ... done
 Queue init global
 struct queue_entry_s size 192
 queue_entry_t size 192

 Schedule init ... done

 ODP system info
 ---------------
 ODP API version: 0.0.1
 CPU model: UNKNOWN
 CPU freq (hz): 1400000000
 Cache line size: 64
 Core count: 2
 Core mask: 0x1

 test atomic inc/dec of signed word
 Thread 0 starts
 Thread 1 starts
 Time taken in thread 01 to complete op is 670047 usec
 Time taken in thread 00 to complete op is 670421 usec
 test atomic inc/dec of signed word_1_2 Result:pass

https://validation.linaro.org/scheduler/job/111902/log_file

Revision history for this message
Milosz Wasilewski (mwasilew) wrote :

Did you try:
THREADS: ""
?

Revision history for this message
Mike Holmes (mike-holmes) wrote : Re: [Bug 1283261] Re: Blank Params in JSON are not ignored

THREADS: ""

That works, thanks Milosz

But that is not the behavior I expected.
There was no message from LAVA to indicate that the params were incorrectly
specified by being empty, but clearly something was passed in place of that
that null data item, because the called app then was not able to understand
its arguments.

I think a blank should be treated as "" or an error thrown.

On 24 February 2014 06:00, Milosz Wasilewski
<email address hidden>wrote:

> Did you try:
> THREADS: ""
> ?
>
> --
> You received this bug notification because you are a member of Linaro
> Validation Team, which is subscribed to LAVA Project.
> https://bugs.launchpad.net/bugs/1283261
>
> Title:
> Blank Params in JSON are not ignored
>
> Status in LAVA Project:
> New
>
> Bug description:
> With this example
>
> params:
> TESTCASE: "-t 1"
> THREADS:
>
> run:
> steps:
> - lava-test-case odp_atomic --shell /usr/share/odp/odp_atomic
> $TESTCASE $THREADS
> - lava-test-case odp_atomic --shell /usr/share/odp/odp_atomic
> $TESTCASE
>
> The result is a failure in the first case with odp_atomic failing to
> recognize its arguments and displaying help, followed by a successful run.
> The expected result was for a blank $THREADS to have no effect.
>
>
> ./odp_atomic -t -n ,
>
> is
> 1 - Test mix(does inc,dec,add,sub on 32/64 bit)
> 2 - Test inc dec of signed word
> 3 - Test add sub of signed word
> 4 - Test inc dec of unsigned word
> 5 - Test add sub of unsigned word
> 6 - Test inc dec of double word
> 7 - Test add sub of double word
> is optional
> <1 - 31> - no of pthreads to start
> if user doesn't specify this option, then
> no of pthreads created is equivalent to no of cores
> available in the system
> Example usage:
> ./odp_atomic -t 2
> ./odp_atomic -t 3 -n 12
>
> echo LAVA_ACK
>
> echo LAVA_ACK
>
> echo LAVA_ACK
>
> Buffer pool init global
> pool_entry_s size 128
> pool_entry_t size 128
> odp_buffer_hdr_t size 72
>
> Queue init ... done
> Queue init global
> struct queue_entry_s size 192
> queue_entry_t size 192
>
> Schedule init ... done
>
> ODP system info
> ---------------
> ODP API version: 0.0.1
> CPU model: UNKNOWN
> CPU freq (hz): 1400000000
> Cache line size: 64
> Core count: 2
> Core mask: 0x1
>
> test atomic inc/dec of signed word
> Thread 0 starts
> Thread 1 starts
> Time taken in thread 01 to complete op is 670047 usec
> Time taken in thread 00 to complete op is 670421 usec
> test atomic inc/dec of signed word_1_2 Result:pass
>
> https://validation.linaro.org/scheduler/job/111902/log_file
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/lava-project/+bug/1283261/+subscriptions
>

Changed in lava-project:
assignee: nobody → Tyler Baker (tyler-baker)
importance: Undecided → Medium
status: New → Confirmed
Neil Williams (codehelp)
summary: - Blank Params in JSON are not ignored
+ Blank Params in YAML are not ignored
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.