[LTP] [PATCH 14/31] madvise02: Remove UCLINUX

Petr Vorel pvorel@suse.cz
Thu Apr 11 22:51:54 CEST 2024


Hi Cyril,


> Hi!
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> >  testcases/kernel/syscalls/madvise/madvise02.c | 25 ++++++++-----------
> >  1 file changed, 11 insertions(+), 14 deletions(-)

> > diff --git a/testcases/kernel/syscalls/madvise/madvise02.c b/testcases/kernel/syscalls/madvise/madvise02.c
> > index 90c0431c5..793bda98d 100644
> > --- a/testcases/kernel/syscalls/madvise/madvise02.c
> > +++ b/testcases/kernel/syscalls/madvise/madvise02.c
> > @@ -65,17 +65,17 @@ static struct tcase {
> >  	int exp_errno;
> >  	int skip;
> >  } tcases[] = {
> > -	{MADV_NORMAL,      "MADV_NORMAL",      &nonalign, EINVAL, 0},
> > -	{1212,             "MADV_NORMAL",      &file1,    EINVAL, 0},
> > -	{MADV_REMOVE,      "MADV_REMOVE",      &file1,    EINVAL, 0},
> > -	{MADV_DONTNEED,    "MADV_DONTNEED",    &file1,    EINVAL, 1},
> > -	{MADV_MERGEABLE,   "MADV_MERGEABLE",   &file1,    EINVAL, 0},
> > -	{MADV_UNMERGEABLE, "MADV_UNMERGEABLE", &file1,    EINVAL, 0},
> > -	{MADV_NORMAL,      "MADV_NORMAL",      &file2,    ENOMEM, 0},
> > -	{MADV_WILLNEED,    "MADV_WILLNEED",    &file2,    ENOMEM, 0},
> > -	{MADV_WILLNEED,    "MADV_WILLNEED",    &tmp_addr,  EBADF, 0},
> > -	{MADV_FREE,        "MADV_FREE",        &file1,    EINVAL, 0},
> > -	{MADV_WIPEONFORK,  "MADV_WIPEONFORK",  &file1,    EINVAL, 0},
> > +	{MADV_NORMAL,      "MADV_NORMAL",      &nonalign, EINVAL},
> > +	{1212,             "MADV_NORMAL",      &file1,    EINVAL},
> > +	{MADV_REMOVE,      "MADV_REMOVE",      &file1,    EINVAL},
> > +	{MADV_DONTNEED,    "MADV_DONTNEED",    &file1,    EINVAL},
> > +	{MADV_MERGEABLE,   "MADV_MERGEABLE",   &file1,    EINVAL},
> > +	{MADV_UNMERGEABLE, "MADV_UNMERGEABLE", &file1,    EINVAL},
> > +	{MADV_NORMAL,      "MADV_NORMAL",      &file2,    ENOMEM},
> > +	{MADV_WILLNEED,    "MADV_WILLNEED",    &file2,    ENOMEM},
> > +	{MADV_WILLNEED,    "MADV_WILLNEED",    &tmp_addr,  EBADF},
> > +	{MADV_FREE,        "MADV_FREE",        &file1,    EINVAL},
> > +	{MADV_WIPEONFORK,  "MADV_WIPEONFORK",  &file1,    EINVAL},
> >  	{MADV_WIPEONFORK,  "MADV_WIPEONFORK shared_anon", &shared_anon, EINVAL, 0},
> >  	{MADV_WIPEONFORK,  "MADV_WIPEONFORK private file backed", &file3, EINVAL, 0},

> You should have removed these two zeroes as well, it's a bit confusing
> that they stayed in there.

I wonder why I left these two. I'll amend the patch with the diff bellow.

Kind regards,
Petr

+++ testcases/kernel/syscalls/madvise/madvise02.c
@@ -76,8 +76,8 @@ static struct tcase {
 	{MADV_WILLNEED,    "MADV_WILLNEED",    &tmp_addr,  EBADF},
 	{MADV_FREE,        "MADV_FREE",        &file1,    EINVAL},
 	{MADV_WIPEONFORK,  "MADV_WIPEONFORK",  &file1,    EINVAL},
-	{MADV_WIPEONFORK,  "MADV_WIPEONFORK shared_anon", &shared_anon, EINVAL, 0},
-	{MADV_WIPEONFORK,  "MADV_WIPEONFORK private file backed", &file3, EINVAL, 0},
+	{MADV_WIPEONFORK,  "MADV_WIPEONFORK shared_anon", &shared_anon, EINVAL},
+	{MADV_WIPEONFORK,  "MADV_WIPEONFORK private file backed", &file3, EINVAL},
 };
 
 static void tcases_filter(void)


More information about the ltp mailing list