diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2015-02-03 05:17:10 -0200 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2015-02-03 05:19:38 -0200 |
commit | 1669be85dec2288f8c756d78c8033ab01d395143 (patch) | |
tree | a4aa2d12463d47bc86c24513768a172dae60ccf6 | |
parent | 0e68c6258ef802c0e67a69921f5c23a3caa1c70f (diff) | |
download | kmod-1669be85dec2288f8c756d78c8033ab01d395143.tar.gz kmod-1669be85dec2288f8c756d78c8033ab01d395143.tar.bz2 kmod-1669be85dec2288f8c756d78c8033ab01d395143.zip |
testsuite: convert test-init function to use mod-simple.ko
-rwxr-xr-x | testsuite/populate-modules.sh | 2 | ||||
-rw-r--r-- | testsuite/rootfs-pristine/test-init/correct.txt | 28 | ||||
-rw-r--r-- | testsuite/rootfs-pristine/test-init/ext4-i686.ko | bin | 437788 -> 0 bytes | |||
-rw-r--r-- | testsuite/rootfs-pristine/test-init/ext4-ppc64.ko | bin | 704776 -> 0 bytes | |||
-rw-r--r-- | testsuite/rootfs-pristine/test-init/ext4-s390x.ko | bin | 773856 -> 0 bytes | |||
-rw-r--r-- | testsuite/rootfs-pristine/test-init/ext4-x86_64.ko | bin | 627040 -> 0 bytes | |||
-rw-r--r-- | testsuite/rootfs-pristine/test-remove/correct.txt | 28 | ||||
-rw-r--r-- | testsuite/rootfs-pristine/test-remove/ext4-i686.ko | bin | 437788 -> 0 bytes | |||
-rw-r--r-- | testsuite/rootfs-pristine/test-remove/ext4-ppc64.ko | bin | 704776 -> 0 bytes | |||
-rw-r--r-- | testsuite/rootfs-pristine/test-remove/ext4-s390x.ko | bin | 773856 -> 0 bytes | |||
-rw-r--r-- | testsuite/rootfs-pristine/test-remove/ext4-x86_64.ko | bin | 627040 -> 0 bytes | |||
-rw-r--r-- | testsuite/test-init.c | 12 |
12 files changed, 8 insertions, 62 deletions
diff --git a/testsuite/populate-modules.sh b/testsuite/populate-modules.sh index 6a32f04..8f3f9dd 100755 --- a/testsuite/populate-modules.sh +++ b/testsuite/populate-modules.sh @@ -15,6 +15,8 @@ map=( ["test-dependencies/lib/modules/4.0.20-kmod/kernel/"]="mod-foo-c.ko" ["test-dependencies/lib/modules/4.0.20-kmod/kernel/lib/"]="mod-foo-a.ko" ["test-dependencies/lib/modules/4.0.20-kmod/kernel/fs/"]="mod-foo.ko" + ["test-init/"]="mod-simple.ko" + ["test-remove/"]="mod-simple.ko" ) for k in ${!map[@]}; do diff --git a/testsuite/rootfs-pristine/test-init/correct.txt b/testsuite/rootfs-pristine/test-init/correct.txt deleted file mode 100644 index 1682154..0000000 --- a/testsuite/rootfs-pristine/test-init/correct.txt +++ /dev/null @@ -1,28 +0,0 @@ -filename: /ext4-i686.ko -license: GPL -description: Fourth Extended Filesystem -author: Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others -srcversion: A80608676B83D55514B450E -depends: mbcache,jbd2 -vermagic: 2.6.32-220.el6.i686 SMP mod_unload modversions 686 -filename: /ext4-ppc64.ko -license: GPL -description: Fourth Extended Filesystem -author: Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others -srcversion: 670806A855D5836BE150B41 -depends: jbd2,mbcache -vermagic: 2.6.32-220.el6.ppc64 SMP mod_unload modversions -filename: /ext4-s390x.ko -license: GPL -description: Fourth Extended Filesystem -author: Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others -srcversion: 670806A855D5836BE150B41 -depends: mbcache,jbd2 -vermagic: 2.6.32-220.el6.s390x SMP mod_unload modversions -filename: /ext4-x86_64.ko -license: GPL -description: Fourth Extended Filesystem -author: Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others -srcversion: A80608676B83D55514B450E -depends: mbcache,jbd2 -vermagic: 2.6.32-220.el6.x86_64 SMP mod_unload modversions diff --git a/testsuite/rootfs-pristine/test-init/ext4-i686.ko b/testsuite/rootfs-pristine/test-init/ext4-i686.ko Binary files differdeleted file mode 100644 index e5d2fb7..0000000 --- a/testsuite/rootfs-pristine/test-init/ext4-i686.ko +++ /dev/null diff --git a/testsuite/rootfs-pristine/test-init/ext4-ppc64.ko b/testsuite/rootfs-pristine/test-init/ext4-ppc64.ko Binary files differdeleted file mode 100644 index cb02ed4..0000000 --- a/testsuite/rootfs-pristine/test-init/ext4-ppc64.ko +++ /dev/null diff --git a/testsuite/rootfs-pristine/test-init/ext4-s390x.ko b/testsuite/rootfs-pristine/test-init/ext4-s390x.ko Binary files differdeleted file mode 100644 index 74c3799..0000000 --- a/testsuite/rootfs-pristine/test-init/ext4-s390x.ko +++ /dev/null diff --git a/testsuite/rootfs-pristine/test-init/ext4-x86_64.ko b/testsuite/rootfs-pristine/test-init/ext4-x86_64.ko Binary files differdeleted file mode 100644 index ae96eef..0000000 --- a/testsuite/rootfs-pristine/test-init/ext4-x86_64.ko +++ /dev/null diff --git a/testsuite/rootfs-pristine/test-remove/correct.txt b/testsuite/rootfs-pristine/test-remove/correct.txt deleted file mode 100644 index 1682154..0000000 --- a/testsuite/rootfs-pristine/test-remove/correct.txt +++ /dev/null @@ -1,28 +0,0 @@ -filename: /ext4-i686.ko -license: GPL -description: Fourth Extended Filesystem -author: Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others -srcversion: A80608676B83D55514B450E -depends: mbcache,jbd2 -vermagic: 2.6.32-220.el6.i686 SMP mod_unload modversions 686 -filename: /ext4-ppc64.ko -license: GPL -description: Fourth Extended Filesystem -author: Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others -srcversion: 670806A855D5836BE150B41 -depends: jbd2,mbcache -vermagic: 2.6.32-220.el6.ppc64 SMP mod_unload modversions -filename: /ext4-s390x.ko -license: GPL -description: Fourth Extended Filesystem -author: Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others -srcversion: 670806A855D5836BE150B41 -depends: mbcache,jbd2 -vermagic: 2.6.32-220.el6.s390x SMP mod_unload modversions -filename: /ext4-x86_64.ko -license: GPL -description: Fourth Extended Filesystem -author: Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others -srcversion: A80608676B83D55514B450E -depends: mbcache,jbd2 -vermagic: 2.6.32-220.el6.x86_64 SMP mod_unload modversions diff --git a/testsuite/rootfs-pristine/test-remove/ext4-i686.ko b/testsuite/rootfs-pristine/test-remove/ext4-i686.ko Binary files differdeleted file mode 100644 index e5d2fb7..0000000 --- a/testsuite/rootfs-pristine/test-remove/ext4-i686.ko +++ /dev/null diff --git a/testsuite/rootfs-pristine/test-remove/ext4-ppc64.ko b/testsuite/rootfs-pristine/test-remove/ext4-ppc64.ko Binary files differdeleted file mode 100644 index cb02ed4..0000000 --- a/testsuite/rootfs-pristine/test-remove/ext4-ppc64.ko +++ /dev/null diff --git a/testsuite/rootfs-pristine/test-remove/ext4-s390x.ko b/testsuite/rootfs-pristine/test-remove/ext4-s390x.ko Binary files differdeleted file mode 100644 index 74c3799..0000000 --- a/testsuite/rootfs-pristine/test-remove/ext4-s390x.ko +++ /dev/null diff --git a/testsuite/rootfs-pristine/test-remove/ext4-x86_64.ko b/testsuite/rootfs-pristine/test-remove/ext4-x86_64.ko Binary files differdeleted file mode 100644 index ae96eef..0000000 --- a/testsuite/rootfs-pristine/test-remove/ext4-x86_64.ko +++ /dev/null diff --git a/testsuite/test-init.c b/testsuite/test-init.c index 45846f7..9651280 100644 --- a/testsuite/test-init.c +++ b/testsuite/test-init.c @@ -56,7 +56,7 @@ static noreturn int test_insert(const struct test *t) if (ctx == NULL) exit(EXIT_FAILURE); - err = kmod_module_new_from_path(ctx, "/ext4-x86_64.ko", &mod); + err = kmod_module_new_from_path(ctx, "/mod-simple.ko", &mod); if (err != 0) { ERR("could not create module from path: %m\n"); exit(EXIT_FAILURE); @@ -77,13 +77,13 @@ DEFINE_TEST(test_insert, [TC_ROOTFS] = TESTSUITE_ROOTFS "test-init/", [TC_INIT_MODULE_RETCODES] = "bla:1:20", }, - .modules_loaded = "ext4", + .modules_loaded = "mod_simple", .need_spawn = true); static noreturn int test_remove(const struct test *t) { struct kmod_ctx *ctx; - struct kmod_module *mod_ext4, *mod_bla; + struct kmod_module *mod_simple, *mod_bla; const char *null_config = NULL; int err; @@ -91,7 +91,7 @@ static noreturn int test_remove(const struct test *t) if (ctx == NULL) exit(EXIT_FAILURE); - err = kmod_module_new_from_name(ctx, "ext4", &mod_ext4); + err = kmod_module_new_from_name(ctx, "mod-simple", &mod_simple); if (err != 0) { ERR("could not create module from name: %s\n", strerror(-err)); exit(EXIT_FAILURE); @@ -103,7 +103,7 @@ static noreturn int test_remove(const struct test *t) exit(EXIT_FAILURE); } - err = kmod_module_remove_module(mod_ext4, 0); + err = kmod_module_remove_module(mod_simple, 0); if (err != 0) { ERR("could not remove module: %s\n", strerror(-err)); exit(EXIT_FAILURE); @@ -124,7 +124,7 @@ DEFINE_TEST(test_remove, .config = { [TC_ROOTFS] = TESTSUITE_ROOTFS "test-remove/", [TC_DELETE_MODULE_RETCODES] = - "ext4:0:0:bla:-1:" STRINGIFY(ENOENT), + "mod-simple:0:0:bla:-1:" STRINGIFY(ENOENT), }, .need_spawn = true); |