public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 1/3] lib/tst_safe_sysv_ipc.c : Add tst_safe_sysv_ipc.c
Date: Mon, 23 Jan 2017 14:02:17 +0100	[thread overview]
Message-ID: <20170123130039.GA24526@rei.lan> (raw)
In-Reply-To: <1485167476-18151-1-git-send-email-yangx.jy@cn.fujitsu.com>

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

      parent reply	other threads:[~2017-01-23 13:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-16  3:54 [LTP] [PATCH 1/2] ipc/libnewipc.c: add CREATE_MSG to optimize duplicate code Xiao Yang
2016-12-16  3:54 ` [LTP] [PATCH 2/2] ipc/msgsnd0*: cleanup && convert to new API Xiao Yang
2016-12-27  7:44   ` Xiao Yang
2017-01-19 15:21   ` Cyril Hrubis
2017-01-19 14:39 ` [LTP] [PATCH 1/2] ipc/libnewipc.c: add CREATE_MSG to optimize duplicate code Cyril Hrubis
2017-01-23 10:31   ` [LTP] [PATCH v2 1/3] lib/tst_safe_sysv_ipc.c : Add tst_safe_sysv_ipc.c Xiao Yang
2017-01-23 10:31     ` [LTP] [PATCH v2 2/3] ipc/msgget0*: Make use of IPC related macros Xiao Yang
2017-01-23 13:02       ` Cyril Hrubis
2017-01-23 10:31     ` [LTP] [PATCH v2 3/3] ipc/msgsnd0*: cleanup && convert to new API Xiao Yang
2017-01-23 14:23       ` Cyril Hrubis
2017-01-23 13:02     ` Cyril Hrubis [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170123130039.GA24526@rei.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox