All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avinesh Kumar <akumar@suse.de>
To: ltp@lists.linux.it
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] fstat02.c: simplify using TST_EXP_*() macros
Date: Tue, 12 Jul 2022 21:36:44 +0530	[thread overview]
Message-ID: <118407732.DU46jWBZyT@localhost> (raw)
In-Reply-To: <YsxHHDw0H1lZTFMN@pevik>

On Monday, July 11, 2022 9:21:56 PM IST Petr Vorel wrote:
> Hi Avinesh,
> 
> 
> LGTM, thanks!
> Minor comments below.
Hi Petr, Thank you! I agree with your comments here.
Do I need to send v2 or you will merge with these changes?

> 
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> ...
> > +++ b/testcases/kernel/syscalls/fstat/fstat02.c
> ...
> > -#include <errno.h>
> > -#include <unistd.h>
> > -#include <sys/stat.h>
> > -#include <sys/types.h>
> >  #include "tst_test.h"
> > -#include "tst_safe_macros.h"
> 
> nit: obviously works without all these headers, but <sys/stat.h> is
> needed (fstat) but included by tst_test.h
> 
> > +
> > +/*\ [Description]
> > + *
> 
> This is wrong, causes docparse not being formatted. It must be:
> /*\
>  * [Description]
> 
> (can be fixed before merge)
> 
> >   * Tests if fstat() returns correctly and reports correct file information
> >   * using the stat structure.
> >   */
> ...
> > -	tst_res(TPASS, "fstat() reported correct values.");
> > +	TST_EXP_PASS(fstat(fildes, &stat_buf));
> > +	TST_EXP_EQ_LI(stat_buf.st_uid, user_id);
> > +	TST_EXP_EQ_LI(stat_buf.st_gid, group_id);
> nit: At least st_uid and st_gid are unsigned, thus maybe TST_EXP_EQ_LU?
> > +	TST_EXP_EQ_LI(stat_buf.st_size, FILE_SIZE);
> > +	TST_EXP_EQ_LI(stat_buf.st_mode & 0777, FILE_MODE);
> > +	TST_EXP_EQ_LI(stat_buf.st_nlink, NLINK);
> >  }
> 
> Kind regards,
> Petr
> 

--
Avinesh




-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-07-12 16:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-08 17:06 [LTP] [PATCH] fstat02.c: simplify using TST_EXP_*() macros Avinesh Kumar
2022-07-11 15:51 ` Petr Vorel
2022-07-12 16:06   ` Avinesh Kumar [this message]
2022-08-08 12:34     ` Petr Vorel

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=118407732.DU46jWBZyT@localhost \
    --to=akumar@suse.de \
    --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.