On 08/25/2011 11:25 AM, Wanlong Gao wrote:
> As the patch of Caspar Zhang<[email protected]>  said:
> In new kernels,
> this wouldn't happen, despite some ENOMEM/EAGAIN might occur during
> testing. So the correct PASS/FAIL criteria is: the test passes when the
> program finishes running and exits normally; the test fails when the
> program exits abnormally, e.g. a SIGABRT received.
>
> Signed-off-by: Wanlong Gao<[email protected]>

Hi Wanlong, thanks for your patch. One question, have you tested it on a 
buggy kernel on IA64 to see if the reproducer could hit the bug 
described in https://lkml.org/lkml/2009/10/2/85?

Thanks,
Caspar

> ---
>   testcases/kernel/syscalls/mmap/mmap11.c |    6 ++----
>   1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/mmap/mmap11.c 
> b/testcases/kernel/syscalls/mmap/mmap11.c
> index 786724b..4523f47 100644
> --- a/testcases/kernel/syscalls/mmap/mmap11.c
> +++ b/testcases/kernel/syscalls/mmap/mmap11.c
> @@ -112,13 +112,13 @@ void check(void)
>       for (lc = 0; TEST_LOOPING(lc); lc++) {
>               Tst_count = 0;
>               ret = pthread_create(&th,&attr, wait_thread, NULL);
> -             if (ret) {
> +             if (ret&&  errno != ENOMEM&&  errno != EAGAIN) {
>                       tst_resm(TINFO, "[%d] ", count);
>                       tst_brkm(TBROK|TERRNO, cleanup, "pthread_create");
>               }
>               count++;
>               ret = pthread_create(&thread[lc],&attr, wait_thread2, NULL);
> -             if (ret) {
> +             if (ret&&  errno != ENOMEM&&  errno != EAGAIN) {
>                       tst_resm(TINFO, "[%d] ", count);
>                       tst_brkm(TBROK|TERRNO, cleanup, "pthread_create");
>               }
> @@ -133,8 +133,6 @@ void *wait_thread(void *args)
>       void *addr;
>
>       addr = malloc(MAL_SIZE);
> -     if (addr)
> -             memset(addr, 1, MAL_SIZE);
>       sleep(1);
>       return NULL;
>   }


------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to