All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] Tiny doc fixes
@ 2016-11-15 10:06 Petr Vorel
  2016-11-15 16:20 ` Cyril Hrubis
  0 siblings, 1 reply; 4+ messages in thread
From: Petr Vorel @ 2016-11-15 10:06 UTC (permalink / raw)
  To: ltp

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 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(-)

diff --git a/doc/test-writing-guidelines.txt b/doc/test-writing-guidelines.txt
index 384ff09..4a51e01 100644
--- a/doc/test-writing-guidelines.txt
+++ b/doc/test-writing-guidelines.txt
@@ -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,
 };
 -------------------------------------------------------------------------------
diff --git a/lib/tst_test.c b/lib/tst_test.c
index 06f0339..f592aa5 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -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)"},
 };
 
diff --git a/tools/netpipe-2.4/netpipe.sh b/tools/netpipe-2.4/netpipe.sh
index f1445a3..9827e1e 100644
--- a/tools/netpipe-2.4/netpipe.sh
+++ b/tools/netpipe-2.4/netpipe.sh
@@ -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 (robbiew@austin.ibm.com)
 #               written
-- 
2.10.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [LTP] [PATCH 1/1] Tiny doc fixes
  2016-11-15 10:06 [LTP] [PATCH 1/1] Tiny doc fixes Petr Vorel
@ 2016-11-15 16:20 ` Cyril Hrubis
  2016-11-15 16:46   ` Petr Vorel
  0 siblings, 1 reply; 4+ messages in thread
From: Cyril Hrubis @ 2016-11-15 16:20 UTC (permalink / raw)
  To: ltp

Hi!
> --- a/doc/test-writing-guidelines.txt
> +++ b/doc/test-writing-guidelines.txt
> @@ -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,
>  };

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

>  -------------------------------------------------------------------------------
> diff --git a/lib/tst_test.c b/lib/tst_test.c
> index 06f0339..f592aa5 100644
> --- a/lib/tst_test.c
> +++ b/lib/tst_test.c
> @@ -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.

> diff --git a/tools/netpipe-2.4/netpipe.sh b/tools/netpipe-2.4/netpipe.sh
> index f1445a3..9827e1e 100644
> --- a/tools/netpipe-2.4/netpipe.sh
> +++ b/tools/netpipe-2.4/netpipe.sh
> @@ -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 (robbiew@austin.ibm.com)
>  #               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.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [LTP] [PATCH 1/1] Tiny doc fixes
  2016-11-15 16:20 ` Cyril Hrubis
@ 2016-11-15 16:46   ` Petr Vorel
  2016-11-15 16:50     ` Cyril Hrubis
  0 siblings, 1 reply; 4+ messages in thread
From: Petr Vorel @ 2016-11-15 16:46 UTC (permalink / raw)
  To: ltp

Hi!

> > --- a/doc/test-writing-guidelines.txt
> > +++ b/doc/test-writing-guidelines.txt
> > @@ -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,
> >  };

> What is wrong with this one?
Name collision (function test and struct test). I know, it's just a doc...

> 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
Sorry, it seems I can't do search and replace :-(.

> >  -------------------------------------------------------------------------------
> > diff --git a/lib/tst_test.c b/lib/tst_test.c
> > index 06f0339..f592aa5 100644
> > --- a/lib/tst_test.c
> > +++ b/lib/tst_test.c
> > @@ -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.

> > diff --git a/tools/netpipe-2.4/netpipe.sh b/tools/netpipe-2.4/netpipe.sh
> > index f1445a3..9827e1e 100644
> > --- a/tools/netpipe-2.4/netpipe.sh
> > +++ b/tools/netpipe-2.4/netpipe.sh
> > @@ -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 (robbiew@austin.ibm.com)
> >  #               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.
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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [LTP] [PATCH 1/1] Tiny doc fixes
  2016-11-15 16:46   ` Petr Vorel
@ 2016-11-15 16:50     ` Cyril Hrubis
  0 siblings, 0 replies; 4+ messages in thread
From: Cyril Hrubis @ 2016-11-15 16:50 UTC (permalink / raw)
  To: ltp

Hi!
> > >  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...

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

> > 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
> 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.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-11-15 16:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-15 10:06 [LTP] [PATCH 1/1] Tiny doc fixes Petr Vorel
2016-11-15 16:20 ` Cyril Hrubis
2016-11-15 16:46   ` Petr Vorel
2016-11-15 16:50     ` Cyril Hrubis

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.