All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Wang <liwang@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 1/2] syscalls/cma: test case should return TCONF if syscall doesn't exist
Date: Fri, 15 Feb 2019 18:50:53 +0800	[thread overview]
Message-ID: <CAEemH2fvR1WQBEmwPM_rpy4z3xN6Ueeqk9Ri8BHrFoPQgaAJqw@mail.gmail.com> (raw)
In-Reply-To: <1544017426-10669-1-git-send-email-kerneljasonxing@linux.alibaba.com>

Hi Jason,

A new failure was occured after applying this new patch.

From our observation, the latest process_vm_readv03.c failed with
process_vm_readv() Invalid argument error on rhel7.3 platfrom. We suspect
that this problem maybe caused by glibc or compiler, because if compile the
test program with -O0 it get pass, but with the ltp
default optimization -O2 it get fail.  Also, if we revert this new patch,
the test PASS whatever with -O2 and -O0, that's very strange.

--------------------------------
# gcc -g -O2 -g -O2   -fno-strict-aliasing -pipe -Wall -W
-Wold-style-definition -D_FORTIFY_SOURCE=2 -I../../../../include
-I../../../../include -I../../../../include/old/   -L../../../../lib
process_vm_readv03.c   -lltp -o process_vm_readv03_O2

# ./process_vm_readv03_O2
process_vm_readv03    0  TINFO  :  child 0: 10 iovecs allocated and
initialized.
process_vm_readv03    0  TINFO  :  child 1: 10 remote iovecs received.
process_vm_readv03    0  TINFO  :  child 1: 4 local iovecs initialized.
process_vm_readv03    1  TBROK  :  process_vm_readv03.c:220:
process_vm_readv: errno=EINVAL(22): Invalid argument
process_vm_readv03    2  TBROK  :  process_vm_readv03.c:220: Remaining
cases broken
process_vm_readv03    1  TFAIL  :  process_vm_readv03.c:103: child 1
returns 512

# strace -f ./process_vm_readv03_O2
...
[pid 14676] process_vm_readv(14675, 0x7ffe40232ea0, 4, 0x7640c0, 10,
140728898420736) = -1 EINVAL (Invalid argument)
[pid 14676] write(1, "process_vm_readv03    1  \33[1;31m"...,
125process_vm_readv03    1  TBROK  :  process_vm_readv03.c:220:
process_vm_readv: errno=EINVAL(22): Invalid argument
) = 125
...

--------------------------------------------
# gcc -g -O0 -g -O0   -fno-strict-aliasing -pipe -Wall -W
-Wold-style-definition -D_FORTIFY_SOURCE=2 -I../../../../include
-I../../../../include -I../../../../include/old/   -L../../../../lib
process_vm_readv03.c   -lltp -o process_vm_readv03_O0

# ./process_vm_readv03_O0
process_vm_readv03    0  TINFO  :  child 0: 10 iovecs allocated and
initialized.
process_vm_readv03    0  TINFO  :  child 1: 10 remote iovecs received.
process_vm_readv03    0  TINFO  :  child 1: 4 local iovecs initialized.
process_vm_readv03    1  TPASS  :  child 1: all bytes are correctly
received.

# strace -f ./process_vm_readv03_O0
...
[pid 14703] process_vm_readv(14702,
[{"\0\1\2\3\4\5\6\7\10\t\n\v\f\r\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37"...,
43269},
{"\5\6\7\10\t\n\v\f\r\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37
!\"#$"..., 18907},
{"\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377"...,
3203}, {"cdefghijklmnopqrstuvwxyz{|}~\177\200\201\202"..., 34621}], 4,
[{0x9570c0, 24638}, {0x95d110, 35640}, {0x965c50, 19802}, {0x96a9c0, 490},
{0x96abc0, 8624}, {0x96cd80, 3571}, {0x96db80, 2114}, {0x96e3d0, 2374},
{0x96ed20, 1139}, {0x96f1a0, 1608}], 10, 0) = 100000
[pid 14703] write(1, "process_vm_readv03    1  \33[1;32m"...,
89process_vm_readv03    1  TPASS  :  child 1: all bytes are correctly
received.
) = 89
...

# uname  -r
3.10.0-514.55.4.el7.x86_64

# rpm -q glibc
glibc-2.17-157.el7_3.5.x86_64

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20190215/02b113eb/attachment-0001.html>

  parent reply	other threads:[~2019-02-15 10:50 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-03  9:43 [LTP] [PATCH] syscalls/cma: test case should return TCONF if syscall doesn't exist Jason Xing
2018-12-03  9:58 ` Jan Stancek
2018-12-04  2:49   ` Jason Xing
2018-12-04  8:54     ` Jan Stancek
2018-12-05 13:43       ` [LTP] [PATCH v2 1/2] " Jason Xing
2018-12-05 13:43         ` [LTP] [PATCH v2 2/2] lapi/syscalls: Add syscall numbers for process_vm_readv/_writev Jason Xing
2018-12-05 22:07           ` Petr Vorel
2018-12-06  3:37             ` Jason Xing
2019-02-15 10:50         ` Li Wang [this message]
2019-02-15 13:53           ` [LTP] [PATCH v2 1/2] syscalls/cma: test case should return TCONF if syscall doesn't exist Jan Stancek
2019-02-16  7:18             ` Li Wang
2019-02-16 10:28               ` Jan Stancek
2019-02-22 18:29                 ` Jan Stancek
2019-02-23  6:21                   ` Caspar Zhang
2019-02-25  8:22                     ` [LTP] [PATCH] syscalls/cma: fix the failure of compiling with O2 option Jason Xing
2019-02-25 10:34                       ` Li Wang
2019-02-25 10:47                       ` Jan Stancek
2019-02-25 13:16                         ` Caspar Zhang
2019-02-26  1:42                           ` [LTP] [PATCH v2] " Jason Xing
2019-02-26  2:22                             ` [LTP] [PATCH v3] " Jason Xing
2019-02-26  3:17                               ` Li Wang
2019-02-26 16:03                               ` Jan Stancek
2019-02-26  2:00                         ` [LTP] [PATCH] " Jason Xing

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=CAEemH2fvR1WQBEmwPM_rpy4z3xN6Ueeqk9Ri8BHrFoPQgaAJqw@mail.gmail.com \
    --to=liwang@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 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.