]> git.ipfire.org Git - thirdparty/kmod.git/blobdiff - testsuite/test-testsuite.c
Remove FSF mailing address
[thirdparty/kmod.git] / testsuite / test-testsuite.c
index 8518431ea9474fc7b1360058a6f7d59a0e7b8fcb..2d2c96337f5b28c06e64f3389310f9c63122a1f6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012  ProFUSION embedded systems
+ * Copyright (C) 2012-2013  ProFUSION embedded systems
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <dirent.h>
+#include <errno.h>
+#include <stddef.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <stddef.h>
 #include <string.h>
-#include <dirent.h>
-#include <errno.h>
 #include <unistd.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <sys/utsname.h>
+
 #include <libkmod.h>
 
 #include "testsuite.h"
 
 
 #define TEST_UNAME "4.0.20-kmod"
-static __noreturn int testsuite_uname(const struct test *t)
+static noreturn int testsuite_uname(const struct test *t)
 {
        struct utsname u;
        int err = uname(&u);
@@ -49,7 +49,7 @@ static __noreturn int testsuite_uname(const struct test *t)
 
        exit(EXIT_SUCCESS);
 }
-static DEFINE_TEST(testsuite_uname,
+DEFINE_TEST(testsuite_uname,
        .description = "test if trap to uname() works",
        .config = {
                [TC_UNAME_R] = TEST_UNAME,
@@ -75,7 +75,7 @@ static int testsuite_rootfs_fopen(const struct test *t)
 
        return EXIT_SUCCESS;
 }
-static DEFINE_TEST(testsuite_rootfs_fopen,
+DEFINE_TEST(testsuite_rootfs_fopen,
        .description = "test if rootfs works - fopen()",
        .config = {
                [TC_ROOTFS] = TESTSUITE_ROOTFS "test-rootfs/",
@@ -108,7 +108,7 @@ static int testsuite_rootfs_open(const struct test *t)
 
        return EXIT_SUCCESS;
 }
-static DEFINE_TEST(testsuite_rootfs_open,
+DEFINE_TEST(testsuite_rootfs_open,
        .description = "test if rootfs works - open()",
        .config = {
                [TC_ROOTFS] = TESTSUITE_ROOTFS "test-rootfs/",
@@ -131,7 +131,7 @@ static int testsuite_rootfs_stat_access(const struct test *t)
 
        return EXIT_SUCCESS;
 }
-static DEFINE_TEST(testsuite_rootfs_stat_access,
+DEFINE_TEST(testsuite_rootfs_stat_access,
        .description = "test if rootfs works - stat() and access()",
        .config = {
                [TC_ROOTFS] = TESTSUITE_ROOTFS "test-rootfs/",
@@ -151,20 +151,11 @@ static int testsuite_rootfs_opendir(const struct test *t)
        closedir(d);
        return EXIT_SUCCESS;
 }
-static DEFINE_TEST(testsuite_rootfs_opendir,
+DEFINE_TEST(testsuite_rootfs_opendir,
        .description = "test if rootfs works - opendir()",
        .config = {
                [TC_ROOTFS] = TESTSUITE_ROOTFS "test-rootfs/",
        },
        .need_spawn = true);
 
-static const struct test *tests[] = {
-       &stestsuite_uname,
-       &stestsuite_rootfs_fopen,
-       &stestsuite_rootfs_open,
-       &stestsuite_rootfs_stat_access,
-       &stestsuite_rootfs_opendir,
-       NULL,
-};
-
-TESTSUITE_MAIN(tests);
+TESTSUITE_MAIN();