* [LTP] Policy regarding BASH
@ 2013-09-19 12:47 Stanislav Kholmanskikh
2013-09-19 12:50 ` Stanislav Kholmanskikh
2013-09-19 13:40 ` chrubis
0 siblings, 2 replies; 4+ messages in thread
From: Stanislav Kholmanskikh @ 2013-09-19 12:47 UTC (permalink / raw)
To: ltp-list
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.
------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] Policy regarding BASH
2013-09-19 12:47 [LTP] Policy regarding BASH Stanislav Kholmanskikh
@ 2013-09-19 12:50 ` Stanislav Kholmanskikh
2013-09-19 13:40 ` chrubis
1 sibling, 0 replies; 4+ messages in thread
From: Stanislav Kholmanskikh @ 2013-09-19 12:50 UTC (permalink / raw)
To: ltp-list
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
> Ltp-list@lists.sourceforge.net
> 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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] Policy regarding BASH
2013-09-19 12:47 [LTP] Policy regarding BASH Stanislav Kholmanskikh
2013-09-19 12:50 ` Stanislav Kholmanskikh
@ 2013-09-19 13:40 ` chrubis
2013-10-14 5:33 ` Mike Frysinger
1 sibling, 1 reply; 4+ messages in thread
From: chrubis @ 2013-09-19 13:40 UTC (permalink / raw)
To: Stanislav Kholmanskikh; +Cc: ltp-list
Hi!
> 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?
Just fix the tests to work with common shell and send a patch.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-10-14 5:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-19 12:47 [LTP] Policy regarding BASH Stanislav Kholmanskikh
2013-09-19 12:50 ` Stanislav Kholmanskikh
2013-09-19 13:40 ` chrubis
2013-10-14 5:33 ` Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox