Hi Alberto,
On Tue, Nov 27, 2018 at 02:02:22PM +0100, Alberto Gonzalez Iniesta wrote:
> > > Hi,
> > >
> > > The build daemons at Debian are failing the test suite for modsecurity
> > > 3.x. There are two failures I could use some help on:
> > >
> > > 1)
> > > ./regression_tests .././test/test-cases/regression/variable-ENV.json:1
> > > :test-result: FAIL variable-ENV.json:Testing Variables :: ENV (2/3)
> > >
> > > My guess is that build daemon don't have the TERM variable set, and I'm
> > > pondering disabling this test unless someone claims this is a bad idea.
> >
> > that's what I wrote you on mod-security-packagers list:
> >
> > https://sourceforge.net/p/mod-security/mailman/message/36455922/
> >
> > But my question is: why is it better to completely disable the
> > test than my suggestion?
>
> As we already talked about, I'm not sure that playing with envvars in
> build daemons is such a good idea. And I'd like to know if that test is
> really useful. That's why I asked here again.
right - hope somebody will clarify / confirm or confute this, but
I think it's useful and important. I mean it is, but not for the
build environment, but the developers and production
environments.
> > * I've suggested a solution:
> > https://github.com/airween/ModSecurity/blob/90a09f3a7616ae8f4406a30d213bd971cf1c45bb/debian/rules#L9
> > * I'm sure that there are several other solution, eg: make a
> > patch in debian/patches/ directory, which replaces the TERM
> > variable for an another ENV variable, which exists in build
> > system?
>
> Maybe the person that created the test case in the first place can
> clarify the target of it.
let's see the rule, what's happening:
- ModSec wants to read an environment variable, short form ENV
- the name of variable is "TERM"
- ModSec checks if the variable contains the pattern "test"
- and finally, it doesn't care if it does :), because the action
will pass always
I think this test case just _READ_ the ENV, it doesn't matter,
what's the content of it.
If it can't read, then it will fail.
As I wrote above, hope somebody will confirm it, but I think it
would be good to keep this test, and replace the ENV for
something what exists in build env, or setit up explicitly.
Regards,
a.
|