All of lore.kernel.org
 help / color / mirror / Atom feed
From: zhaogongyi <zhaogongyi@huawei.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] syscalls/getdents01: Add close() and open() at the end of run()
Date: Sun, 25 Apr 2021 03:28:08 +0000	[thread overview]
Message-ID: <808aa8a561fa469b9eedda4f29196c6a@huawei.com> (raw)

Hi Cyril,

I have re-submitted the patch according you review, please see: https://patchwork.ozlabs.org/project/ltp/patch/20210425012240.6328-1-zhaogongyi@huawei.com/

Thanks so much!

Best Regards,
Gongyi

> 
> Hi!
> >  testcases/kernel/syscalls/getdents/getdents01.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/testcases/kernel/syscalls/getdents/getdents01.c
> > b/testcases/kernel/syscalls/getdents/getdents01.c
> > index ef8f4e864..7982691a6 100644
> > --- a/testcases/kernel/syscalls/getdents/getdents01.c
> > +++ b/testcases/kernel/syscalls/getdents/getdents01.c
> > @@ -92,6 +92,9 @@ static void run(void)
> >  	} while (rval > 0);
> >
> >  	check_flags();
> > +
> > +	SAFE_CLOSE(fd);
> > +	fd = SAFE_OPEN(".", O_RDONLY|O_DIRECTORY);
> >  }
> 
> Good catch but I guess that it would be a bit cleaner if we opened the fd at
> the start of the run() and closed it at the end instead of opening it in setup()
> and reopening it for each iteration.
> 
> --
> Cyril Hrubis
> chrubis@suse.cz

             reply	other threads:[~2021-04-25  3:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-25  3:28 zhaogongyi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-04-23  9:59 [LTP] [PATCH] syscalls/getdents01: Add close() and open() at the end of run() Zhao Gongyi
2021-04-23 13: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=808aa8a561fa469b9eedda4f29196c6a@huawei.com \
    --to=zhaogongyi@huawei.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 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.