public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cui Bixuan <cuibixuan@huawei.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 1/3] syscalls: new test writev07
Date: Thu, 1 Dec 2016 14:36:58 +0800	[thread overview]
Message-ID: <583FC50A.3010605@huawei.com> (raw)
In-Reply-To: <81176684cd5c6bf764a070b79783f03f0037658a.1475827191.git.jstancek@redhat.com>

On 2016/10/7 16:11, Jan Stancek wrote:
> +				off_after);
> +
> +		SAFE_CLOSE(fd);
> +		return;
> +	}
> +
> +	/* writev() wrote more bytes than bytes preceding invalid iovec */
> +	tst_res(TINFO, "writev() has written %ld bytes", TEST_RETURN);
> +	if (TEST_RETURN > (long) wr_iovec[0].iov_base) {
Hi, why TEST_RETURN(the return of writev) compare with wr_iovec[0].iov_base(the address) here?

I run it in armv7 (with printf("TEST_RETURN:%ld, wr_iovec[0].iov_base:%ld\n", TEST_RETURN, (long) wr_iovec[0].iov_base) for debug):

# ./writev07
tst_test.c:760: INFO: Timeout per run is 0h 05m 00s
writev07.c:60: INFO: starting test with initial file offset: 0
writev07.c:104: INFO: writev() has written 64 bytes
writev07.c:106: FAIL: writev wrote more than expected
TEST_RETURN:64, wr_iovec[0].iov_base:-1092708152
writev07.c:60: INFO: starting test with initial file offset: 65
writev07.c:104: INFO: writev() has written 64 bytes
writev07.c:106: FAIL: writev wrote more than expected
TEST_RETURN:64, wr_iovec[0].iov_base:-1092708152
writev07.c:60: INFO: starting test with initial file offset: 4096
writev07.c:104: INFO: writev() has written 64 bytes
writev07.c:106: FAIL: writev wrote more than expected
TEST_RETURN:64, wr_iovec[0].iov_base:-1092708152
writev07.c:60: INFO: starting test with initial file offset: 4097
writev07.c:104: INFO: writev() has written 64 bytes
writev07.c:106: FAIL: writev wrote more than expected
TEST_RETURN:64, wr_iovec[0].iov_base:-1092708144

So the case fail at all time.

Thanks,
Cui Bixuan

> +		tst_res(TFAIL, "writev wrote more than expected");
> +		SAFE_CLOSE(fd);
> +		return;
> +	}
> +
> +	/* file content matches written bytes */
> +	SAFE_LSEEK(fd, initial_file_offset, SEEK_SET);
> +	SAFE_READ(1, fd, tmp, TEST_RETURN);


  parent reply	other threads:[~2016-12-01  6:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-07  8:11 [LTP] [PATCH v2 1/3] syscalls: new test writev07 Jan Stancek
2016-10-07  8:11 ` [LTP] [PATCH v2 2/3] writev: remove writev03 and writev04 Jan Stancek
2016-10-07  8:11 ` [LTP] [PATCH v2 3/3] writev01: rewrite and drop partially valid iovec tests Jan Stancek
2016-10-10 16:03   ` Cyril Hrubis
2016-10-11  7:39     ` Jan Stancek
2016-10-11  8:41       ` Cyril Hrubis
2016-10-11 10:18         ` Jan Stancek
2016-10-10 15:54 ` [LTP] [PATCH v2 1/3] syscalls: new test writev07 Cyril Hrubis
2016-12-01  6:36 ` Cui Bixuan [this message]
2016-12-01  7:36   ` Jan Stancek

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=583FC50A.3010605@huawei.com \
    --to=cuibixuan@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox