Re: [LTP] [PATCH 04/05] Add Script which will be at the heart of this infrastructure

Mike Frysinger
2009-08-13T07:11:28Z

[-- Attachment #1.1: Type: text/plain, Size: 1857 bytes --]

On Wednesday 12 August 2009 07:21:00 Subrata Modak wrote:
> On Wed, 2009-08-12 at 01:42 -0700, Garrett Cooper wrote:
> > On Tue, Aug 11, 2009 at 10:30 AM, Subrata Modak wrote:
> > > At the heart of this infrastructure is this Script, which will
> > > actually: 1) Change the temporary command file generated by runltp,
> > > 2) Create a new temporary command file which will have the following
> > > entries against each one entry in the command file:
> > > i) Same TAG COMMAND_LINE entry,
> > > ii) Entry to call the script to insert faults,
> > > iii) Entry to run as many loops as specified by the user,
> > > iv) Entry to call the script to restore kernel to default state,
> > >
> > > It is capable of creating new entries in the temporary command file
> > > with the following tags and command lines:
> > > TAG_NAME=tag1, COMMANDLINE="test1",
> > > TAG_NAME=tag1_loop1, COMMANDLINE="insert_fault_in_kernel; test1",
> > > TAG_NAME=tag1_loop2, COMMANDLINE="test1",
> > > ...
> > > TAG_NAME=tag1_loopn, COMMANDLINE="test1; restore_default_kernel",
> > >
> > > Signed-off-by: Subrata Modak <subrata@linux.vnet.ibm.com>
> > > ---
> > >
> > > tools/create_kernel_faults_in_loops_and_probability.pl
> > > +#!/usr/bin/perl
> >
> > 1. Why is this written in perl? bourne shell should be the maximum
> > requirement for any and all infrastructure scripts.
>
> I initially wrote this in perl as i feel more comfortable in doing
> regular expression in perl than in any other language. If you want you
> can later replace it with a shell script, i will not have any objection.

agreed ... we should avoid perl when possible as it is simply not viable for
cross/embedded setups. i already spent quite a bit of time in the past
replacing perl scripts with POSIX shell scripts.
-mike

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 355 bytes --]

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]