Hi,
I report a bug of the msgctl02 testcase and a patch for it.
When you set /proc/sys/kernel/msgmnb to a value larger than 65536,
msgctl02 always results FAIL because of a bug itself.
An example when /proc/sys/kernel/msgmnb == 4194304,
# cd ./testcases/kernel/syscalls/ipc/msgctl
# ./msgctl02
msgctl02 1 FAIL : qs_buf.msg_qbytes value is not expected
msgctl02 0 INFO : expected - 65535, received - 4194303
#
This is because the variable "new_bytes" storing "expected" value above
is defined as "unsigned short" type and cannot hold a value
larger than 65535. It should be "msglen_t" type as same as the
member msg_qnum of struct msqid_ds, but msg_qnum seems to be declared
as "unsigned long int" type on some architecture like ia64,
I recommend you to use "unsigned long int" for new_bytes.
Signed-off-by: Seiichi Ikarashi <[EMAIL PROTECTED]>
---
===================================================================
--- old/testcases/kernel/syscalls/ipc/msgctl/msgctl02.c 2002-11-19
04:54:58.000000000 +0900
+++ new/testcases/kernel/syscalls/ipc/msgctl/msgctl02.c 2008-12-10
15:23:43.000000000 +0900
@@ -69,7 +69,7 @@ int msg_q_1 = -1; /
struct msqid_ds qs_buf;
-unsigned short new_bytes;
+unsigned long int new_bytes;
int main(int ac, char **av)
{
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list