* [PATCH 1/3] testsuite: Do not run tests with *.ko.gz if zlib is not enabled
@ 2014-04-04 9:32 Michal Marek
2014-04-04 9:32 ` [PATCH 2/3] testsuite: Mark empty tests as skipped Michal Marek
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Michal Marek @ 2014-04-04 9:32 UTC (permalink / raw)
To: linux-modules
Unfortunately, all the depmod tests depend on zlib.
---
testsuite/test-depmod.c | 2 ++
testsuite/test-modprobe.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/testsuite/test-depmod.c b/testsuite/test-depmod.c
index b6023f1..86e89a4 100644
--- a/testsuite/test-depmod.c
+++ b/testsuite/test-depmod.c
@@ -135,10 +135,12 @@ static DEFINE_TEST(depmod_search_order_same_prefix2,
static const struct test *tests[] = {
+#ifdef ENABLE_ZLIB
&sdepmod_modules_order_for_compressed,
&sdepmod_search_order_simple,
&sdepmod_search_order_same_prefix,
&sdepmod_search_order_same_prefix2,
+#endif
NULL,
};
diff --git a/testsuite/test-modprobe.c b/testsuite/test-modprobe.c
index d7663e6..c49e75b 100644
--- a/testsuite/test-modprobe.c
+++ b/testsuite/test-modprobe.c
@@ -332,7 +332,9 @@ static const struct test *tests[] = {
&smodprobe_show_alias_to_none,
&smodprobe_builtin,
&smodprobe_softdep_loop,
+#ifdef ENABLE_ZLIB
&smodprobe_install_cmd_loop,
+#endif
&smodprobe_param_kcmdline,
&smodprobe_param_kcmdline2,
&smodprobe_param_kcmdline3,
--
1.8.4.5
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 2/3] testsuite: Mark empty tests as skipped
2014-04-04 9:32 [PATCH 1/3] testsuite: Do not run tests with *.ko.gz if zlib is not enabled Michal Marek
@ 2014-04-04 9:32 ` Michal Marek
2014-04-04 9:32 ` [PATCH 3/3] testsuite: Warn if sysconfdir is not /etc Michal Marek
2014-04-04 9:47 ` [PATCH 1/3] testsuite: Do not run tests with *.ko.gz if zlib is not enabled Lucas De Marchi
2 siblings, 0 replies; 8+ messages in thread
From: Michal Marek @ 2014-04-04 9:32 UTC (permalink / raw)
To: linux-modules
---
testsuite/testsuite.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/testsuite/testsuite.h b/testsuite/testsuite.h
index f2a75e5..33f0a1e 100644
--- a/testsuite/testsuite.h
+++ b/testsuite/testsuite.h
@@ -147,7 +147,8 @@ int test_run(const struct test *t);
\
return test_run(t); \
} \
- \
+ if (!tests[0]) \
+ exit(77); \
for (i = 0; tests[i] != NULL; i++) { \
if (test_run(tests[i]) != 0) \
exit(EXIT_FAILURE); \
--
1.8.4.5
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 3/3] testsuite: Warn if sysconfdir is not /etc
2014-04-04 9:32 [PATCH 1/3] testsuite: Do not run tests with *.ko.gz if zlib is not enabled Michal Marek
2014-04-04 9:32 ` [PATCH 2/3] testsuite: Mark empty tests as skipped Michal Marek
@ 2014-04-04 9:32 ` Michal Marek
2014-04-04 9:39 ` [PATCH v2 " Michal Marek
2014-04-04 9:47 ` [PATCH 1/3] testsuite: Do not run tests with *.ko.gz if zlib is not enabled Lucas De Marchi
2 siblings, 1 reply; 8+ messages in thread
From: Michal Marek @ 2014-04-04 9:32 UTC (permalink / raw)
To: linux-modules
---
A better solution might be to default to /etc in configure.ac. Opinions?
Makefile.am | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index e65fdfb..8bd727e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -213,7 +213,13 @@ TESTSUITE_OVERRIDE_LIBS = testsuite/uname.la testsuite/path.la \
TESTSUITE_OVERRIDE_LIBS_LDFLAGS = avoid-version -module -shared -export-dynamic \
-rpath /nowhere -ldl
-check-am: rootfs
+check-sysconfdir:
+ $(AM_V_at)if test "$(sysconfdir)" != "/etc" -a "$(sysconfdir)" != "/etc/"; then \
+ echo "warning: Some tests will fail without --sysconfdir=/etc" >&2; \
+ fi
+
+check-am: rootfs check-sysconfdir
+
check_LTLIBRARIES = $(TESTSUITE_OVERRIDE_LIBS)
--
1.8.4.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 3/3] testsuite: Warn if sysconfdir is not /etc
2014-04-04 9:32 ` [PATCH 3/3] testsuite: Warn if sysconfdir is not /etc Michal Marek
@ 2014-04-04 9:39 ` Michal Marek
0 siblings, 0 replies; 8+ messages in thread
From: Michal Marek @ 2014-04-04 9:39 UTC (permalink / raw)
To: linux-modules
---
v2: Marked the target as PHONY
Question remains if we shouldn't default to /etc in configure.ac
Makefile.am | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index e65fdfb..199588c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -213,7 +213,14 @@ TESTSUITE_OVERRIDE_LIBS = testsuite/uname.la testsuite/path.la \
TESTSUITE_OVERRIDE_LIBS_LDFLAGS = avoid-version -module -shared -export-dynamic \
-rpath /nowhere -ldl
-check-am: rootfs
+check-sysconfdir:
+ $(AM_V_at)if test "$(sysconfdir)" != "/etc" -a "$(sysconfdir)" != "/etc/"; then \
+ echo "warning: Some tests will fail without --sysconfdir=/etc" >&2; \
+ fi
+.PHONY: check-sysconfdir
+
+check-am: rootfs check-sysconfdir
+
check_LTLIBRARIES = $(TESTSUITE_OVERRIDE_LIBS)
--
1.8.4.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] testsuite: Do not run tests with *.ko.gz if zlib is not enabled
2014-04-04 9:32 [PATCH 1/3] testsuite: Do not run tests with *.ko.gz if zlib is not enabled Michal Marek
2014-04-04 9:32 ` [PATCH 2/3] testsuite: Mark empty tests as skipped Michal Marek
2014-04-04 9:32 ` [PATCH 3/3] testsuite: Warn if sysconfdir is not /etc Michal Marek
@ 2014-04-04 9:47 ` Lucas De Marchi
2014-04-04 9:59 ` Michal Marek
2 siblings, 1 reply; 8+ messages in thread
From: Lucas De Marchi @ 2014-04-04 9:47 UTC (permalink / raw)
To: Michal Marek; +Cc: linux-modules
On Fri, Apr 4, 2014 at 6:32 AM, Michal Marek <mmarek@suse.cz> wrote:
> Unfortunately, all the depmod tests depend on zlib.
wouldn't it be better to decompress these files so we remove the dependencies?
> ---
> testsuite/test-depmod.c | 2 ++
> testsuite/test-modprobe.c | 2 ++
> 2 files changed, 4 insertions(+)
>
> diff --git a/testsuite/test-depmod.c b/testsuite/test-depmod.c
> index b6023f1..86e89a4 100644
> --- a/testsuite/test-depmod.c
> +++ b/testsuite/test-depmod.c
> @@ -135,10 +135,12 @@ static DEFINE_TEST(depmod_search_order_same_prefix2,
>
>
> static const struct test *tests[] = {
> +#ifdef ENABLE_ZLIB
> &sdepmod_modules_order_for_compressed,
> &sdepmod_search_order_simple,
> &sdepmod_search_order_same_prefix,
> &sdepmod_search_order_same_prefix2,
> +#endif
if you do this, then there will be no feedback if and why a test is
skipped. Maybe defining some "global" struct for skipped tests that
we call when a test must be skipped? Example:
#ifdef ENABLE_ZLIB
&sdepmod_search_order_same_prefix2,
...
#else
&sskip_due_missing_zlib,
...
#endif
const struct test sskip_due_missing_zlib = {
.name = "skip_due_missing_zlib",
.description = "test skipped due to missing zlib", /* Abusing
the description here to use in our test function */
.func = skip_test,
};
static int skip_test(const struct test *t)
{
printf("%s", t->description);
return 0;
}
I don't really like the amount of ifdefs we can have... but maybe it
can be improved. What do you think?
--
Lucas De Marchi
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH 1/3] testsuite: Do not run tests with *.ko.gz if zlib is not enabled
2014-04-04 9:47 ` [PATCH 1/3] testsuite: Do not run tests with *.ko.gz if zlib is not enabled Lucas De Marchi
@ 2014-04-04 9:59 ` Michal Marek
2014-04-04 10:06 ` Lucas De Marchi
0 siblings, 1 reply; 8+ messages in thread
From: Michal Marek @ 2014-04-04 9:59 UTC (permalink / raw)
To: Lucas De Marchi; +Cc: linux-modules
On 2014-04-04 11:47, Lucas De Marchi wrote:
> On Fri, Apr 4, 2014 at 6:32 AM, Michal Marek <mmarek@suse.cz> wrote:
>> Unfortunately, all the depmod tests depend on zlib.
>
> wouldn't it be better to decompress these files so we remove the dependencies?
I'm not against it. I thought the files were compressed so the the zlib
support is tested. I can post a patch that decompresses them.
Michal
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] testsuite: Do not run tests with *.ko.gz if zlib is not enabled
2014-04-04 9:59 ` Michal Marek
@ 2014-04-04 10:06 ` Lucas De Marchi
2014-04-04 10:12 ` Michal Marek
0 siblings, 1 reply; 8+ messages in thread
From: Lucas De Marchi @ 2014-04-04 10:06 UTC (permalink / raw)
To: Michal Marek; +Cc: Lucas De Marchi, linux-modules
On Fri, Apr 04, 2014 at 11:59:14AM +0200, Michal Marek wrote:
> On 2014-04-04 11:47, Lucas De Marchi wrote:
> > On Fri, Apr 4, 2014 at 6:32 AM, Michal Marek <mmarek@suse.cz> wrote:
> >> Unfortunately, all the depmod tests depend on zlib.
> >
> > wouldn't it be better to decompress these files so we remove the dependencies?
>
> I'm not against it. I thought the files were compressed so the the zlib
> support is tested. I can post a patch that decompresses them.
Some of the tests, yes... not all of them. There's 1 specific test for
compressed modules. The others can be decompressed.
--
Lucas De Marchi
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] testsuite: Do not run tests with *.ko.gz if zlib is not enabled
2014-04-04 10:06 ` Lucas De Marchi
@ 2014-04-04 10:12 ` Michal Marek
0 siblings, 0 replies; 8+ messages in thread
From: Michal Marek @ 2014-04-04 10:12 UTC (permalink / raw)
To: Lucas De Marchi; +Cc: Lucas De Marchi, linux-modules
On 2014-04-04 12:06, Lucas De Marchi wrote:
> On Fri, Apr 04, 2014 at 11:59:14AM +0200, Michal Marek wrote:
>> On 2014-04-04 11:47, Lucas De Marchi wrote:
>>> On Fri, Apr 4, 2014 at 6:32 AM, Michal Marek <mmarek@suse.cz> wrote:
>>>> Unfortunately, all the depmod tests depend on zlib.
>>>
>>> wouldn't it be better to decompress these files so we remove the dependencies?
>>
>> I'm not against it. I thought the files were compressed so the the zlib
>> support is tested. I can post a patch that decompresses them.
>
>
> Some of the tests, yes... not all of them. There's 1 specific test for
> compressed modules. The others can be decompressed.
OK, then I will leave test-depmod/modules-order-compressed as is and
uncompress the rest.
Thanks,
Michal
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-04-04 10:12 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-04 9:32 [PATCH 1/3] testsuite: Do not run tests with *.ko.gz if zlib is not enabled Michal Marek
2014-04-04 9:32 ` [PATCH 2/3] testsuite: Mark empty tests as skipped Michal Marek
2014-04-04 9:32 ` [PATCH 3/3] testsuite: Warn if sysconfdir is not /etc Michal Marek
2014-04-04 9:39 ` [PATCH v2 " Michal Marek
2014-04-04 9:47 ` [PATCH 1/3] testsuite: Do not run tests with *.ko.gz if zlib is not enabled Lucas De Marchi
2014-04-04 9:59 ` Michal Marek
2014-04-04 10:06 ` Lucas De Marchi
2014-04-04 10:12 ` Michal Marek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).