From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] Fwd: pwrite04 ltp bug?
Date: Mon, 23 May 2016 14:39:28 +0200 [thread overview]
Message-ID: <20160523123928.GE22559@rei.lan> (raw)
In-Reply-To: <CAOg9mSScVopGsoQeoESWAnD2YFrsr2qzQksC8A8T8m8dncFdAg@mail.gmail.com>
Hi!
> While fixing a couple of LTP regressions in the out-of-tree Orangefs
> kernel module, I think I found a problem with the pwrite04 test,
> here's what I think was meant:
>
> # git diff testcases/kernel/syscalls/pwrite/pwrite04.c
> diff --git a/testcases/kernel/syscalls/pwrite/pwrite04.c
> b/testcases/kernel/syscalls/pwrite/pwrite04.c
> index b297682..4ca7dc1 100644
> --- a/testcases/kernel/syscalls/pwrite/pwrite04.c
> +++ b/testcases/kernel/syscalls/pwrite/pwrite04.c
> @@ -196,9 +196,9 @@ int main(int ac, char *av[])
>
> }
> if (statbuf.st_size != K5) {
> - tst_resm(TFAIL, "file size is %ld != K4",
> + tst_resm(TFAIL, "file size is %ld != K5",
> statbuf.st_size);
This is obvious typo fix.
> -
> + cleanup();
This does not look right. Looking at the test source the rest of the ifs
has the cleanup right after tst_resm() but the cleanup() fuction is
supposed to be called exactly once at the end of the test at the end of
the main.
If it's called in the testing loop the test will fail when cleanup() is
invoked second time at the test exit since it will attempt to remove
allready deleted test temporary directory. So the correct solution to
this problem would rather be to remove the cleanup() from the test loop.
> }
> tst_resm(TPASS, "O_APPEND test passed.");
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2016-05-23 12:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAOg9mSSjfxiZ960tpADgVmndxXQpC7ag9QZSz68NbdeGn+yW9g@mail.gmail.com>
[not found] ` <CADVQ27oBdCxfuVmknYa16RTXpnYgncn94VnutMgn2+9VD-9bcg@mail.gmail.com>
[not found] ` <CADVQ27q119e2Oqg0tVGDjc_8yjoXvQHbg=Tqd9n4jxu8tedRVg@mail.gmail.com>
2016-05-21 2:07 ` [LTP] Fwd: pwrite04 ltp bug? Mike Marshall
2016-05-23 12:39 ` Cyril Hrubis [this message]
2016-05-23 15:03 ` Mike Marshall
2016-05-23 15:43 ` Cyril Hrubis
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=20160523123928.GE22559@rei.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