From: Petr Vorel <pvorel@suse.cz>
To: "Ricardo B. Marliere" <rbm@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v4] mmap01: Convert to new API
Date: Wed, 11 Dec 2024 20:00:17 +0100 [thread overview]
Message-ID: <20241211190017.GA440022@pevik> (raw)
In-Reply-To: <heoebo5b4mslxrpopscllz7a2rfviwltnxsvtl6bvsd4h7gacz@kttzguhbtix2>
> Hi Petr!
> On 11 Dec 24 02:47, Petr Vorel wrote:
> > Hi Ricardo,
> > ...
> > > +static void run(void)
> > > {
> > > + pid_t pid;
> > > +
> > > + addr = SAFE_MMAP(NULL, page_sz, PROT_READ | PROT_WRITE,
> > > + MAP_FILE | MAP_SHARED, fildes, 0);
> > > +
> > > + /*
> > > + * Check if mapped memory area beyond EOF are zeros and changes beyond
> > > + * EOF are not written to file.
> > > + */
> > > + if (memcmp(&addr[file_sz], dummy, page_sz - file_sz))
> > > + tst_brk(TFAIL, "mapped memory area contains invalid data");
> > FYI test fails when run more iterations (e.g. -i2)
> Thanks for taking a look, but I don't see the issue here:
> # /opt/ltp/testcases/bin/mmap01 -i4
> tst_tmpdir.c:316: TINFO: Using /tmp/LTP_mmaiVJsAq as tmpdir (fuse filesystem)
> tst_test.c:1890: TINFO: LTP version: 20240930-73-g865be36ffce8
> tst_test.c:1894: TINFO: Tested kernel: 6.11.0-virtme #1 SMP PREEMPT_DYNAMIC Fri Oct 4 13:39:48 -03 2024 x86_64
> tst_test.c:1725: TINFO: Timeout per run is 0h 00m 30s
> mmap01.c:49: TPASS: Functionality of mmap() successful YES
> mmap01.c:49: TPASS: Functionality of mmap() successful YES
> mmap01.c:49: TPASS: Functionality of mmap() successful YES
> mmap01.c:49: TPASS: Functionality of mmap() successful YES
> Summary:
> passed 4
> failed 0
> broken 0
> skipped 0
> warnings 0
> I appended the "YES" just to make sure I wasn't running some outdated
> code, can you please provide more details?
I have no idea myself. I verified if I'm using v4 [1] and I really do.
Can you please push the code you're using?
Your code I'm testing is in my fork [2].
Tested on more systems:
# ./mmap01 -i4
tst_tmpdir.c:316: TINFO: Using /tmp/LTP_mmabiOth0 as tmpdir (tmpfs filesystem)
tst_test.c:1890: TINFO: LTP version: 20240930-116-g23f5a4447
tst_test.c:1894: TINFO: Tested kernel: 6.13.0-rc1-1.g492f944-default #1 SMP PREEMPT_DYNAMIC Mon Dec 2 08:55:00 UTC 2024 (492f944) x86_64
tst_test.c:1725: TINFO: Timeout per run is 0h 00m 30s
mmap01.c:49: TPASS: Functionality of mmap() successful
mmap01.c:68: TFAIL: mapped memory area contains invalid data
Summary:
passed 1
failed 1
broken 0
skipped 0
warnings 0
$ ./mmap01 -i4
tst_tmpdir.c:316: TINFO: Using /tmp/LTP_mmakqgzvS as tmpdir (tmpfs filesystem)
tst_test.c:1890: TINFO: LTP version: 20240930-115-g786b808eda
tst_test.c:1894: TINFO: Tested kernel: 6.11-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.11 (2024-11-23) x86_64
tst_test.c:1725: TINFO: Timeout per run is 0h 00m 30s
mmap01.c:49: TPASS: Functionality of mmap() successful
mmap01.c:68: TFAIL: mapped memory area contains invalid data
Summary:
passed 1
failed 1
broken 0
skipped 0
warnings 0
[1] https://patchwork.ozlabs.org/project/ltp/patch/20241210-convert_mmap01-v4-1-c2338a2ca071@suse.com/
[2] https://github.com/pevik/ltp/commit/a3c07097784088a679e77a4486bb10adfe03eea0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-12-11 19:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-10 21:38 [LTP] [PATCH v4] mmap01: Convert to new API Ricardo B. Marliere via ltp
2024-12-11 1:47 ` Petr Vorel
2024-12-11 10:29 ` Ricardo B. Marliere via ltp
2024-12-11 19:00 ` Petr Vorel [this message]
2024-12-13 1:08 ` Ricardo B. Marliere via ltp
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=20241211190017.GA440022@pevik \
--to=pvorel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.