* [LTP] [RFC] [PATCH] syscalls/madvise09: Fix TCONF propagation, remove .min_kver
@ 2017-10-06 10:38 Cyril Hrubis
2017-10-06 14:31 ` Jan Stancek
0 siblings, 1 reply; 3+ messages in thread
From: Cyril Hrubis @ 2017-10-06 10:38 UTC (permalink / raw)
To: ltp
This patch fixes TCONF propagation from the child to parent, the parent
have to handle the TCONF exit value.
And it also removes the .min_kver in order to enable the test on
distribution kernels that backported the MADV_FREE. Older kernels are
handled by the runtime EINVAL detection or will TCONF at the check for
memory cgroup support, so there is no real need to keep the .min_kver in
the source code.
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
testcases/kernel/syscalls/madvise/madvise09.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/testcases/kernel/syscalls/madvise/madvise09.c b/testcases/kernel/syscalls/madvise/madvise09.c
index 7ad76f795..fc284accf 100644
--- a/testcases/kernel/syscalls/madvise/madvise09.c
+++ b/testcases/kernel/syscalls/madvise/madvise09.c
@@ -305,8 +305,13 @@ retry:
goto retry;
}
- if (WIFEXITED(status) && WEXITSTATUS(status))
- tst_brk(TBROK, "Child exitted unexpectedly");
+ if (WIFEXITED(status)) {
+ if (WEXITSTATUS(status) == TCONF)
+ tst_brk(TCONF, "MADV_FREE is not supported");
+
+ if (WEXITSTATUS(status))
+ tst_brk(TBROK, "Child exitted unexpectedly");
+ }
}
static void setup(void)
@@ -334,7 +339,6 @@ static struct tst_test test = {
.setup = setup,
.cleanup = cleanup,
.test_all = run,
- .min_kver = "4.5",
.needs_root = 1,
.forks_child = 1,
};
--
2.13.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [LTP] [RFC] [PATCH] syscalls/madvise09: Fix TCONF propagation, remove .min_kver
2017-10-06 10:38 [LTP] [RFC] [PATCH] syscalls/madvise09: Fix TCONF propagation, remove .min_kver Cyril Hrubis
@ 2017-10-06 14:31 ` Jan Stancek
2017-10-25 8:40 ` Cyril Hrubis
0 siblings, 1 reply; 3+ messages in thread
From: Jan Stancek @ 2017-10-06 14:31 UTC (permalink / raw)
To: ltp
----- Original Message -----
> This patch fixes TCONF propagation from the child to parent, the parent
> have to handle the TCONF exit value.
>
> And it also removes the .min_kver in order to enable the test on
> distribution kernels that backported the MADV_FREE. Older kernels are
> handled by the runtime EINVAL detection or will TCONF at the check for
> memory cgroup support, so there is no real need to keep the .min_kver in
> the source code.
>
> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Looks good to me:
# ./madvise09
tst_test.c:937: INFO: Timeout per run is 0h 05m 00s
madvise09.c:186: CONF: MADV_FREE is not supported: EINVAL
madvise09.c:310: CONF: MADV_FREE is not supported
Regards,
Jan
^ permalink raw reply [flat|nested] 3+ messages in thread
* [LTP] [RFC] [PATCH] syscalls/madvise09: Fix TCONF propagation, remove .min_kver
2017-10-06 14:31 ` Jan Stancek
@ 2017-10-25 8:40 ` Cyril Hrubis
0 siblings, 0 replies; 3+ messages in thread
From: Cyril Hrubis @ 2017-10-25 8:40 UTC (permalink / raw)
To: ltp
Hi!
> > This patch fixes TCONF propagation from the child to parent, the parent
> > have to handle the TCONF exit value.
> >
> > And it also removes the .min_kver in order to enable the test on
> > distribution kernels that backported the MADV_FREE. Older kernels are
> > handled by the runtime EINVAL detection or will TCONF at the check for
> > memory cgroup support, so there is no real need to keep the .min_kver in
> > the source code.
> >
> > Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
>
> Looks good to me:
>
> # ./madvise09
> tst_test.c:937: INFO: Timeout per run is 0h 05m 00s
> madvise09.c:186: CONF: MADV_FREE is not supported: EINVAL
> madvise09.c:310: CONF: MADV_FREE is not supported
I've rebased the patch (since it had collision with the strstatus
patchset) and pushed, thanks.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-25 8:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-06 10:38 [LTP] [RFC] [PATCH] syscalls/madvise09: Fix TCONF propagation, remove .min_kver Cyril Hrubis
2017-10-06 14:31 ` Jan Stancek
2017-10-25 8:40 ` Cyril Hrubis
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.