public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.com>
Cc: "ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] msgstress SysV IPC testing suite
Date: Mon, 5 Feb 2024 18:21:00 +0100	[thread overview]
Message-ID: <20240205172100.GA218023@pevik> (raw)
In-Reply-To: <534e6d05-fc91-43e4-b384-b7a43125961d@suse.com>

Hi,

> Hi all,

> I was taking a look msgstress testing suite that is supposed to stress the
> kernel SysV IPC.
> It's a well known testing suite that used to randomly stuck or fail, due to
> the poorly written code.

> I'm about to refactor its code, but I noticed that all 4 tests inside it
> (msgstress01-04) are basically implementing the same concept, if not the
> same code that looks copy-pasted.

> We basically have 2 or more processes reading/writing messages into the SysV
> IPC at the same time.
> If all messages are correctly sent and received, the test passes. The only
> difference is if these processes are spawned inside children or not.

> So I have a quite obvious observation: our main goal is to stress the SysV
> IPC, so we can trigger a bug and it doesn't matter if this is done inside
> children or not.

I hope so. It also looks to me, that all 4 tests do very similar thing.

Also test docs claims that msgstress03.c is msgstress01.c but reads
/proc/sys/kernel/msgmni, similarly msgstress04.c is msgstress02.c but reads
/proc/sys/kernel/msgmni. But I don't see that msgstress0[34].c would read
/proc/sys/kernel/msgmni.  msgget03.c (already rewritten to new API) is the only
test which reads it via .save_restore.

I suppose get_used_msgqueues() (in libs/libltpipc/libipc.c) can still be kept in
the old API and converted after all files are converted. But I would consider
using /proc/sysvipc/msg instead of "ipcs -q".

Thanks for looking this!

Kind regards,
Petr

> I'm planning to remove all those tests and to write a new one following the
> main concept, but without the actual redundancy. What do you think?

> Regards,
> Andrea Cervesato

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      reply	other threads:[~2024-02-05 17:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-05 12:36 [LTP] msgstress SysV IPC testing suite Andrea Cervesato via ltp
2024-02-05 17:21 ` Petr Vorel [this message]

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=20240205172100.GA218023@pevik \
    --to=pvorel@suse.cz \
    --cc=andrea.cervesato@suse.com \
    --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