syscalls/madvise09: Fix TCONF propagation, remove .min_kver
RFC PATCH 1/1 syscalls/madvise09: Fix TCONF propagation, remove .min_kver
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.
--- testcases/kernel/syscalls/madvise/madvise09.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
testcases/kernel/syscalls/madvise/madvise09.c +7 -3
@@ -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, };
Signature · 1 line
2.13.5
RFC PATCH 1/1 syscalls/madvise09: Fix TCONF propagation, remove .min_kver
----- Original Message -----
Quoted 10 lines
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 <[email protected]>
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
RFC PATCH 1/1 syscalls/madvise09: Fix TCONF propagation, remove .min_kver
Hi!
Quoted 9 lines
Quoted 9 lines
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.
Quoted 8 lines
Quoted 1 line
Signed-off-by Cyril Hrubis <[email protected]>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.
Signature · 2 lines
Cyril Hrubis [email protected]