public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [COMMITTED] [PATCH] mq_timedreceive_5-3: Initialize maxmsg properly
@ 2021-02-12 15:15 Cyril Hrubis
  2021-02-15  5:35 ` Joerg Vehlow
  0 siblings, 1 reply; 4+ messages in thread
From: Cyril Hrubis @ 2021-02-12 15:15 UTC (permalink / raw)
  To: ltp

The test can be actually executed as non-root user but the maxmsg must
be set to a value that is less by user limit for messages and since we
do not send any messages we can safely initialize it to 1.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
 .../conformance/interfaces/mq_timedreceive/5-3.c               | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/5-3.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/5-3.c
index cc592f5a7..87f3365d5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/5-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/5-3.c
@@ -55,7 +55,8 @@ int main(void)
 	sprintf(mqname, "/" FUNCTION "_" TEST "_%d", getpid());
 
 	attr.mq_msgsize = BUFFER;
-	attr.mq_maxmsg = BUFFER;
+	attr.mq_maxmsg = 1;
+
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
 	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-02-15 11:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-12 15:15 [LTP] [COMMITTED] [PATCH] mq_timedreceive_5-3: Initialize maxmsg properly Cyril Hrubis
2021-02-15  5:35 ` Joerg Vehlow
2021-02-15 10:55   ` Cyril Hrubis
2021-02-15 11:31     ` Joerg Vehlow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox