* [LTP] [PATCH] dummy.c: fix a bug of TCONF fail
@ 2012-06-25 3:06 Peng Haitao
2012-06-26 8:36 ` Wanlong Gao
0 siblings, 1 reply; 2+ messages in thread
From: Peng Haitao @ 2012-06-25 3:06 UTC (permalink / raw)
To: ltp-list
When HAVE_LIBCAP or HAVE_SYS_CAPABILITY_H is not defined,
the case should not be fail.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
---
testcases/kernel/security/cap_bound/dummy.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/testcases/kernel/security/cap_bound/dummy.c b/testcases/kernel/security/cap_bound/dummy.c
index 3ee7c9b..d161efd 100644
--- a/testcases/kernel/security/cap_bound/dummy.c
+++ b/testcases/kernel/security/cap_bound/dummy.c
@@ -1,10 +1,14 @@
#include <stdio.h>
#include "config.h"
+#include "test.h"
#if HAVE_SYS_CAPABILITY_H
#include <sys/capability.h>
#endif
+char *TCID = "dummy";
+int TST_TOTAL=1;
+
int main(void)
{
#if HAVE_SYS_CAPABILITY_H
@@ -15,11 +19,9 @@ int main(void)
cap_free(cur);
return 0;
#else /* libcap */
- printf("System doesn't support POSIX capabilities.\n");
- return 1;
+ tst_brkm(TCONF, NULL, "System doesn't support POSIX capabilities.");
#endif
#else /* capability_h */
- printf("System doesn't support sys/capability.h\n");
- return 1;
+ tst_brkm(TCONF, NULL, "System doesn't support sys/capability.h.");
#endif
}
--
1.7.10.2
------------------------------------------------------------------------------
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [LTP] [PATCH] dummy.c: fix a bug of TCONF fail
2012-06-25 3:06 [LTP] [PATCH] dummy.c: fix a bug of TCONF fail Peng Haitao
@ 2012-06-26 8:36 ` Wanlong Gao
0 siblings, 0 replies; 2+ messages in thread
From: Wanlong Gao @ 2012-06-26 8:36 UTC (permalink / raw)
To: Peng Haitao; +Cc: ltp-list
On 06/25/2012 11:06 AM, Peng Haitao wrote:
> When HAVE_LIBCAP or HAVE_SYS_CAPABILITY_H is not defined,
> the case should not be fail.
pushed, thanks Peng.
Wanlong Gao
>
> Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
> ---
> testcases/kernel/security/cap_bound/dummy.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/testcases/kernel/security/cap_bound/dummy.c b/testcases/kernel/security/cap_bound/dummy.c
> index 3ee7c9b..d161efd 100644
> --- a/testcases/kernel/security/cap_bound/dummy.c
> +++ b/testcases/kernel/security/cap_bound/dummy.c
> @@ -1,10 +1,14 @@
> #include <stdio.h>
> #include "config.h"
> +#include "test.h"
>
> #if HAVE_SYS_CAPABILITY_H
> #include <sys/capability.h>
> #endif
>
> +char *TCID = "dummy";
> +int TST_TOTAL=1;
> +
> int main(void)
> {
> #if HAVE_SYS_CAPABILITY_H
> @@ -15,11 +19,9 @@ int main(void)
> cap_free(cur);
> return 0;
> #else /* libcap */
> - printf("System doesn't support POSIX capabilities.\n");
> - return 1;
> + tst_brkm(TCONF, NULL, "System doesn't support POSIX capabilities.");
> #endif
> #else /* capability_h */
> - printf("System doesn't support sys/capability.h\n");
> - return 1;
> + tst_brkm(TCONF, NULL, "System doesn't support sys/capability.h.");
> #endif
> }
>
------------------------------------------------------------------------------
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-26 8:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-25 3:06 [LTP] [PATCH] dummy.c: fix a bug of TCONF fail Peng Haitao
2012-06-26 8:36 ` Wanlong Gao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox