public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] doc: test-writing-guidelines: fixed the C test example
@ 2014-04-15 12:42 Stanislav Kholmanskikh
  2014-04-15 13:07 ` chrubis
  0 siblings, 1 reply; 2+ messages in thread
From: Stanislav Kholmanskikh @ 2014-04-15 12:42 UTC (permalink / raw)
  To: ltp-list; +Cc: vasily.isaenko

This example had some typos and other basic mistakes that prevented
it from being built.

Fixed it.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
---

I thing it's a canditate to be applied before the release.
What do you think?

 doc/test-writing-guidelines.txt |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/doc/test-writing-guidelines.txt b/doc/test-writing-guidelines.txt
index 6e79d1a..91edbf0 100644
--- a/doc/test-writing-guidelines.txt
+++ b/doc/test-writing-guidelines.txt
@@ -218,6 +218,7 @@ Let's start with an example, following code is a simple test for a getenv().
  */
 
 #include "test.h"
+#include "usctest.h"
 
 char *TCID = "getenv01";
 int TST_TOTAL = 2;
@@ -236,7 +237,7 @@ static void test(void)
 {
 	char *ret;
 
-	ret = getenv(TEST_EVN);
+	ret = getenv(TEST_ENV);
 
 	if (ret) {
 		if (!strcmp(ret, TEST_ENV_VAL))
@@ -254,7 +255,7 @@ static void test(void)
 	if (ret)
 		tst_resm(TFAIL, "getenv(" TEST_NE_ENV ") = '%s'", ret);
 	else
-		tst_resm(TPASS, "getenv(" TEST_NE_ENV ")" = NULL);
+		tst_resm(TPASS, "getenv(" TEST_NE_ENV ") = NULL");
 }
 
 int main(int argc, char *argv[])
@@ -262,7 +263,7 @@ int main(int argc, char *argv[])
 	const char *msg;
 	int lc;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL))
+	if ((msg = parse_opts(argc, argv, NULL, NULL)))
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();
-- 
1.7.1


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
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

end of thread, other threads:[~2014-04-15 13:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-15 12:42 [LTP] [PATCH] doc: test-writing-guidelines: fixed the C test example Stanislav Kholmanskikh
2014-04-15 13:07 ` chrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox