In testcases/kernel/ipc/ipc_stress/cleanup file, it uses the command "ipcrm " to delete the ipc resources. But usage is deprecated and noneffective in some cases.
For example:
--------------------------------------
# ipcrm sem
usage: ipcrm [ [-q msqid] [-m shmid] [-s semid]
[-Q msgkey] [-M shmkey] [-S semkey] ... ]
deprecated usage: ipcrm {shm | msg | sem} id ...
[EMAIL PROTECTED] cvs_ltp]# ipcs -s
------ Semaphore Arrays --------
key semid owner perms nsems
[EMAIL PROTECTED] cvs_ltp]# testcases/bin/semaphore_test_01
704675840
[EMAIL PROTECTED] cvs_ltp]# ipcs -s
------ Semaphore Arrays --------
key semid owner perms nsems
0x00000000 704675840 root 660 1
===============
Before patching
================
[EMAIL PROTECTED] cvs_ltp]# testcases/kernel/ipc/ipc_stress/cleanup
ipcrm shm 32768
resource(s) deleted
[EMAIL PROTECTED] cvs_ltp]# ipcs -s
------ Semaphore Arrays --------
key semid owner perms nsems
0x00000000 704675840 root 660 1
================
After patching
================
[EMAIL PROTECTED] cvs_ltp]# patch -p1 <../Fix_ipcrm_clean.patch
patching file testcases/kernel/ipc/ipc_stress/cleanup
[EMAIL PROTECTED] cvs_ltp]# testcases/kernel/ipc/ipc_stress/cleanup
ipcrm -s 704675840
ipcrm -m 32768
[EMAIL PROTECTED] cvs_ltp]# ipcs -s
------ Semaphore Arrays --------
key semid owner perms nsems
[EMAIL PROTECTED] cvs_ltp]#
Signed-off-by: Jin Bing Guo <[EMAIL PROTECTED]>
-----------
(See attached file: Fix_ipcrm_clean.patch)
Best regards!
Jin Bing Guo 郭晋兵
Linux for System p Test
IBM China Systems & Technology Laboratory in Beijing
Tel: +86-10-82454439
Email: [EMAIL PROTECTED]
-------------------------------------
"Do today what others won't so tomorrow you do what other's can't"
Fix_ipcrm_clean.patch
Description: Binary data
------------------------------------------------------------------------- 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
