Hi,

--- Elder Costa <[EMAIL PROTECTED]> wrote:

> Jin Bing Guo wrote:
> > Hi Elder,
> > 
> > It's really a problem on this cases. My solution is to deal with
> the 
> > semaphore ID with 0 individually.
> > So I have to separate the semaphore ID with 0 from other IDs.
> 
> The same error happens with ipcs under Ubuntu.
> 
> The attached patch contains a quick and dirty fix to the testcase
> script
> that seems not to break it (tested with Ubuntu only).
> 
> Regards.
> 
> Elder.
> 
> Signed-Off-By: Elder Costa <[EMAIL PROTECTED]>
> 
> 
> 
> 
> 
> 
> 
> > ---
>
ltp-cvs-081006a/testcases/kernel/ipc/ipc_stress/run_semaphore_test_01.sh.ORIG
> 2008-10-01 09:50:25.000000000 -0300
> +++
>
ltp-cvs-081006a/testcases/kernel/ipc/ipc_stress/run_semaphore_test_01.sh
> 2008-10-07 11:23:41.000000000 -0300
> @@ -99,7 +99,7 @@
>  fi
>  
>  # Get the semphore ID by "ipcs -s"
> -SEMS=`ipcs -s | awk '{printf " %d", $2}' | sed -e 's/ 0//g'`
> +SEMS=`LANG= ipcs -s | awk '{print $2}' | grep [[:digit:]]`
>  for SEM_IPCS in $SEMS
>  do
>      if [ $SEM_IPCS -eq $SEM_ID ] ;then

No, this will break the original behaviour. In my system,

$ ipcs -s | awk '{printf " %d", $2}' | sed -e 's/ 0//g'
<empty>

$ LANG= ipcs -s | awk '{print $2}' | grep [[:digit:]]
0

$ ipcs -s

------ Semaphore Arrays --------
key        semid      owner      perms      nsems     
0x4d03d671 0          qcai      600        8         


Cai Qian

> 
> > Test Start Time: Tue Oct  7 11:26:28 2008
> -----------------------------------------
> Testcase                       Result     Exit Value
> --------                       ------     ----------
> semaphore_test_01              PASS       0    
> 
> -----------------------------------------------
> Total Tests: 1
> Total Failures: 0
> Kernel Version: 2.6.25.15-eit-080923a-cpufreq
> Machine Architecture: i686
> Hostname: coreduo
> 
> > Test Start Time: Tue Oct  7 11:26:31 2008
> -----------------------------------------
> Testcase                       Result     Exit Value
> --------                       ------     ----------
> semaphore_test_01              PASS       0    
> 
> -----------------------------------------------
> Total Tests: 1
> Total Failures: 0
> Kernel Version: 2.6.25.15-eit-080923a-cpufreq
> Machine Architecture: i686
> Hostname: coreduo
> 
> >
-------------------------------------------------------------------------
> 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
> 


-------------------------------------------------------------------------
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

Reply via email to