Modify elf/tst-audit9.c to use test-skeleton.c

Message ID 20150709145129.GA33555@aloka.lostca.se
State Committed
Headers

Commit Message

Arjun Shankar July 9, 2015, 2:51 p.m. UTC
  This test was skipped by the use-test-skeleton conversion script
[29955b5d] because the definition of `main' did not begin according to
the GNU formatting style that the script assumed.

ChangeLog:

2015-07-09  Arjun Shankar  <arjun.is@lostca.se>

	* elf/tst-audit9.c (main): Converted to ...
	(do_test): ... this.
	(TEST_FUNCTION): New macro.
	Include test-skeleton.c.
---
 elf/tst-audit9.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
  

Comments

Ondrej Bilka July 9, 2015, 3:03 p.m. UTC | #1
On Thu, Jul 09, 2015 at 02:51:30PM +0000, Arjun Shankar wrote:
> 
> This test was skipped by the use-test-skeleton conversion script
> [29955b5d] because the definition of `main' did not begin according to
> the GNU formatting style that the script assumed.
>
looks ok.
 
> ChangeLog:
> 
> 2015-07-09  Arjun Shankar  <arjun.is@lostca.se>
> 
> 	* elf/tst-audit9.c (main): Converted to ...
> 	(do_test): ... this.
> 	(TEST_FUNCTION): New macro.
> 	Include test-skeleton.c.
> ---
>  elf/tst-audit9.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 

> diff --git a/elf/tst-audit9.c b/elf/tst-audit9.c
> index 0982d8b..7b90a5a 100644
> --- a/elf/tst-audit9.c
> +++ b/elf/tst-audit9.c
> @@ -1,8 +1,12 @@
>  #include <dlfcn.h>
>  
> -int main(void)
> +static int
> +do_test (void)
>  {
>    void *h = dlopen("$ORIGIN/tst-auditmod9b.so", RTLD_LAZY);
>    int (*fp)(void) = dlsym(h, "f");
>    return fp() - 1;
>  }
> +
> +#define TEST_FUNCTION do_test ()
> +#include "../test-skeleton.c"
  
Siddhesh Poyarekar July 15, 2015, 9:42 a.m. UTC | #2
On Thu, Jul 09, 2015 at 02:51:30PM +0000, Arjun Shankar wrote:
> 
> This test was skipped by the use-test-skeleton conversion script
> [29955b5d] because the definition of `main' did not begin according to
> the GNU formatting style that the script assumed.

Committed.

Thanks,
Siddhesh
  

Patch

diff --git a/elf/tst-audit9.c b/elf/tst-audit9.c
index 0982d8b..7b90a5a 100644
--- a/elf/tst-audit9.c
+++ b/elf/tst-audit9.c
@@ -1,8 +1,12 @@ 
 #include <dlfcn.h>
 
-int main(void)
+static int
+do_test (void)
 {
   void *h = dlopen("$ORIGIN/tst-auditmod9b.so", RTLD_LAZY);
   int (*fp)(void) = dlsym(h, "f");
   return fp() - 1;
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"