From: Seiichi I. <s.i...@jp...> - 2008-12-10 07:37:21
|
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 <s.i...@jp...> --- =================================================================== --- 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) { |