5 Commits

Author SHA1 Message Date
Iustin Pop
ba46d54458 Add a few more test for error paths
Since there's no virtual tape device, we can only test error paths,
sadly.
2025-01-07 21:53:22 +01:00
Kai Mäkisara
42dd44bb90 stinit: Change stinit to return one if setting one or more options fails
Previously, stinit returned zero even if it fails to set the options.
This patch changes the return value to one if one or more of the options
can't be set for a device if the tape numbers are given on command line.
If no numbers are given, stinit returns zero (as before this patch).
After this change, scripts (udev rules) can more easily detect when
stinit fails.

Signed-off-by: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
2025-01-05 16:26:21 +01:00
Iustin Pop
b6d221c17a Add a few more stinit parsing tests 2023-04-18 22:14:18 +02:00
Iustin Pop
fbfd923faa Expand command line and error handling 2021-06-06 02:34:24 +02:00
Iustin Pop
886ce1f261 Switch 'make check' to be done via shelltestrunner
The embedding of tests in the Makefile works only for that is there
today - a few `--version` and `stinit -p` calls. For expanding the
test coverage, as much as it can be done for `mt`, let's use a proper
shell test runner. `shelltestrunner` is available in Debian/Ubuntu, so
it's likely to be available in other distributions too, and as such
should not be a big barrier to contribution.
2021-06-06 01:46:03 +02:00