On 09/19/2013 04:47 PM, Stanislav Kholmanskikh wrote:
> Hi!
>
> During looking into shell testcases I came across a situation where
> * main shell script is a bash script (ie it has #!/bin/bash in the header)
> * for each testcase number main shell script executes a separate (child)
> shell-script which has #!/bin/sh in the header
>
> So If I try to run main script on Debian (where /bin/sh  points to
> /bin/dash) I get error like this:
> root@debian7-x64:/opt/ltp/testcases/bin# ./run_cpuset_test.sh 3
> TEST 3: CPUSET CONTROLLER TESTING
> TEST STARTED: Please avoid using system while this test executes
> ./cpuset_exclusive_test.sh: 34: ./cpuset_funcs.sh: arithmetic
> expression: expecting primary: "N_NODES++"
>
> So what is the policy regarding bash presence in LTP? Is it permitted to
> write testcases using bash specific features?
> Or are we strongly encouraged to use "common shell" only?
>
> And how should I proceed with this particular testcase? Try to remove
> "bashism" or just change header of child scripts from "#!/bin/sh" to
> "#!/bin/bash"?
>
> Thank you.
The problem is not because child is a "sh" script but because child 
includes cpuset_funcs.sh file (main includes it also) but
this file has bash-specific things.

>
>
>
>
>
> ------------------------------------------------------------------------------
> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
> _______________________________________________
> Ltp-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to