From: Mike Frysinger <vapier@gentoo.org>
To: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] getdents01: don't compare first entry to "."
Date: Fri, 5 Apr 2013 00:53:45 -0400 [thread overview]
Message-ID: <201304050053.46087.vapier@gentoo.org> (raw)
In-Reply-To: <1365125797-31405-1-git-send-email-gaowanlong@cn.fujitsu.com>
[-- Attachment #1.1: Type: Text/Plain, Size: 1077 bytes --]
On Thursday 04 April 2013 21:36:37 Wanlong Gao wrote:
> --- a/testcases/kernel/syscalls/getdents/getdents01.c
> +++ b/testcases/kernel/syscalls/getdents/getdents01.c
> @@ -75,8 +75,6 @@ int main(int ac, char **av)
> setup();
>
> for (lc = 0; TEST_LOOPING(lc); lc++) {
> - const char *d_name;
> -
> tst_count = 0;
>
> if ((fd = open(".", O_RDONLY)) == -1)
> @@ -102,15 +100,7 @@ int main(int ac, char **av)
> continue;
> }
>
> - if (longsyscall)
> - d_name = dirp64->d_name;
> - else
> - d_name = dirp->d_name;
> -
> - if (strcmp(d_name, "."))
> - tst_resm(TFAIL, "First entry is not '.'");
> - else
> - tst_resm(TPASS, "call succeeded");
> + tst_resm(TPASS, "call succeeded");
>
> if (close(fd) == -1)
> tst_brkm(TBROK, cleanup, "file close failed");
this test isn't really useful after your change. you've basically validated
that the a valid fd and a large enough buffer was passed to the kernel and
that's it.
you should have it walk the results to try and find an "." and ".." entry.
-mike
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 351 bytes --]
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
[-- Attachment #3: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next parent reply other threads:[~2013-04-05 4:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1365125797-31405-1-git-send-email-gaowanlong@cn.fujitsu.com>
2013-04-05 4:53 ` Mike Frysinger [this message]
[not found] ` <1365142365-4089-1-git-send-email-gaowanlong@cn.fujitsu.com>
2013-04-05 9:00 ` [LTP] [PATCH V2] getdents01: compare "." or ".." to the first entry chrubis
2013-04-05 9:08 ` [LTP] [PATCH] getdents01: don't compare first entry to "." chrubis
2013-04-15 17:51 ` chrubis
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=201304050053.46087.vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=ltp-list@lists.sourceforge.net \
/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