Skip to contentSkip to conversation

Tiny doc fixes

PATCH New Petr Vorel 2 participants 4 messages Nov 15, 2016 Library code

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH 1/1 Tiny doc fixes

---
 doc/test-writing-guidelines.txt | 4 ++--
 lib/tst_test.c                  | 2 +-
 tools/netpipe-2.4/netpipe.sh    | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
doc/test-writing-guidelines.txt +2 -2
index 384ff09..4a51e01 100644
@@ -260,7 +260,7 @@ static void setup(void)
 		tst_brk(TBROK | TERRNO, "setenv() failed");
 }
 
-static void test(void)
+static void do_test(void)
 {
 	char *ret;
 
@@ -289,7 +289,7 @@ next:
 
 static struct tst_test test = {
 	.tid = "getenv01",
-	.test_all = test,
+	.test_all = do_test,
 	.setup = setup,
 };
 -------------------------------------------------------------------------------
lib/tst_test.c +1 -1
index 06f0339..f592aa5 100644
@@ -333,7 +333,7 @@ static struct option {
 } options[] = {
 	{"h",  "-h       Prints this help"},
 	{"i:", "-i n     Execute test n times"},
-	{"I:", "-I x     Execute test for n seconds"},
+	{"I:", "-I n     Execute test for n seconds"},
 	{"C:", "-C ARG   Run child process with ARG arguments (used internally)"},
 };
 
tools/netpipe-2.4/netpipe.sh +1 -1
index f1445a3..9827e1e 100644
@@ -17,7 +17,7 @@
 #    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
 #   FILE        : netpipe.sh
-#   DESCRIPTION : a simple infinite loop of NPtcp for use in runalltests.sh
+#   DESCRIPTION : a simple infinite loop of NPtcp
 #   HISTORY     :
 #       02/05/2003 Robbie Williamson ([email protected])
 #               written
Signature · 1 line
2.10.2
#1 lore raw

PATCH 1/1 Tiny doc fixes

Hi!

Quoted 12 lines
doc/test-writing-guidelines.txt +1 -1
@@ -260,7 +260,7 @@ static void setup(void)
 		tst_brk(TBROK | TERRNO, "setenv() failed");
 }
 
-static void test(void)
+static void do_test(void)
 {
 	char *ret;
 

doc/test-writing-guidelines.txt next: · line 294

Quoted 7 lines
doc/test-writing-guidelines.txt +1 -1
@@ -289,7 +289,7 @@ next:
 
 static struct tst_test test = {
 	.tid = "getenv01",
-	.test_all = test,
+	.test_all = do_test,
 	.setup = setup,
 };

What is wrong with this one?

And even if we decide to change the function name, we should fix it in the text as well:

-The test itself is done in the 'test()' function. The test function must work +The test itself is done in the 'do_test()' function. The test function must work

lib/tst_test.c static struct option { · line 338

Quoted 13 lines
doc/test-writing-guidelines.txt +0 -0
 -------------------------------------------------------------------------------
lib/tst_test.c +1 -1
index 06f0339..f592aa5 100644
@@ -333,7 +333,7 @@ static struct option {
 } options[] = {
 	{"h",  "-h       Prints this help"},
 	{"i:", "-i n     Execute test n times"},
-	{"I:", "-I x     Execute test for n seconds"},
+	{"I:", "-I n     Execute test for n seconds"},
 	{"C:", "-C ARG   Run child process with ARG arguments (used internally)"},
 };

This one is OK.

tools/netpipe-2.4/netpipe.sh line 23

Quoted 13 lines
tools/netpipe-2.4/netpipe.sh +1 -1
index f1445a3..9827e1e 100644
@@ -17,7 +17,7 @@
 #    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
 #   FILE        : netpipe.sh
-#   DESCRIPTION : a simple infinite loop of NPtcp for use in runalltests.sh
+#   DESCRIPTION : a simple infinite loop of NPtcp
 #   HISTORY     :
 #       02/05/2003 Robbie Williamson ([email protected])
 #               written

This will likely get removed next week, see the:

"[RFC] Cleanup of tools/ directory" email I've send earlier, so I would not bother with this one.

Signature · 2 lines
Cyril Hrubis
[email protected]
author
#2 lore raw

PATCH 1/1 Tiny doc fixes

Hi!

Quoted 13 lines
Quoted 12 lines
doc/test-writing-guidelines.txt +1 -1
@@ -260,7 +260,7 @@ static void setup(void)
 		tst_brk(TBROK | TERRNO, "setenv() failed");
 }
 
-static void test(void)
+static void do_test(void)
 {
 	char *ret;
 
@@ -289,7 +289,7 @@ next:
Quoted 8 lines

doc/test-writing-guidelines.txt next: · line 294

Quoted 6 lines
doc/test-writing-guidelines.txt +1 -1
 static struct tst_test test = {
 	.tid = "getenv01",
-	.test_all = test,
+	.test_all = do_test,
 	.setup = setup,
 };

What is wrong with this one?

Name collision (function test and struct test). I know, it's just a doc...

Review

Quoted 5 lines

And even if we decide to change the function name, we should fix it in the text as well:

(quoted diff) +1 -1
-The test itself is done in the 'test()' function. The test function must work
+The test itself is done in the 'do_test()' function. The test function must work

Sorry, it seems I can't do search and replace :-(.

Quoted 32 lines

lib/tst_test.c static struct option { · line 338

Quoted 13 lines
doc/test-writing-guidelines.txt +0 -0
 -------------------------------------------------------------------------------
lib/tst_test.c +1 -1
index 06f0339..f592aa5 100644
@@ -333,7 +333,7 @@ static struct option {
 } options[] = {
 	{"h",  "-h       Prints this help"},
 	{"i:", "-i n     Execute test n times"},
-	{"I:", "-I x     Execute test for n seconds"},
+	{"I:", "-I n     Execute test for n seconds"},
 	{"C:", "-C ARG   Run child process with ARG arguments (used internally)"},
 };

This one is OK.

tools/netpipe-2.4/netpipe.sh line 23

Quoted 13 lines
tools/netpipe-2.4/netpipe.sh +1 -1
index f1445a3..9827e1e 100644
@@ -17,7 +17,7 @@
 #    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
 #   FILE        : netpipe.sh
-#   DESCRIPTION : a simple infinite loop of NPtcp for use in runalltests.sh
+#   DESCRIPTION : a simple infinite loop of NPtcp
 #   HISTORY     :
 #       02/05/2003 Robbie Williamson ([email protected])
 #               written

This will likely get removed next week, see the:

Quoted 2 lines

"[RFC] Cleanup of tools/ directory" email I've send earlier, so I would not bother with this one.

OK. I'll read mailing list more carefully :-).

Petr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.linux.it/pipermail/ltp/attachments/20161115/516b59c8/attachment-0001.sig>

#3 lore raw

PATCH 1/1 Tiny doc fixes

Hi!

Quoted 9 lines
Quoted 8 lines

doc/test-writing-guidelines.txt next: · line 294

Quoted 6 lines

static struct tst_test test = {

doc/test-writing-guidelines.txt +1 -1
 	.tid = "getenv01",
-	.test_all = test,
+	.test_all = do_test,
 	.setup = setup,
 };

What is wrong with this one?

Name collision (function test and struct test). I know, it's just a doc...

Ah, right. I guess that we should to fix the example code to compile cleanly.

Quoted 6 lines

Review

Quoted 5 lines

And even if we decide to change the function name, we should fix it in the text as well:

(quoted diff) +1 -1
-The test itself is done in the 'test()' function. The test function must work
+The test itself is done in the 'do_test()' function. The test function must work

Sorry, it seems I can't do search and replace :-(.

Well the word test is used in the document so often that you have to actually read the paragraph to figure out what needs to be updated.

Signature · 2 lines
Cyril Hrubis
[email protected]