[Twg] stand alone testing

Chris chris at whamcloud.com
Wed May 16 12:18:35 UTC 2012


On 15/05/2012 19:39, Bruce Korb wrote:
> Hi Chris,
>
> On 5/15/12 10:02 AM, Chris wrote:
>>> This does not prevent any of these phases from being in a library
>>> for use by any test, but it would mean that a given test cannot
>>> presuppose that some other test had been run before it.
>> One problem with this approach and looking at the history of the current
>> bash code is that it will lead to duplication via copy and paste because
>> people won't write libraries, bash does not lend itself to this and so
>> solutions will be messy.
> Bash *does* lend itself to libraries, but it is not a well understood
> technique.  Shell scripts, by and large, do tend to be messy, but that
> is really much more a matter of education and technique than it is
> of inherent capabilities.
>
> Due to scripting misuse, using another tool less prone to messy source
> seems like a reasonable approach.  But the issue is not that of
> inadequacies
> of bash.
>
>
I absolutely agree Bruce and what we should learn from the last 10 years 
of Lustre and by looking at 37000 lines of bash code is that people 
don't do the right big picture thing when it comes to test scripts and 
so I want us to adopt approaches that tend to cause the right thing to 
happen.

If we declare that all test scripts and modifications will now be 
written in a structured, clear, well documented manner where duplicate 
functionality is pulled out into libraries, variables are never 
duplicate, naming is consistent... then I would have less concerns and 
we would have more degrees of freedom.  But can't actually do that and 
so methods that encourage reuse and discourage code replication are a must.

I also absolutely think we need to begin the work of creating a whole 
new methodology (not to replace the bash but to provide for new tests) 
that provides another tool less prone to messy source and structure. 
Getting this right will be difficult because we need to provide for all 
the freedom that developers require whilst constraining them into 
something that over the next 10 years leads to an ordered outcome.

Chris


More information about the Twg mailing list