coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [coreutils] [PATCH] tests: silence 'make syntax-check'


From: Pádraig Brady
Subject: Re: [coreutils] [PATCH] tests: silence 'make syntax-check'
Date: Wed, 11 Aug 2010 10:55:57 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3

On 09/08/10 21:59, Eric Blake wrote:
> * gl/tests/test-rand-isaac.c (main): Avoid warnings from
> syntax-check.
> ---
> 
> Committing as obvious.  The set_program_name hack is borrowed
> liberally from test-ino-map.c.
> 
>  gl/tests/test-rand-isaac.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/gl/tests/test-rand-isaac.c b/gl/tests/test-rand-isaac.c
> index 330b18f..c1ad01a 100644
> --- a/gl/tests/test-rand-isaac.c
> +++ b/gl/tests/test-rand-isaac.c
> @@ -576,6 +576,7 @@ static isaac_word const expected[2][ISAAC_WORDS] =
>  int
>  main (int argc, char **argv)
>  {
> +  /* set_program_name (argv[0]); placate overzealous "syntax-check" test.  */
>    unsigned int i;
>    isaac_word r[ISAAC_WORDS];
>    int iterations;

It would be more consistent to update .x-sc_program_name
In fact we can do better and exclude all programs in this directory:


commit 41fe1906319d008af5c5f1d8fbeeadf45cde5333
Author: Pádraig Brady <address@hidden>
Date:   Wed Aug 11 10:49:22 2010 +0100

    maint: exclude all tests from the set_program_name syntax-check

    * .x-sc_program_name: Exclude all current and future
    c files in gl/tests from this check
    * gl/tests/test-di-set.c: Remove the hack to work around
    the set_program_name syntax-check
    * gl/tests/test-ino-map.c: Likewise
    * gl/tests/test-rand-isaac.c: Likewise

diff --git a/.x-sc_program_name b/.x-sc_program_name
index 0667044..86cc5c1 100644
--- a/.x-sc_program_name
+++ b/.x-sc_program_name
@@ -1,4 +1,3 @@
 gl/lib/randint.c
 lib/euidaccess-stat.c
-gl/tests/test-mbsalign.c
-gl/tests/test-fadvise.c
+gl/tests/.*\.c
diff --git a/gl/tests/test-di-set.c b/gl/tests/test-di-set.c
index e5fb6cb..7f02e66 100644
--- a/gl/tests/test-di-set.c
+++ b/gl/tests/test-di-set.c
@@ -39,7 +39,6 @@
 int
 main (void)
 {
-  /* set_program_name (argv[0]); placate overzealous "syntax-check" test.  */
   struct di_set *dis = di_set_alloc ();
   ASSERT (dis);

diff --git a/gl/tests/test-ino-map.c b/gl/tests/test-ino-map.c
index 2b44602..aa7334a 100644
--- a/gl/tests/test-ino-map.c
+++ b/gl/tests/test-ino-map.c
@@ -39,7 +39,6 @@
 int
 main ()
 {
-  /* set_program_name (argv[0]); placate overzealous "syntax-check" test.  */
   enum { INO_MAP_INIT = 123 };
   struct ino_map *ino_map = ino_map_alloc (INO_MAP_INIT);
   ASSERT (ino_map != NULL);
diff --git a/gl/tests/test-rand-isaac.c b/gl/tests/test-rand-isaac.c
index c1ad01a..03b004c 100644
--- a/gl/tests/test-rand-isaac.c
+++ b/gl/tests/test-rand-isaac.c
@@ -576,7 +576,6 @@ static isaac_word const expected[2][ISAAC_WORDS] =
 int
 main (int argc, char **argv)
 {
-  /* set_program_name (argv[0]); placate overzealous "syntax-check" test.  */
   unsigned int i;
   isaac_word r[ISAAC_WORDS];
   int iterations;

cheers,
Pádraig.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]