All of lore.kernel.org
 help / color / mirror / Atom feed
From: Allison Henderson <allison.henderson@oracle.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>, guaneryu@gmail.com
Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH 01/12] fsstress: fix compiler warnings
Date: Sat, 24 Nov 2018 11:22:31 -0700	[thread overview]
Message-ID: <d60f04c8-9e77-dc93-1cc6-082118f66ba7@oracle.com> (raw)
In-Reply-To: <154290950874.1218.16162093723366805081.stgit@magnolia>



On 11/22/18 10:58 AM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Fix all the gcc warnings in fsstress.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>   ltp/fsstress.c |    4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> 
> diff --git a/ltp/fsstress.c b/ltp/fsstress.c
> index edbb3f2f..8d0734fc 100644
> --- a/ltp/fsstress.c
> +++ b/ltp/fsstress.c
> @@ -499,7 +499,7 @@ int main(int argc, char **argv)
>   		exit(1);
>   	}
>   	if (logname) {
> -		char path[PATH_MAX];
> +		char path[PATH_MAX + NAME_MAX + 1];
>   		snprintf(path, sizeof(path), "%s/%s", rpath, logname);
>   		if (freopen(path, "a", stdout) == NULL) {
>   			perror("freopen logfile failed");
> @@ -583,7 +583,7 @@ int main(int argc, char **argv)
>   				return 0;
>   #endif
>   			if (logname) {
> -				char path[PATH_MAX];
> +				char path[PATH_MAX + NAME_MAX + 2 + 11];
>   				snprintf(path, sizeof(path), "%s/%s.%d",
>   					 rpath, logname, i);
>   				if (freopen(path, "a", stdout) == NULL) {
> 

Looks ok.  I'm assuming the 2 and the 11 are for the slash, dot and 
logname?  Maybe just a comment or two in the commit.  Otherwise looks 
good to me, you can add my review.  Thx!  :-)

Reviewed-By: Allison Henderson <allison.henderson@oracle.com>

Allison

  reply	other threads:[~2018-11-25  5:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-22 17:58 [PATCH v3 00/12] xfstests: add copy/dedupe/clone to fsx/fsstress Darrick J. Wong
2018-11-22 17:58 ` [PATCH 01/12] fsstress: fix compiler warnings Darrick J. Wong
2018-11-24 18:22   ` Allison Henderson [this message]
2018-11-22 17:58 ` [PATCH 02/12] fsstress: check system call return values Darrick J. Wong
2018-11-24 18:22   ` Allison Henderson
2018-11-22 17:58 ` [PATCH 03/12] fsx: shut up compiler warnings Darrick J. Wong
2018-11-24 18:23   ` Allison Henderson
2018-11-22 17:58 ` [PATCH 04/12] fsx: always check buffer after each operation Darrick J. Wong
2018-11-24 18:24   ` Allison Henderson
2018-11-22 17:58 ` [PATCH 05/12] fsx: use an enum to define the operation commands Darrick J. Wong
2018-11-24 18:23   ` Allison Henderson
2018-11-22 17:59 ` [PATCH 06/12] fsx: add five-argument logging function Darrick J. Wong
2018-11-24 18:23   ` Allison Henderson
2018-11-22 17:59 ` [PATCH 07/12] fsx: add FICLONERANGE support Darrick J. Wong
2018-11-22 17:59 ` [PATCH 08/12] fsx: add FIDEDUPERANGE support Darrick J. Wong
2018-11-22 17:59 ` [PATCH 09/12] fsstress: add copy_file_range support Darrick J. Wong
2018-11-22 17:59 ` [PATCH 10/12] fsx: " Darrick J. Wong
2018-11-22 17:59 ` [PATCH 11/12] common/dump: disable copyrange Darrick J. Wong
2018-11-22 17:59 ` [PATCH 12/12] generic: long fsx soak tests Darrick J. Wong
2018-11-25 16:27   ` Eryu Guan
2018-11-26 20:50     ` Darrick J. Wong
2018-12-07  6:23 [PATCH v4 00/12] xfstests: add copy/dedupe/clone to fsx/fsstress Darrick J. Wong
2018-12-07  6:23 ` [PATCH 01/12] fsstress: fix compiler warnings Darrick J. Wong

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=d60f04c8-9e77-dc93-1cc6-082118f66ba7@oracle.com \
    --to=allison.henderson@oracle.com \
    --cc=darrick.wong@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --cc=linux-xfs@vger.kernel.org \
    /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.