public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Caspar Zhang <caspar@casparzhang.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] syscalls/cma: fix the failure of compiling with O2 option
Date: Mon, 25 Feb 2019 21:16:14 +0800	[thread overview]
Message-ID: <20190225131614.GC49700@casparzhang.com> (raw)
In-Reply-To: <1507968555.2666255.1551091645854.JavaMail.zimbra@redhat.com>

On Mon, Feb 25, 2019 at 05:47:25AM -0500, Jan Stancek wrote:
>
>
> ----- Original Message -----
> > This issue is triggered by the commit 9b02cd465f70 which I wrote. If
> > compile the process_vm_readv03.c with O2 option and run, it will return
> > TFAIL. By casting the int type to long type in the ltp_syscall calling
> > functions can we avoid this failure.
> >
> > Signed-off-by: Jason Xing <kerneljasonxing@linux.alibaba.com>
> > ---
> >  testcases/kernel/syscalls/cma/process_vm_readv03.c | 8 ++++----
>
> What about other tests that were changed by commit 9b02cd465f70 ?

I downgraded my glibc from 2.17-196 (a centos 7.4 version) to
2.17-157 was able to reproduce this issue. I also tried modifying
the params in all `TEST(ltp_syscall(__NR_process_vm...` calls, seemd
that this is the only one causes (and solves) the failure:

        TEST(ltp_syscall(__NR_process_vm_readv, pids[0], local, NUM_LOCAL_VECS,
-                                  remote, nr_iovecs, 0));
+                                  remote, nr_iovecs, 0UL));

If we have enough time we might want to do a bisect between
glibc-2.17-157 and 196 to dig into the real problem behind the simple
fix, but for now I'm agree to convert all int params to correct unsigned
long changed by this commit, so that we can get rid of any potential
failures.

Jason, can you make an updated patch to include Li Wang's and Jan's
advices?

Thanks,
Caspar

  reply	other threads:[~2019-02-25 13:16 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         ` [LTP] [PATCH v2 1/2] syscalls/cma: test case should return TCONF if syscall doesn't exist Li Wang
2019-02-15 13:53           ` 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 [this message]
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=20190225131614.GC49700@casparzhang.com \
    --to=caspar@casparzhang.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