lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51641A09.7040108@cogentembedded.com>
Date:	Tue, 09 Apr 2013 17:39:21 +0400
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Alexandru Copot <alex.mihai.c@...il.com>
CC:	netdev@...r.kernel.org, davem@...emloft.net, willemb@...gle.com,
	dborkman@...hat.com, edumazet@...gle.com,
	Daniel Baluta <dbaluta@...acom.com>
Subject: Re: [PATCH 1/3 net-next RFC] selftest: add abstractions for net selftests

Hello.

On 09-04-2013 14:30, Alexandru Copot wrote:

> Signed-of by Alexandru Copot <alex.mihai.c@...il.com>
> Cc: Daniel Baluta <dbaluta@...acom.com>
[...]

> diff --git a/tools/testing/selftests/net/selftests.c b/tools/testing/selftests/net/selftests.c
> new file mode 100644
> index 0000000..cd6e427
> --- /dev/null
> +++ b/tools/testing/selftests/net/selftests.c
> @@ -0,0 +1,30 @@
> +#include <stdio.h>
> +
> +#include "selftests.h"
> +
> +int run_all_tests(struct generic_test *test, void *param)
> +{
> +	int i;
> +	int rc, allrc;
> +	char *ptr;
> +
> +	rc = test->prepare ? test->prepare(param) : 0;
> +	if (rc)
> +		return rc;
> +
> +	allrc = 0;
> +	printf("Testing: %s ", test->name);
> +	ptr = test->testcases;
> +	for (i = 0; i < test->testcase_count; i++) {
> +		rc = test->run(ptr);
> +		allrc |= rc;
> +
> +		if (test->abort_on_fail && rc) {
> +			printf("Testcase %d failed, aborting\n", i);
> +		}

    Nit: {} not needed here, at least if you folow the Linux coding style (you 
seem to).

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ