From: Cyril Hrubis <chrubis@suse.cz>
To: "Ricardo B. Marliere" <rbm@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v3] mmap01: Convert to new API
Date: Thu, 28 Nov 2024 15:26:02 +0100 [thread overview]
Message-ID: <Z0h9evdYZKxXGIXs@yuki.lan> (raw)
In-Reply-To: <20241118-convert_mmap01-v3-1-b275c90035f5@suse.com>
Hi!
> + if (system(cmd_buffer) != 0) {
> + tst_res(TPASS, "Functionality of mmap() successful");
> + } else {
> + tst_res(TFAIL, "Specified pattern found in file");
> + return;
> + }
Can we please get rid of this ugly hack as well?
We can easily fork a child that would read the file and look for the
pattern instead. Also we do not even have to look for the patern, just
occurence of one these letters would be a failure. So we can write even
easier loop that would just read the file and check that it contains
only valid data.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2024-11-28 14:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 10:15 [LTP] [PATCH v3] mmap01: Convert to new API Ricardo B. Marliere via ltp
2024-11-19 12:49 ` Jan Stancek
2024-11-28 14:26 ` Cyril Hrubis [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=Z0h9evdYZKxXGIXs@yuki.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=rbm@suse.com \
/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