[sane-devel] a backend test

Henning Meier-Geinitz henning at meier-geinitz.de
Tue Mar 19 17:52:39 GMT 2002


Hi,

On Mon, Mar 18, 2002 at 09:37:22PM -0600, Frank Zago wrote:
> > Overflow somewhere?
> 
> Yes. Now it is a long long.

Is long long supported everywhere? Compiling with gcc 2.95.4 returns:
tstbackend.c:73: warning: ANSI C does not support long long'
tstbackend.c: In function display_stats':
tstbackend.c:81: warning: ANSI C does not support the ll' length modifier

> >
> > mustek -l1:
> > warnings: 0  error: 0  checks: 2893092
> >
> > It really does 3 million tests?
> 
> I guess so. There are not unique tests, but often they occur under
> slightly different conditions.
> The byte per byte scans are probably most of that count, though.

This was -l1 (without scans) :-)
Probably beacuse of recursion with reload options set.

> > mustek -l2:
> > (some hours later :-):
> > warnings: 0  error: 0  checks: -1416384447
> >
> > The test of pnm is still running...
> 
> ??? Weird. It is a software backend, so it should be lighning fast. I'll
> check that.

Today, the test is finished. It did more then 1.5 billion tests (!),
that's a lof even for my Athlon 1.4 processor :-)
I guess that's because of the many options that set
SANE_INFO_REOLAD_OPTIONS in pnm and because every reload of parameters
opens the test file /tmp/input.ppm.

With recursion level 1:
warnings: 0  error: 0  checks: 19129 (time: real	  0m0.311s)

recursion level 2:
warnings: 0  error: 0  checks: 518149 (time: real	  0m0.536s)

recursion level 3:
warnings: 0  error: 0  checks: 14100464 (time: real	  0m6.721s)

recursion level 4:
warnings: 0  error: 0  checks: 385300332 (time: real	  3m3.092s)

Maybe this can me made an option (or the default value set to 3)?

> > In the default:  part of the type check for options I wouldn't just
> > abort but print an error message indicating the number of the unknown
> > option and type.
> 
> Which test are you refering to?

test_options(), there in switch(opt->type) the default: path.

Bye,
  Henning



More information about the sane-devel mailing list