snapraid/raid/test/selftest.c

30 lines
475 B
C
Raw Normal View History

// SPDX-License-Identifier: GPL-2.0-or-later
2026-04-02 16:25:49 +02:00
// Copyright (C) 2013 Andrea Mazzoleni
2026-01-17 21:16:21 +01:00
/* Self-test for the RAID library */
#include "internal.h"
#include "cpu.h"
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
2026-01-17 21:16:21 +01:00
printf("Self-test for the RAID Cauchy library\n\n");
raid_init();
2026-01-17 21:16:21 +01:00
printf("Self-test...\n");
if (raid_selftest() != 0) {
2015-03-18 22:55:17 +01:00
/* LCOV_EXCL_START */
printf("FAILED!\n");
exit(EXIT_FAILURE);
2015-03-18 22:55:17 +01:00
/* LCOV_EXCL_STOP */
}
printf("OK\n\n");
return 0;
}