Hi,

On 03/18/2014 02:00 AM, [email protected] wrote:
> +
> +             switch (ret) {
> +             case SIGUSR1:
> +                     tst_resm(TPASS, "fcntl test %s success", des);
> +             break;
> +             case SIGIO:
> +                     tst_resm(TFAIL, "received default SIGIO, fcntl test "
> +                              "%s failed", des);
> +             break;
> +             default:
> +                     tst_brkm(TBROK, cleanup, "fcntl io events "
> +                              "signal mechanism work abnormally");
> +             }
> +             wait(NULL);
> +     }
> +}
> There is a problem with a pipe capacity, if you run the test with enough
> iterations you will get failure beceause the child cannot write to the full
> pipe.
>
> fcntl31     1  TPASS  :  fcntl test F_GETOWN, F_SETOWN for process ID success
> fcntl31     0  TINFO  :  default io events signal is SIGIO
> fcntl31     2  TBROK  :  sigtimedwait() failed.: errno=EAGAIN(11): Resource 
> temporarily unavailable
> fcntl31     3  TBROK  :  Remaining cases broken
> fcntl31     2  TBROK  :  unexpected signal 13 received (pid = 4293).
> fcntl31     3  TBROK  :  Remaining cases broken
> fcntl31     0  TWARN  :  close(3) failed: errno=EBADF(9): Bad file descriptor
>
> I can reproduce the problem with:
>
> $ ./fcntl31 -i 100000 &> log.txt
> $ tail log.txt
>
> You can easily fix this problem if you read the byte from pipe in the parent
> process (before or after the wait()).
>
>
> And there is a small synchronization problem too. If the write() in the
> signal_parent() is entered before the parent sleeps in sigtimedwait() the
> signal is lost and the test fails.
>
> What we need to do is to ensure parents sleeps in sigtimedwait() before we
> execute the write(). I guess that TST_PROCESS_STATE_WAIT() in child should 
> work
> here.

Thanks for pointing these two issues.
My test work is not that complete, sorry.

Regards,
Xiaoguang Wang
>


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to