1sane-test(5) SANE Scanner Access Now Easy sane-test(5)
2
3
4
6 sane-test - SANE backend for testing frontends
7
9 The sane-test library implements a SANE (Scanner Access Now Easy) back‐
10 end that allows testing the SANE installation and SANE frontends. It
11 provides access to a (nearly) unlimited number of virtual devices.
12 There is no support for real scanners or cameras. However, the backend
13 simulates scanning and setting options.
14
15 The idea is not only to find bugs in frontends but also to show all ca‐
16 pabilities of SANE. Therefore sane-test implements functions and op‐
17 tions that are not (or seldom) found in other backends.
18
19 The backend is commented out in /etc/sane.d/dll.conf, so either the
20 comment character must be removed or the backend must be called explic‐
21 itly. E.g. scanimage -d test or xscanimage test.
22
23
24
26 Option mode selects the scan mode (Gray or Color).
27
28 Option depth determines the number of bits per sample (1. 8, or 16).
29 Keep in mind, that this value refers to the sample, not the pixel. So
30 depth=16 results in 48 bits per pixel in color mode. The most usual
31 combinations are mode=Gray, depth=1 for lineart, mode=Gray, depth=8 for
32 gray and mode=Color, depth=8 for color mode. The combination of color
33 and 1-bit mode is quite obscure (8 colors) but allowed in the SANE
34 standard. However, the meaning of bits is not defined. Currently 1 =
35 high intensity and 0 = low intensity is used.
36
37 Setting option hand-scanner results in the test-backend behaving like a
38 hand-scanner. Hand-scanners do not know the image height a priori.
39 Instead, they return a height of -1. Setting this option allows one to
40 test whether a frontend can handle this correctly. This option also
41 enables a fixed width of 11 cm.
42
43 Setting option three-pass simulates a three-pass scanner. Older color
44 scanners needed to scan the image once per color (red/green/blue) to
45 get the full image. Therefore, in this mode three single frames are
46 transmitted in color mode.
47
48 Option three-pass-order provides support for changing the order of the
49 three frames (see option three-pass above). A frontend should support
50 all orders.
51
52 Option resolution sets the resolution of the image in dots per inch.
53
54 Option source can be used to simulate an Automatic Document Feeder
55 (ADF). After 10 scans, the ADF will be "empty".
56
58 Option test-picture allows one to set the image that's returned to the
59 frontend. While "Solid white" and "Solid black" are quite obvious, the
60 other options need some more explanation. Color patterns are used to
61 determine if all modes and their colors are represented correctly by
62 the frontend. The grid should look like the same in every mode and
63 resolution. A table of all the test pictures can be found at:
64 http://www.meier-geinitz.de/sane/test-backend/test-pictures.html.
65
66 If option invert-endianness is set, the upper and lower bytes of image
67 data in 16 bit modes are exchanged. This option can be used to test
68 the 16 bit modes of frontends, e.g. if the frontend uses the correct
69 endianness.
70
71 If option read-limit is set, the maximum amount of data transferred
72 with each call to sane_read() is limited.
73
74 Option read-limit-size sets the limit for option read-limit. A low
75 limit slows down scanning. It can be used to detect errors in frontend
76 that occur because of wrong assumptions on the size of the buffer or
77 timing problems.
78
79 Option read-delay enables delaying data to the frontend.
80
81 Option read-delay-duration selects the number of microseconds the back‐
82 ends waits after each transfer of a buffer. This option is useful to
83 find timing-related bugs, especially if used over the network.
84
85 If option read-return-value is different from "Default", the selected
86 status will be returned by every call to sane_read(). This is useful
87 to test the frontend's handling of the SANE statuses.
88
89 If option ppl-loss is different from 0, it determines the number of
90 pixels that are "lost" at the end of each line. That means, lines are
91 padded with unused data.
92
93 Option fuzzy-parameters selects that fuzzy (inexact) parameters are re‐
94 turned as long as the scan hasn't been started. This option can be
95 used to test if the frontend uses the parameters it got before the
96 start of the scan (which it shouldn't).
97
98 Option non-blocking determines if non-blocking IO for sane_read()
99 should be used if supported by the frontend.
100
101 If option select-fd is set, the backend offers a select filedescriptor
102 for detecting if sane_read() will return data.
103
104 If option enable-test-options is set, a fairly big list of options for
105 testing the various SANE option types is enabled.
106
107 Option print-options can be used to print a list of all options to
108 standard error.
109
111 Option tl-x determines the top-left x position of the scan area.
112
113 Option tl-y determines the top-left y position of the scan area.
114
115 Option br-x determines the bottom-right x position of the scan area.
116
117 Option br-y determines the bottom-right y position of the scan area.
118
120 There are 6 bool test options in total. Each option is numbered.
121 (3/6) means: this is option 3 of 6. The numbering scheme is intended
122 for easier detection of options not displayed by the frontend (because
123 of missing support or bugs).
124
125 Option bool-soft-select-soft-detect (1/6) is a bool test option that
126 has soft select and soft detect (and advanced) capabilities. That's
127 just a normal bool option.
128
129 Option bool-hard-select-soft-detect (2/6) is a bool test option that
130 has hard select and soft detect (and advanced) capabilities. That
131 means the option can't be set by the frontend but by the user (e.g. by
132 pressing a button at the device).
133
134 Option bool-hard-select (3/6) is a bool test option that has hard se‐
135 lect (and advanced) capabilities. That means the option can't be set
136 by the frontend but by the user (e.g. by pressing a button at the de‐
137 vice) and can't be read by the frontend.
138
139 Option bool-soft-detect (4/6) is a bool test option that has soft de‐
140 tect (and advanced) capabilities. That means the option is read-only.
141
142 Option bool-soft-select-soft-detect-emulated (5/6) is a Bool test op‐
143 tion that has soft select, soft detect, and emulated (and advanced) ca‐
144 pabilities.
145
146 Option bool-soft-select-soft-detect-auto (6/6) is a Bool test option
147 that has soft select, soft detect, and automatic (and advanced) capa‐
148 bilities. This option can be automatically set by the backend.
149
151 There are 6 int test options in total.
152
153 Option int (1/6) is an int test option with no unit and no constraint
154 set.
155
156 Option int-constraint-range (2/6) is an int test option with unit pixel
157 and constraint range set. Minimum is 4, maximum 192, and quant is 2.
158
159 Option int-constraint-word-list (3/6) is an int test option with unit
160 bits and constraint word list set.
161
162 Option int-constraint-array (4/6) is an int test option with unit mm
163 and using an array without constraints.
164
165 Option int-constraint-array-constraint-range (5/6) is an int test op‐
166 tion with unit mm and using an array with a range constraint. Minimum
167 is 4, maximum 192, and quant is 2.
168
169 Option int-constraint-array-constraint-word-list (6/6) is an int test
170 option with unit percent and using an array a word list constraint.
171
172
174 There are 3 fixed test options in total.
175
176 Option fixed (1/3) is a fixed test option with no unit and no con‐
177 straint set.
178
179 Option fixed-constraint-range (2/3) is a fixed test option with unit
180 microsecond and constraint range set. Minimum is -42.17, maximum
181 32767.9999, and quant is 2.0.
182
183 Option fixed-constraint-word-list (3/3) is a Fixed test option with no
184 unit and constraint word list set.
185
187 There are 3 string test options in total.
188
189 Option string (1/3) is a string test option without constraint.
190
191 Option string-constraint-string-list (2/3) is a string test option with
192 string list constraint.
193
194 Option string-constraint-long-string-list (3/3) is a string test option
195 with string list constraint. Contains some more entries...
196
198 Option button (1/1) is a Button test option. Prints some text...
199
201 /etc/sane.d/test.conf
202 The backend configuration file (see also description of
203 SANE_CONFIG_DIR below). The initial values of most of the basic
204 SANE options can be configured in this file. A template contain‐
205 ing all the default values is provided together with this back‐
206 end. One of the more interesting values may be number_of_de‐
207 vices. It can be used to check the frontend's ability to show a
208 long list of devices. The config values concerning resolution
209 and geometry can be useful to test the handling of big file
210 sizes.
211
212
213 /usr/lib64/sane/libsane-test.a
214 The static library implementing this backend.
215
216 /usr/lib64/sane/libsane-test.so
217 The shared library implementing this backend (present on systems
218 that support dynamic loading).
219
220
222 SANE_CONFIG_DIR
223 This environment variable specifies the list of directories that
224 may contain the configuration file. On *NIX systems, the direc‐
225 tories are separated by a colon (`:'), under OS/2, they are sep‐
226 arated by a semi-colon (`;'). If this variable is not set, the
227 configuration file is searched in two default directories:
228 first, the current working directory (".") and then in
229 /etc/sane.d. If the value of the environment variable ends with
230 the directory separator character, then the default directories
231 are searched after the explicitly specified directories. For
232 example, setting SANE_CONFIG_DIR to "/tmp/config:" would result
233 in directories tmp/config, ., and /etc/sane.d being searched (in
234 this order).
235
236 SANE_DEBUG_TEST
237 If the library was compiled with debug support enabled, this en‐
238 vironment variable controls the debug level for this backend.
239 Higher debug levels increase the verbosity of the output.
240
241 Example: export SANE_DEBUG_TEST=4
242
243
245 sane(7), scanimage(1), xscanimage(1)
246 http://www.meier-geinitz.de/sane/test-backend/
247
248
249
251 Henning Meier-Geinitz <henning@meier-geinitz.de>
252
253
255 - config file values aren't tested for correctness
256
257
258
259 14 Jul 2008 sane-test(5)