2012-01-27 02:01:41 +07:00
|
|
|
/*
|
2013-01-16 20:27:21 +07:00
|
|
|
* Copyright (C) 2012-2013 ProFUSION embedded systems
|
2012-01-27 02:01:41 +07:00
|
|
|
*
|
2012-07-10 19:42:24 +07:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2012-01-27 02:01:41 +07:00
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2012-07-10 19:42:24 +07:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2012-01-27 02:01:41 +07:00
|
|
|
*
|
2012-07-10 19:42:24 +07:00
|
|
|
* 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
|
2012-01-27 02:01:41 +07:00
|
|
|
*/
|
|
|
|
|
2012-01-26 05:32:48 +07:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <inttypes.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include "testsuite.h"
|
|
|
|
|
2013-12-18 04:10:16 +07:00
|
|
|
static noreturn int modinfo_jonsmodules(const struct test *t)
|
2012-01-26 05:32:48 +07:00
|
|
|
{
|
2013-07-05 02:01:55 +07:00
|
|
|
const char *progname = ABS_TOP_BUILDDIR "/tools/modinfo";
|
2012-01-26 05:32:48 +07:00
|
|
|
const char *const args[] = {
|
|
|
|
progname,
|
|
|
|
"/ext4-i686.ko", "/ext4-ppc64.ko", "/ext4-s390x.ko",
|
2013-01-17 03:04:00 +07:00
|
|
|
"/ext4-x86_64.ko", "/ext4-x86_64-sha1.ko",
|
|
|
|
"/ext4-x86_64-sha256.ko",
|
2012-01-26 05:32:48 +07:00
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
test_spawn_prog(progname, args);
|
|
|
|
exit(EXIT_FAILURE);
|
|
|
|
}
|
2012-02-07 19:46:46 +07:00
|
|
|
static DEFINE_TEST(modinfo_jonsmodules,
|
2012-01-26 05:32:48 +07:00
|
|
|
.description = "check if output for modinfo is correct for i686, ppc64, s390x and x86_64",
|
|
|
|
.config = {
|
|
|
|
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-modinfo/",
|
|
|
|
},
|
|
|
|
.output = {
|
2013-08-27 06:38:11 +07:00
|
|
|
.out = TESTSUITE_ROOTFS "test-modinfo/correct.txt",
|
2012-02-07 19:46:46 +07:00
|
|
|
});
|
2012-01-26 05:32:48 +07:00
|
|
|
|
|
|
|
static const struct test *tests[] = {
|
|
|
|
&smodinfo_jonsmodules,
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2012-02-07 19:09:20 +07:00
|
|
|
TESTSUITE_MAIN(tests);
|