Subrata Modak wrote:
> On Fri, 2008-10-03 at 02:25 -0700, CAI Qian wrote:
>> Hi,
>>
>> --- Elder Costa <[EMAIL PROTECTED]> wrote:
>>
>>> test_ioctl produces a 'Syntax error: Bad substitution: 28' under
>>> Ubuntu
>>> (and much probably Debian).
>>>
>>> The following patch solves this issue. I tested it with sh (aka dash)
>>>
>>> and bash.
>>>
>>> Regards.
>>>
>>> Elder.
>>>
>>> Signed-Off-By: Elder Costa <[EMAIL PROTECTED]>
>>>
>>>
>>>> --- testcases/kernel/syscalls/ioctl/test_ioctl.ORIG 2008-10-02
>>> 11:38:04.000000000 -0300
>>> +++ testcases/kernel/syscalls/ioctl/test_ioctl 2008-10-02
>>> 11:45:44.000000000 -0300
>>> @@ -25,7 +25,7 @@
>>>
>>> for tttype in `ls /dev/tty*`
>>> do
>>> -device_no=${tttype:8}
>> This is bash extension ${parameter:offset}. See man bash.
>>
>>> +device_no="${tttype}:8"
> Fine, if it solves his problem and does not break ours.
The test script did not get executed, after the change, it just exits. One
way to fix it is to use
device_no=`echo $tttype | cut -c 9-`
But I guess it is better to change #!/bin/sh to #!/bin/bash rather than
change every usage of bash features. It is much more convenient and
maintainable to write test cases in bash rather than sh.
Regards,
Vijay
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list