* question about logger tests
@ 2015-03-26 13:50 Ruediger Meier
2015-03-27 14:14 ` Karel Zak
0 siblings, 1 reply; 5+ messages in thread
From: Ruediger Meier @ 2015-03-26 13:50 UTC (permalink / raw)
To: util-linux
Hi,
Our logger tests fail if it can't connect to /dev/log. I'd like to fix
that case for the test-suite but have some questions:
1. It was confusing for me to figure out the actual
problem. Maybe --no-act and/or --stderr should imply
that --socket-errors=auto turns error printing on?
2. Alternatively we could use --socket-errors=on for all tests.
3. Couldn't we fix --no-act to not need an open /dev/log at all?
cu,
Rudi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: question about logger tests
2015-03-26 13:50 question about logger tests Ruediger Meier
@ 2015-03-27 14:14 ` Karel Zak
2015-04-02 23:10 ` Ruediger Meier
0 siblings, 1 reply; 5+ messages in thread
From: Karel Zak @ 2015-03-27 14:14 UTC (permalink / raw)
To: Ruediger Meier; +Cc: util-linux
On Thu, Mar 26, 2015 at 02:50:33PM +0100, Ruediger Meier wrote:
> Our logger tests fail if it can't connect to /dev/log. I'd like to fix
> that case for the test-suite but have some questions:
>
> 1. It was confusing for me to figure out the actual
> problem. Maybe --no-act and/or --stderr should imply
> that --socket-errors=auto turns error printing on?
Hmm.. probably good idea.
> 2. Alternatively we could use --socket-errors=on for all tests.
>
> 3. Couldn't we fix --no-act to not need an open /dev/log at all?
But then it will introduce another fragility, complexity and
difference between test (--no-act) and non-test mode. I see for
example "if(ctl->fd < 0)" in code. Now it really skips write() only.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: question about logger tests
2015-03-27 14:14 ` Karel Zak
@ 2015-04-02 23:10 ` Ruediger Meier
2015-04-07 10:09 ` Karel Zak
0 siblings, 1 reply; 5+ messages in thread
From: Ruediger Meier @ 2015-04-02 23:10 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
On Friday 27 March 2015, Karel Zak wrote:
> On Thu, Mar 26, 2015 at 02:50:33PM +0100, Ruediger Meier wrote:
> > Our logger tests fail if it can't connect to /dev/log. I'd like to
> > fix that case for the test-suite but have some questions:
> >
> > 1. It was confusing for me to figure out the actual
> > problem. Maybe --no-act and/or --stderr should imply
> > that --socket-errors=auto turns error printing on?
>
> Hmm.. probably good idea.
I'll send a patch.
> > 2. Alternatively we could use --socket-errors=on for all tests.
> >
> > 3. Couldn't we fix --no-act to not need an open /dev/log at all?
>
> But then it will introduce another fragility, complexity and
> difference between test (--no-act) and non-test mode. I see for
> example "if(ctl->fd < 0)" in code. Now it really skips write() only.
You are right. If there would be a real-life use case for --no-act then
not connecting /dev/log could be an optimization but I guess there is
no such use case except our tests.
So how could we skip logger tests safely if /dev/log does not work?
cu,
Rudi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: question about logger tests
2015-04-02 23:10 ` Ruediger Meier
@ 2015-04-07 10:09 ` Karel Zak
2015-04-09 18:22 ` Ruediger Meier
0 siblings, 1 reply; 5+ messages in thread
From: Karel Zak @ 2015-04-07 10:09 UTC (permalink / raw)
To: Ruediger Meier; +Cc: util-linux
On Fri, Apr 03, 2015 at 12:10:57AM +0100, Ruediger Meier wrote:
> So how could we skip logger tests safely if /dev/log does not work?
Would be enough to test by
socat - UNIX-CONNECT:/dev/log
connect to the socket?
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: question about logger tests
2015-04-07 10:09 ` Karel Zak
@ 2015-04-09 18:22 ` Ruediger Meier
0 siblings, 0 replies; 5+ messages in thread
From: Ruediger Meier @ 2015-04-09 18:22 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
On Tuesday 07 April 2015, Karel Zak wrote:
> On Fri, Apr 03, 2015 at 12:10:57AM +0100, Ruediger Meier wrote:
> > So how could we skip logger tests safely if /dev/log does not work?
>
> Would be enough to test by
>
> socat - UNIX-CONNECT:/dev/log
>
> connect to the socket?
Well, using socat we can also use another socat listening socket instead
of /dev/log at all. BTW we wouldn't even need --stderr and --no-act to
check the written data.
I have done this in my github clone, branch "tests-logger"
https://github.com/rudimeier/util-linux/commits/tests-logger
(Not ready for merge yet.)
cu,
Rudi
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-04-09 18:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-26 13:50 question about logger tests Ruediger Meier
2015-03-27 14:14 ` Karel Zak
2015-04-02 23:10 ` Ruediger Meier
2015-04-07 10:09 ` Karel Zak
2015-04-09 18:22 ` Ruediger Meier
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.