{"id":4485,"date":"2022-12-20T18:08:47","date_gmt":"2022-12-20T21:08:47","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/sanetest-man5\/"},"modified":"2022-12-20T18:08:47","modified_gmt":"2022-12-20T21:08:47","slug":"sanetest-man5","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/sanetest-man5\/","title":{"rendered":"sane&minus;test (man5)"},"content":{"rendered":"<h1 align=\"center\">sane\u2212test<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#SCAN MODE OPTIONS\">SCAN MODE OPTIONS<\/a><br \/> <a href=\"#SPECIAL OPTIONS\">SPECIAL OPTIONS<\/a><br \/> <a href=\"#GEOMETRY OPTIONS\">GEOMETRY OPTIONS<\/a><br \/> <a href=\"#BOOL TEST OPTIONS\">BOOL TEST OPTIONS<\/a><br \/> <a href=\"#INT TEST OPTIONS\">INT TEST OPTIONS<\/a><br \/> <a href=\"#FIXED TEST OPTIONS\">FIXED TEST OPTIONS<\/a><br \/> <a href=\"#STRING TEST OPTIONS\">STRING TEST OPTIONS<\/a><br \/> <a href=\"#BUTTON TEST OPTION\">BUTTON TEST OPTION<\/a><br \/> <a href=\"#FILES\">FILES<\/a><br \/> <a href=\"#ENVIRONMENT\">ENVIRONMENT<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#AUTHOR\">AUTHOR<\/a><br \/> <a href=\"#BUGS\">BUGS<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">sane\u2212test \u2212 SANE backend for testing frontends<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>sane\u2212test<\/b> library implements a SANE (Scanner Access Now Easy) backend that allows testing the SANE installation and SANE frontends. It provides access to a (nearly) unlimited number of virtual devices. There is no support for real scanners or cameras. However, the backend simulates scanning and setting options.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The idea is not only to find bugs in frontends but also to show all capabilities of SANE. Therefore <b>sane\u2212test<\/b> implements functions and options that are not (or seldom) found in other backends.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The backend is commented out in <i>\/etc\/sane.d\/dll.conf<\/i>, so either the comment character must be removed or the backend must be called explicitly. E.g. <i>scanimage \u2212d test<\/i> or <i>xscanimage test<\/i>.<\/p>\n<h2>SCAN MODE OPTIONS <a name=\"SCAN MODE OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>mode<\/b> selects the scan mode (Gray or Color).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>depth<\/b> determines the number of bits per sample (1. 8, or 16). Keep in mind, that this value refers to the sample, not the pixel. So depth=16 results in 48 bits per pixel in color mode. The most usual combinations are mode=Gray, depth=1 for lineart, mode=Gray, depth=8 for gray and mode=Color, depth=8 for color mode. The combination of color and 1-bit mode is quite obscure (8 colors) but allowed in the SANE standard. However, the meaning of bits is not defined. Currently 1 = high intensity and 0 = low intensity is used.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Setting option <b>hand\u2212scanner<\/b> results in the test-backend behaving like a hand-scanner. Hand-scanners do not know the image height a priori. Instead, they return a height of \u22121. Setting this option allows one to test whether a frontend can handle this correctly. This option also enables a fixed width of 11 cm.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Setting option <b>three\u2212pass<\/b> simulates a three-pass scanner. Older color scanners needed to scan the image once per color (red\/green\/blue) to get the full image. Therefore, in this mode three single frames are transmitted in color mode.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>three\u2212pass\u2212order<\/b> provides support for changing the order of the three frames (see option three-pass above). A frontend should support all orders.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>resolution<\/b> sets the resolution of the image in dots per inch.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>source<\/b> can be used to simulate an Automatic Document Feeder (ADF). After 10 scans, the ADF will be &#8220;empty&#8221;.<\/p>\n<h2>SPECIAL OPTIONS <a name=\"SPECIAL OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>test\u2212picture<\/b> allows one to set the image that\u2019s returned to the frontend. While &#8220;Solid white&#8221; and &#8220;Solid black&#8221; are quite obvious, the other options need some more explanation. Color patterns are used to determine if all modes and their colors are represented correctly by the frontend. The grid should look like the same in every mode and resolution. A table of all the test pictures can be found at: <i>http:\/\/www.meier\u2212geinitz.de\/sane\/test\u2212backend\/test\u2212pictures.html<\/i>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If option <b>invert\u2212endianness<\/b> is set, the upper and lower bytes of image data in 16 bit modes are exchanged. This option can be used to test the 16 bit modes of frontends, e.g. if the frontend uses the correct endianness.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If option <b>read\u2212limit<\/b> is set, the maximum amount of data transferred with each call to <b>sane_read<\/b>() is limited.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>read\u2212limit\u2212size<\/b> sets the limit for option read-limit. A low limit slows down scanning. It can be used to detect errors in frontend that occur because of wrong assumptions on the size of the buffer or timing problems.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>read\u2212delay<\/b> enables delaying data to the frontend.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>read\u2212delay\u2212duration<\/b> selects the number of microseconds the backends waits after each transfer of a buffer. This option is useful to find timing-related bugs, especially if used over the network.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If option <b>read\u2212return\u2212value<\/b> is different from &#8220;Default&#8221;, the selected status will be returned by every call to <b>sane_read<\/b>(). This is useful to test the frontend\u2019s handling of the SANE statuses.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If option <b>ppl\u2212loss<\/b> is different from 0, it determines the number of pixels that are &#8220;lost&#8221; at the end of each line. That means, lines are padded with unused data.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>fuzzy\u2212parameters<\/b> selects that fuzzy (inexact) parameters are returned as long as the scan hasn\u2019t been started. This option can be used to test if the frontend uses the parameters it got before the start of the scan (which it shouldn\u2019t).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>non\u2212blocking<\/b> determines if non-blocking IO for <b>sane_read<\/b>() should be used if supported by the frontend.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If option <b>select\u2212fd<\/b> is set, the backend offers a select filedescriptor for detecting if <b>sane_read()<\/b> will return data.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If option <b>enable\u2212test\u2212options<\/b> is set, a fairly big list of options for testing the various SANE option types is enabled.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>print\u2212options<\/b> can be used to print a list of all options to standard error.<\/p>\n<h2>GEOMETRY OPTIONS <a name=\"GEOMETRY OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>tl\u2212x<\/b> determines the top-left x position of the scan area.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>tl\u2212y<\/b> determines the top-left y position of the scan area.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>br\u2212x<\/b> determines the bottom-right x position of the scan area.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>br\u2212y<\/b> determines the bottom-right y position of the scan area.<\/p>\n<h2>BOOL TEST OPTIONS <a name=\"BOOL TEST OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">There are 6 bool test options in total. Each option is numbered. (3\/6) means: this is option 3 of 6. The numbering scheme is intended for easier detection of options not displayed by the frontend (because of missing support or bugs).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>bool\u2212soft\u2212select\u2212soft\u2212detect<\/b> (1\/6) is a bool test option that has soft select and soft detect (and advanced) capabilities. That\u2019s just a normal bool option.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>bool\u2212hard\u2212select\u2212soft\u2212detect<\/b> (2\/6) is a bool test option that has hard select and soft detect (and advanced) capabilities. That means the option can\u2019t be set by the frontend but by the user (e.g. by pressing a button at the device).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>bool\u2212hard\u2212select<\/b> (3\/6) is a bool test option that has hard select (and advanced) capabilities. That means the option can\u2019t be set by the frontend but by the user (e.g. by pressing a button at the device) and can\u2019t be read by the frontend.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>bool\u2212soft\u2212detect<\/b> (4\/6) is a bool test option that has soft detect (and advanced) capabilities. That means the option is read-only.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>bool\u2212soft\u2212select\u2212soft\u2212detect\u2212emulated<\/b> (5\/6) is a Bool test option that has soft select, soft detect, and emulated (and advanced) capabilities.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>bool\u2212soft\u2212select\u2212soft\u2212detect\u2212auto<\/b> (6\/6) is a Bool test option that has soft select, soft detect, and automatic (and advanced) capabilities. This option can be automatically set by the backend.<\/p>\n<h2>INT TEST OPTIONS <a name=\"INT TEST OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">There are 6 int test options in total.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>int<\/b> (1\/6) is an int test option with no unit and no constraint set.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>int\u2212constraint\u2212range<\/b> (2\/6) is an int test option with unit pixel and constraint range set. Minimum is 4, maximum 192, and quant is 2.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>int\u2212constraint\u2212word\u2212list<\/b> (3\/6) is an int test option with unit bits and constraint word list set.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>int\u2212constraint\u2212array<\/b> (4\/6) is an int test option with unit mm and using an array without constraints.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>int\u2212constraint\u2212array\u2212constraint\u2212range<\/b> (5\/6) is an int test option with unit mm and using an array with a range constraint. Minimum is 4, maximum 192, and quant is 2.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>int\u2212constraint\u2212array\u2212constraint\u2212word\u2212list<\/b> (6\/6) is an int test option with unit percent and using an array a word list constraint.<\/p>\n<h2>FIXED TEST OPTIONS <a name=\"FIXED TEST OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">There are 3 fixed test options in total.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>fixed<\/b> (1\/3) is a fixed test option with no unit and no constraint set.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>fixed\u2212constraint\u2212range<\/b> (2\/3) is a fixed test option with unit microsecond and constraint range set. Minimum is \u221242.17, maximum 32767.9999, and quant is 2.0.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>fixed\u2212constraint\u2212word\u2212list<\/b> (3\/3) is a Fixed test option with no unit and constraint word list set.<\/p>\n<h2>STRING TEST OPTIONS <a name=\"STRING TEST OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">There are 3 string test options in total.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>string<\/b> (1\/3) is a string test option without constraint.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>string\u2212constraint\u2212string\u2212list<\/b> (2\/3) is a string test option with string list constraint.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>string\u2212constraint\u2212long\u2212string\u2212list<\/b> (3\/3) is a string test option with string list constraint. Contains some more entries&#8230;<\/p>\n<h2>BUTTON TEST OPTION <a name=\"BUTTON TEST OPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Option <b>button<\/b> (1\/1) is a Button test option. Prints some text&#8230;<\/p>\n<h2>FILES <a name=\"FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>\/etc\/sane.d\/test.conf<\/i><\/p>\n<p style=\"margin-left:22%;\">The backend configuration file (see also description of <b>SANE_CONFIG_DIR<\/b> below). The initial values of most of the basic SANE options can be configured in this file. A template containing all the default values is provided together with this backend. One of the more interesting values may be <b>number_of_devices<\/b>. It can be used to check the frontend\u2019s ability to show a long list of devices. The config values concerning resolution and geometry can be useful to test the handling of big file sizes.<\/p>\n<p style=\"margin-left:11%;\"><i>\/usr\/lib64\/sane\/libsane\u2212test.a<\/i><\/p>\n<p style=\"margin-left:22%;\">The static library implementing this backend.<\/p>\n<p style=\"margin-left:11%;\"><i>\/usr\/lib64\/sane\/libsane\u2212test.so<\/i><\/p>\n<p style=\"margin-left:22%;\">The shared library implementing this backend (present on systems that support dynamic loading).<\/p>\n<h2>ENVIRONMENT <a name=\"ENVIRONMENT\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>SANE_CONFIG_DIR<\/b><\/p>\n<p style=\"margin-left:22%;\">This environment variable specifies the list of directories that may contain the configuration file. On *NIX systems, the directories are separated by a colon (\u2018:\u2019), under OS\/2, they are separated by a semi-colon (\u2018;\u2019). If this variable is not set, the configuration file is searched in two default directories: first, the current working directory (&#8220;.&#8221;) and then in <i>\/etc\/sane.d<\/i>. If the value of the environment variable ends with the directory separator character, then the default directories are searched after the explicitly specified directories. For example, setting <b>SANE_CONFIG_DIR<\/b> to &#8220;\/tmp\/config:&#8221; would result in directories <i>tmp\/config<\/i>, <i>.<\/i>, and <i>\/etc\/sane.d<\/i> being searched (in this order).<\/p>\n<p style=\"margin-left:11%;\"><b>SANE_DEBUG_TEST<\/b><\/p>\n<p style=\"margin-left:22%;\">If the library was compiled with debug support enabled, this environment variable controls the debug level for this backend. Higher debug levels increase the verbosity of the output.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">Example: export SANE_DEBUG_TEST=4<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>sane<\/b>(7), <b>scanimage<\/b>(1), <b>xscanimage<\/b>(1) <i><br \/> http:\/\/www.meier\u2212geinitz.de\/sane\/test\u2212backend\/<\/i><\/p>\n<h2>AUTHOR <a name=\"AUTHOR\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Henning Meier-Geinitz <<i>henning@meier\u2212geinitz.de<\/i>><\/p>\n<h2>BUGS <a name=\"BUGS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">\u2212 config file values aren\u2019t tested for correctness<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  sane\u2212test \u2212 SANE backend for testing frontends <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[959],"tags":[961,1291,1458],"class_list":["post-4485","post","type-post","status-publish","format-standard","hentry","category-5-formatos-de-ficheros","tag-961","tag-man5","tag-sane-test"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4485","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=4485"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4485\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4485"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4485"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4485"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}