public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: chrubis@suse.cz
To: Peng Haitao <penght@cn.fujitsu.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] filecapstest.sh: fix a bug of fail in RHEL5
Date: Thu, 7 Jun 2012 15:38:02 +0200	[thread overview]
Message-ID: <20120607133802.GA9664@saboteur.suse.cz> (raw)
In-Reply-To: <1338363782-10590-1-git-send-email-penght@cn.fujitsu.com>

Hi!
> +#ifdef HAVE_LIBCAP
>  	for (; i <= CAP_LAST_CAP; i++) {
>  #if HAVE_DECL_PR_CAPBSET_READ
>  		ret = prctl(PR_CAPBSET_READ, i);
> @@ -71,6 +72,9 @@ int check_remaining_caps(int lastdropped)
>  			return -i;
>  		}
>  	}
> +#else
> +	printf("System doesn't support full POSIX capabilities.\n");

This message is useless, as when HAVE_LIBCAP is not defined the
check_remaining_caps() is never called from the main() or am I mistaken?

> +#endif
>  	return 0;
>  }
>  
> @@ -79,6 +83,7 @@ int main(int argc, char *argv[])
>  	int ret = 1;
>  	int i;
>  
> +#ifdef HAVE_LIBCAP
>  #if HAVE_DECL_PR_CAPBSET_DROP
>  	ret = prctl(PR_CAPBSET_READ, -1);
>  #else
> @@ -131,5 +136,8 @@ int main(int argc, char *argv[])
>  		}
>  	}
>  	tst_resm(TPASS, "PR_CAPBSET_DROP tests passed\n");
> +#else
> +	printf("System doesn't support full POSIX capabilities.\n");
> +#endif
>  	tst_exit();

I'm a little lost in the ifdefs, but this one should IMHO be:

tst_resm(TCONF, "System doesn't support full POSIX capabilities.\n"


The rest seems to be fine.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

      parent reply	other threads:[~2012-06-07 13:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-30  7:43 [LTP] [PATCH] filecapstest.sh: fix a bug of fail in RHEL5 Peng Haitao
2012-05-30  7:49 ` Peng Haitao
2012-06-07 13:38 ` chrubis [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=20120607133802.GA9664@saboteur.suse.cz \
    --to=chrubis@suse.cz \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=penght@cn.fujitsu.com \
    /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