public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 1/3] syscalls: new test writev07
Date: Thu, 1 Dec 2016 02:36:14 -0500 (EST)	[thread overview]
Message-ID: <2135008969.825419.1480577774249.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <583FC50A.3010605@huawei.com>



----- Original Message -----
> From: "Cui Bixuan" <cuibixuan@huawei.com>
> To: ltp@lists.linux.it
> Sent: Thursday, 1 December, 2016 7:36:58 AM
> Subject: Re: [LTP] [PATCH v2 1/3] syscalls: new test writev07
> 
> 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?

Mistake on my part. That was obviously supposed to compare iovec length.
I pushed a fix to change that.

Thanks,
Jan

> 
> 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);
> 
> 
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
> 

      reply	other threads:[~2016-12-01  7: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
2016-12-01  7:36   ` Jan Stancek [this message]

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=2135008969.825419.1480577774249.JavaMail.zimbra@redhat.com \
    --to=jstancek@redhat.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