[LTP] [PATCH v2 1/3] lib/tst_safe_sysv_ipc.c : Add	tst_safe_sysv_ipc.c
    Cyril Hrubis 
    chrubis@suse.cz
       
    Mon Jan 23 14:02:17 CET 2017
    
    
  
Hi!
> diff --git a/include/tst_test.h b/include/tst_test.h
> index acb4b93..c68d880 100644
> --- a/include/tst_test.h
> +++ b/include/tst_test.h
> @@ -34,6 +34,7 @@
>  #include "tst_kvercmp.h"
>  #include "tst_clone.h"
>  #include "tst_kernel.h"
> +#include "tst_safe_sysv_ipc.h"
I've removed this include from the tst_test.h since the tst_test.h
header is polluted enough already and these safe macros would be used
only by a very small number of tests anyway.
> +int safe_msgget(const char *file, const int lineno, key_t key, int msgflg)
> +{
> +	int rval;
> +
> +	rval = msgget(key, msgflg);
> +	if (rval == -1) {
> +		tst_brk(TBROK | TERRNO, "%s:%d: msgget() failed",
> +			file, lineno);
And I've also changed these tst_brk() messages to print the parameters
passed to the msg*() functions as well in order to provide as much
information as possible.
> +	}
> +
> +	return rval;
> +}
And pushed, thanks.
-- 
Cyril Hrubis
chrubis@suse.cz
    
    
More information about the ltp
mailing list