public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 1/3] syscalls/ftruncate: Rewrite ftruncate01 and merge ftruncate02
Date: Tue, 13 Aug 2019 16:20:38 +0200	[thread overview]
Message-ID: <20190813142038.GA23369@rei.lan> (raw)
In-Reply-To: <1564645349-10859-1-git-send-email-huangjh.jy@cn.fujitsu.com>

Hi!
Pushed with a minor change, thanks.

> +	SAFE_FSTAT(fd, &stat_buf);
> +	file_length = stat_buf.st_size;
>  
> -	tst_sig(NOFORK, DEF_HANDLER, cleanup);
> +	if (file_length != trunc_len) {
> +		tst_brk(TBROK, "ftruncate() got incorrected size: %d",
> +			file_length);

Changed this to tst_res(TFAIL, ...) followed by return, since this is by
no means TBROK.

> +	}
>  
> -	TEST_PAUSE;
> +	SAFE_LSEEK(fd, offset, SEEK_SET);
> +	SAFE_READ(0, fd, buf, sizeof(buf));
>  
> -	tst_tmpdir();
> +	for (i = 0; i < TRUNC_LEN1; i++) {
> +		if (buf[i] != data)
> +			tst_brk(TBROK, "ftruncate() got incorrect data");

And here as well.

-- 
Cyril Hrubis
chrubis@suse.cz

  parent reply	other threads:[~2019-08-13 14:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-29 10:11 [LTP] [PATCH 1/3] syscalls/ftruncate: Rewrite ftruncate01 and merge ftruncate02 Jinhui huang
2019-07-29 10:11 ` [LTP] [PATCH 2/3] syscalls/ftruncate: Rewrite ftruncate03 Jinhui huang
2019-07-30 12:55   ` Cyril Hrubis
2019-07-29 10:11 ` [LTP] [PATCH 3/3] syscalls/ftruncate: Rewtite ftruncate04 Jinhui huang
2019-07-30 13:06   ` Cyril Hrubis
2019-08-01  7:42   ` [LTP] [PATCH v2 1/3] syscalls/ftruncate: Rewrite ftruncate01 and merge ftruncate02 Jinhui huang
2019-08-01  7:42     ` [LTP] [PATCH v2 2/3] syscalls/ftruncate: Rewrite ftruncate03 and add new error test Jinhui huang
2019-08-13 14:37       ` Cyril Hrubis
2019-08-01  7:42     ` [LTP] [PATCH v2 3/3] syscalls/ftruncate: Rewrite ftruncate04 Jinhui huang
2019-08-13 15:10       ` Cyril Hrubis
2019-08-13 14:20     ` Cyril Hrubis [this message]
2019-07-30 12:37 ` [LTP] [PATCH 1/3] syscalls/ftruncate: Rewrite ftruncate01 and merge ftruncate02 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=20190813142038.GA23369@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