|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
Network stress tests fail with UbuntuUnder Ubuntu several network stress tests fail due to the use of bash
specific syntax that Ubuntu's sh (aka dash) does not support. I have managed to work around them by simply changing the headers of all the scripts from #!/bin/sh to #!/bin/bash. I would like to suggest this change as I think it will have no impact over other Linux distros. I am attaching a script instead of a patch as the latter would be too BIG for the task. Regards. Elder. Signed-Off-By: Elder Costa <elder.costa@...> #!/bin/sh if [ $# -ne 1 ]; then echo "Usage: $0 LTP_ROOT" exit 1 fi STRESS_DIR="$1/testcases/network/stress" ls -ld ${STRESS_DIR} 1>/dev/null 2>/dev/null if [ $? -ne 0 ]; then echo "Invalid LTP_ROOT" exit 1 fi cd ${STRESS_DIR} find . -type f | xargs sed -i s/'\/bin\/sh'/'\/bin\/bash'/ ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ltp-list mailing list Ltp-list@... https://lists.sourceforge.net/lists/listinfo/ltp-list |
|
|
Re: Network stress tests fail with UbuntuMike,
What do you think about this ? Regards-- Subrata On Thu, 2008-10-02 at 17:45 -0300, Elder Costa wrote: > Under Ubuntu several network stress tests fail due to the use of bash > specific syntax that Ubuntu's sh (aka dash) does not support. > > I have managed to work around them by simply changing the headers of all > the scripts from #!/bin/sh to #!/bin/bash. > > I would like to suggest this change as I think it will have no impact > over other Linux distros. > > I am attaching a script instead of a patch as the latter would be too > BIG for the task. > > Regards. > > Elder. > > Signed-Off-By: Elder Costa <elder.costa@...> > plain text document attachment (patch_network_stress) > #!/bin/sh > > if [ $# -ne 1 ]; then > echo "Usage: $0 LTP_ROOT" > exit 1 > fi > > STRESS_DIR="$1/testcases/network/stress" > ls -ld ${STRESS_DIR} 1>/dev/null 2>/dev/null > if [ $? -ne 0 ]; then > echo "Invalid LTP_ROOT" > exit 1 > fi > > cd ${STRESS_DIR} > > find . -type f | xargs sed -i s/'\/bin\/sh'/'\/bin\/bash'/ > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ Ltp-list mailing list Ltp-list@... https://lists.sourceforge.net/lists/listinfo/ltp-list ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ltp-list mailing list Ltp-list@... https://lists.sourceforge.net/lists/listinfo/ltp-list |
|
|
Re: Network stress tests fail with UbuntuOn Sunday 05 October 2008, Subrata Modak wrote:
> On Thu, 2008-10-02 at 17:45 -0300, Elder Costa wrote: > > Under Ubuntu several network stress tests fail due to the use of bash > > specific syntax that Ubuntu's sh (aka dash) does not support. > > > > I have managed to work around them by simply changing the headers of all > > the scripts from #!/bin/sh to #!/bin/bash. > > > > I would like to suggest this change as I think it will have no impact > > over other Linux distros. > > > > I am attaching a script instead of a patch as the latter would be too > > BIG for the task. > > > > Regards. > > > > Elder. > > > > Signed-Off-By: Elder Costa <elder.costa@...> > > plain text document attachment (patch_network_stress) > > #!/bin/sh > > > > if [ $# -ne 1 ]; then > > echo "Usage: $0 LTP_ROOT" > > exit 1 > > fi > > > > STRESS_DIR="$1/testcases/network/stress" > > ls -ld ${STRESS_DIR} 1>/dev/null 2>/dev/null > > if [ $? -ne 0 ]; then > > echo "Invalid LTP_ROOT" > > exit 1 > > fi > > > > cd ${STRESS_DIR} > > > > find . -type f | xargs sed -i s/'\/bin\/sh'/'\/bin\/bash'/ > > What do you think about this ? a broken shell. why dont we get examples of failures and then we can figure out whether it's Ubuntu being broken or there actually are bashisms in the scripts (which we would then fix). simply saying "the scripts have bashisms" is not nearly enough for me to actually check ... there's too many scripts and i have no idea what i'm looking for. -mike ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ltp-list mailing list Ltp-list@... https://lists.sourceforge.net/lists/listinfo/ltp-list |
|
|
Re: Network stress tests fail with UbuntuMike Frysinger escreveu:
> On Sunday 05 October 2008, Subrata Modak wrote: > >> On Thu, 2008-10-02 at 17:45 -0300, Elder Costa wrote: >> >>> Under Ubuntu several network stress tests fail due to the use of bash >>> specific syntax that Ubuntu's sh (aka dash) does not support. >>> >>> I have managed to work around them by simply changing the headers of all >>> the scripts from #!/bin/sh to #!/bin/bash. >>> >>> I would like to suggest this change as I think it will have no impact >>> over other Linux distros. >>> >>> I am attaching a script instead of a patch as the latter would be too >>> BIG for the task. >>> >>> Regards. >>> >>> Elder. >>> >>> Signed-Off-By: Elder Costa <elder.costa@...> >>> plain text document attachment (patch_network_stress) >>> #!/bin/sh >>> >>> if [ $# -ne 1 ]; then >>> echo "Usage: $0 LTP_ROOT" >>> exit 1 >>> fi >>> >>> STRESS_DIR="$1/testcases/network/stress" >>> ls -ld ${STRESS_DIR} 1>/dev/null 2>/dev/null >>> if [ $? -ne 0 ]; then >>> echo "Invalid LTP_ROOT" >>> exit 1 >>> fi >>> >>> cd ${STRESS_DIR} >>> >>> find . -type f | xargs sed -i s/'\/bin\/sh'/'\/bin\/bash'/ >>> >> What do you think about this ? >> > > blindly converting to /bin/bash is an awful idea. Ubuntu is also know to ship > a broken shell. why dont we get examples of failures and then we can figure > out whether it's Ubuntu being broken or there actually are bashisms in the > scripts (which we would then fix). > > simply saying "the scripts have bashisms" is not nearly enough for me to > actually check ... there's too many scripts and i have no idea what i'm > looking for. > -mike > some sites (e.g. https://wiki.ubuntu.com/DashAsBinSh) is accurate as far as bashisms are concerned. But some examples in the network stress test scripts that I have read are bashisms: 1- use of source instead of . 2- use of == for comparisons 3- uname -u (not sure if it is a bashism but dash does not support it). I will run the test tomorrow without the changes and post the results. Regards. Elder. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ltp-list mailing list Ltp-list@... https://lists.sourceforge.net/lists/listinfo/ltp-list |
|
|
Re: Network stress tests fail with UbuntuOn Sunday 05 October 2008, Elder.Costa wrote:
> Hello. I am not a shell script expert. So I cannot say if what I read in > some sites (e.g. https://wiki.ubuntu.com/DashAsBinSh) is accurate as far > as bashisms are concerned. But some examples in the network stress test > scripts that I have read are bashisms: again, listing random things isnt useful. i'm aware of all the fun POSIX details. i need to see the actual scripts you're running and the errors you're seeing. > 1- use of source instead of . ive fixed all of these with sed ... hopefully i didnt break anything in the process > 2- use of == for comparisons i see all of one script using == and it's been fixed > 3- uname -u (not sure if it is a bashism but dash does not support it). uname has nothing to do with the shell ... but i dont see any scripts calling uname with the -u option ... -mike ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ltp-list mailing list Ltp-list@... https://lists.sourceforge.net/lists/listinfo/ltp-list |
|
|
Re: Network stress tests fail with UbuntuMike Frysinger wrote:
>> 1- use of source instead of . > > ive fixed all of these with sed ... hopefully i didnt break anything in the > process OK > >> 2- use of == for comparisons > > i see all of one script using == and it's been fixed > OK >> 3- uname -u (not sure if it is a bashism but dash does not support it). > > uname has nothing to do with the shell ... but i dont see any scripts calling > uname with the -u option ... > -mike > OOPS. ulimit -u. Ubuntu's sh/dash equivalent is -p. :( I have just ran a quick check with a subset of the stress tests (no ipsec/ipcomp as I do not have them set up and no multi NIC tests due to hardware limitations) and the tests have run fine. BTW there is a typo in several scripts (TINFO messages): dulation instead of duration. Regards. Elder. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ltp-list mailing list Ltp-list@... https://lists.sourceforge.net/lists/listinfo/ltp-list |
|
|
Re: Network stress tests fail with UbuntuOn Monday 06 October 2008, Elder Costa wrote:
> Mike Frysinger wrote: > >> 3- uname -u (not sure if it is a bashism but dash does not support it). > > > > uname has nothing to do with the shell ... but i dont see any scripts > > calling uname with the -u option ... > > OOPS. ulimit -u. Ubuntu's sh/dash equivalent is -p. :( ulimit is inherently non-standardized. dash not following bash in argument compatibility is just dumb. -p in bash is pipe size, not process. does it actually cause the script to abort ? or do you just get a warning about unknown option ? > I have just ran a quick check with a subset of the stress tests (no > ipsec/ipcomp as I do not have them set up and no multi NIC tests due to > hardware limitations) and the tests have run fine. thanks for testing > BTW there is a typo in several scripts (TINFO messages): dulation > instead of duration. thanks, ive run sed on the files to fix that as well -mike ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ltp-list mailing list Ltp-list@... https://lists.sourceforge.net/lists/listinfo/ltp-list |
|
|
Re: Network stress tests fail with UbuntuMike Frysinger wrote:
> ulimit is inherently non-standardized. dash not following bash in argument > compatibility is just dumb. I totally agree. > > does it actually cause the script to abort ? or do you just get a warning > about unknown option ? It just issue an "Illegal option -u" message and proceeds with the test. Thus not a big deal. Regards. Elder. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ltp-list mailing list Ltp-list@... https://lists.sourceforge.net/lists/listinfo/ltp-list |
|
|
Re: Network stress tests fail with UbuntuOn Sun, 2008-10-05 at 23:34 -0400, Mike Frysinger wrote: > On Sunday 05 October 2008, Elder.Costa wrote: > > Hello. I am not a shell script expert. So I cannot say if what I read in > > some sites (e.g. https://wiki.ubuntu.com/DashAsBinSh) is accurate as far > > as bashisms are concerned. But some examples in the network stress test > > scripts that I have read are bashisms: > > again, listing random things isnt useful. i'm aware of all the fun POSIX > details. i need to see the actual scripts you're running and the errors > you're seeing. > > > 1- use of source instead of . > > ive fixed all of these with sed ... hopefully i didnt break anything in the > process Thanks Mike for fixing and checking in those huge changes. Regards-- Subrata > > > 2- use of == for comparisons > > i see all of one script using == and it's been fixed > > > 3- uname -u (not sure if it is a bashism but dash does not support it). > > uname has nothing to do with the shell ... but i dont see any scripts calling > uname with the -u option ... > -mike ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ltp-list mailing list Ltp-list@... https://lists.sourceforge.net/lists/listinfo/ltp-list |
| Free Forum Powered by Nabble | Forum Help |