File: selftest.c

package info (click to toggle)
snapraid 13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,656 kB
  • sloc: ansic: 46,018; makefile: 1,004; sh: 154
file content (40 lines) | stat: -rw-r--r-- 955 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
 * Copyright (C) 2013 Andrea Mazzoleni
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

/* Self sanity test for the RAID library */

#include "internal.h"
#include "cpu.h"

#include <stdio.h>
#include <stdlib.h>

int main(void)
{
	printf("Self sanity test for the RAID Cauchy library\n\n");

	raid_init();

	printf("Self test...\n");
	if (raid_selftest() != 0) {
		/* LCOV_EXCL_START */
		printf("FAILED!\n");
		exit(EXIT_FAILURE);
		/* LCOV_EXCL_STOP */
	}
	printf("OK\n\n");

	return 0;
}