public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [COMMITTED] [PATCH] mq_timedreceive_5-3: Initialize maxmsg properly
Date: Mon, 15 Feb 2021 11:55:24 +0100	[thread overview]
Message-ID: <YCpTHC2FLaC5vzVH@yuki.lan> (raw)
In-Reply-To: <853a0890-6426-5708-88a8-692885b9dd6f@jv-coder.de>

Hi!
> > 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.
> This is applies to more than only this test. I also recognized this when 
> fixing the time issue, but decided not to change it, because it is not 
> the only affected test.

Feel free to send a patch for the rest :-).

Setting the mq_maxmsg to BUFFER which is supposed to be constant for the
mq_msgsize is quite confusing and also prevents these tests from being
executed as ordinary user so I think that it's worth fixing.

> The max message size could be up to /proc/sys/fs/mqueue/msg_max. This is 
> usually 10.

Looking at the rest of the tests I guess the original author either did
not care that much or was clueless since it does not really make sense
to set mq_maxmsg to the same number as mq_msgsize in tests that send
just one or two message.

So we should either set it to 2 in all tests, or set it to 1 or 2
depending on how many messages test sends.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2021-02-15 10:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2021-02-15 11:31     ` Joerg Vehlow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YCpTHC2FLaC5vzVH@yuki.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox