On 11/23/2012 01:28 PM, Garrett Cooper wrote: > On Thu, Nov 22, 2012 at 5:43 PM, Wanlong Gao <[email protected]> > wrote: >> On 11/23/2012 12:28 AM, [email protected] wrote: >>> Hi! >>>>>> Currently, -s option only can run the test case in alltests by >>>>>> the PATTERN, but I think it's worth to be able to run all of >>>>>> the test cases under runtest/ by the PATTERN. >>>>>> For example, we can run test case like "cpuhotplug01" using >>>>>> ./runltp -s cpuhotplug01 >>>>>> with this patch. >>>>>> >>>>>> Signed-off-by: Wanlong Gao <[email protected]> >>>>>> --- >>>>>> runltp | 2 +- >>>>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>>>> >>>>>> diff --git a/runltp b/runltp >>>>>> index 04cc690..7d54f0d 100755 >>>>>> --- a/runltp >>>>>> +++ b/runltp >>>>>> @@ -651,7 +651,7 @@ main() >>>>>> if [ -n "$TAG_RESTRICT_STRING" ] >>>>>> then >>>>>> mv -f ${TMP}/alltests ${TMP}/alltests.orig >>>>>> - grep $TAG_RESTRICT_STRING ${TMP}/alltests.orig > ${TMP}/alltests >>>>>> #Not worth checking return codes for this case >>>>>> + grep $TAG_RESTRICT_STRING ${LTPROOT}/runtest/* | awk -F':' '{print >>>>>> $2}' | sort -u > ${TMP}/alltests #Not worth checking return codes for >>>>>> this case >>>>>> fi >>>>>> >>>>>> # Blacklist or skip tests if a SKIPFILE was specified with -S >>>>> >>>>> The runltp script is one of the places I'm still not familiar with, but >>>>> I'm rather woried of the 'sort -u'. This would change the order and >>>>> count of LTP cases executed and that is something that should be >>>>> discussed first. >>>> >>>> Yeah, that's the thing, do you have any good idea about removing the >>>> repeated lines here? >>> >>> Thinking of it again, changing the behavior of a switch of released >>> script is not good idea in general. >> >> But I don't think this changes the behaviour of this switch, but improve it. > > That's a matter of opinion, but the flag has existed and > functioned in a particular way for almost a decade and what you're > suggesting will change the behavior (unexpectedly) and could match > some undesirable output, e.g. some of the tests might require > additional setup, or be stress / fault tolerance tests that would not > be normally matched (just to name a few possibilities). > If you want new behavior, you should deprecate the old option and > provide a new one.
OK, thank you for your explanation. Agreed and NACKed to this patch. Thanks, Wanlong Gao > Thanks, > -Garrett > ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
