Hi!
> +static void setup(void);
Hmm, setup() is declared static here.
> +static void test_in6_are_addr_equal(void);
> +static void test_protocols_entry(void);
> +static int csum_test(char *rhost);
> +static void test_ipv6_checksum(void);
>
> -#define READ_TIMEOUT 5 /* secs */
>
> -void do_tests(void);
> -void setup(void), cleanup(void);
> -int csum_test(char *rhost);
> +static void (*testfunc[])(void) = { test_in6_are_addr_equal,
> + test_protocols_entry, test_ipv6_checksum };
> +
> +char *TCID = "asapi_04";
> +int TST_TOTAL = ARRAY_SIZE(testfunc);
>
> int main(int argc, char *argv[])
> {
> int lc;
> + int i;
>
> tst_parse_opts(argc, argv, 0, 0);
>
> @@ -86,22 +65,27 @@ int main(int argc, char *argv[])
>
> setup();
>
> - for (lc = 0; TEST_LOOPING(lc); ++lc)
> - do_tests();
> + for (lc = 0; TEST_LOOPING(lc); ++lc) {
> + tst_count = 0;
>
> - cleanup();
> + for (i = 0; i < TST_TOTAL; i++)
> + (*testfunc[i])();
> + }
>
> tst_exit();
> }
>
> -void do_tests(void)
> +void setup(void)
> {
> - int i;
> + TEST_PAUSE;
> +}
But it's missing static here.
--
Cyril Hrubis
[email protected]
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list