[CRIU] [PATCH v2] test: Fix sockets03 default SIGPIPE handler not being set to IGN

Andrei Vagin avagin at virtuozzo.com
Sun Dec 18 22:48:37 PST 2016


On Mon, Dec 19, 2016 at 09:30:17AM +0300, Vitaly Ostrosablin wrote:
> By default, sockets03 doesn't set SIGPIPE handler to SIG_IGN. When run
> by zdtm.py, it doesn't cause problem, because it inherits signal
> handler. However, when run via vzt-cpt (which uses system() to launch
> tests), it receives default handler (which would terminate test). As
> result, test is guaranteed to fail, because it will attempt to write to
> shutdown receiver and get SIGPIPE in the face.
> 
> PSBM-55941
>

Acked-by: Andrei Vagin <avagin at virtuozzo.com>
 
> Signed-off-by: Vitaly Ostrosablin <vostrosablin at virtuozzo.com>
> ---
>  test/zdtm/static/sockets03.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/test/zdtm/static/sockets03.c b/test/zdtm/static/sockets03.c
> index 6073dac..9247d16 100644
> --- a/test/zdtm/static/sockets03.c
> +++ b/test/zdtm/static/sockets03.c
> @@ -35,6 +35,8 @@ int main(int argc, char *argv[])
>  	int ret;
>  
>  	test_init(argc, argv);
> +    
> +	signal(SIGPIPE, SIG_IGN);
>  
>  	cwd = get_current_dir_name();
>  	if (!cwd) {
> -- 
> 2.10.2
> 


More information about the CRIU mailing list