lkml.org 
[lkml]   [2020]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [LTP] [PATCH v2] syscall/ptrace08: Simplify the test.
Hi!
> looks good and the test passes on older fixed kernels. Just one
> compatibility issue below.

I've fixed that and also the kernel version when the behavior had
changed and pushed, thanks for the review and testing.

...

> > + if (TST_RET != -1) {
> > + tst_res(TFAIL, "ptrace() breakpoint with kernel addr succeeded");
> > + } else {
> > + if (TST_ERR == EINVAL) {
> > + tst_res(TPASS | TTERRNO,
> > + "ptrace() breakpoint with kernel addr failed");
> > + } else {
> > + tst_res(TFAIL | TTERRNO,
> > + "ptrace() breakpoint on kernel addr should return EINVAL, got");
> > + }
> > + }
> > +
> > + unsigned long addr;
>
> AFAICT, we're not compiling with --std=c99 so older compilers may
> complain about the variable declaration here.

The default std for gcc has been at least gnu90 for ages, which includes
subset of c99 features as well including this one. So unless you
explicitly pass --std=c90 or older it will work just fine.

I've moved the declaration to the top of the function nevertheless.

--
Cyril Hrubis
chrubis@suse.cz

\
 
 \ /
  Last update: 2020-09-10 21:35    [W:0.130 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site