All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Kodanev <alexey.kodanev@oracle.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] prot_hsymlinks: Fix failure on read-only machine
Date: Wed, 5 Apr 2017 20:25:20 +0300	[thread overview]
Message-ID: <c5bc7bac-4558-5fb8-8872-d827b182242d@oracle.com> (raw)
In-Reply-To: <1489107284-4313-1-git-send-email-the_hoang0709@yahoo.com>

Hi,
On 10.03.2017 3:54, the_hoang0709@yahoo.com wrote:
> ...
>  	if (disable_protected_hlinks) {
>  		tst_resm(TINFO, "Disable protected hardlinks mode back");
> @@ -316,8 +317,13 @@ static void test_user_cmd(const char *user_cmd)
>  	char cmd[MAX_CMD_LEN];
>  	snprintf(cmd, MAX_CMD_LEN, "%s %s", user_cmd, users[TEST_USER].name);
>  	if (system(cmd) != 0) {
> -		tst_brkm(TBROK, cleanup, "Failed to run cmd: %s %s",
> +		if (eaccess("/etc/passwd", W_OK)) {
> +			tst_brkm(TCONF, cleanup,
> +			"/etc/passwd is not accessible");

It would be better to add this check to the top of setup(), right after
tst_kvercmp(), and exit without doing cleanup.

Thanks,
Alexey


  parent reply	other threads:[~2017-04-05 17:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-10  0:54 [LTP] [PATCH] prot_hsymlinks: Fix failure on read-only machine the_hoang0709
2017-03-22  3:06 ` Hoang Nguyen
2017-04-05  1:14   ` Hoang Nguyen
2017-04-05 17:25 ` Alexey Kodanev [this message]
2017-04-09  8:29   ` Hoang Nguyen

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=c5bc7bac-4558-5fb8-8872-d827b182242d@oracle.com \
    --to=alexey.kodanev@oracle.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.