Commit Graph
107 Commits
Author SHA1 Message Date
Iustin Pop 52a6c218b9 Release bugfix version 1.6 😅 2023-04-19 23:33:02 +02:00
Iustin Pop 4a72962872 Finish the test migration to shelltest
The shelltest migration was done in 1.4, but not completed - the
distcheck was still doing hard-coded manual tests, and as such, the
"check" target from the dist archive was not working. Sigh.

Now 'distcheck' is using 'check', and the archive is complete.
2023-04-19 23:29:58 +02:00
Iustin Pop c49c863a2a Release version 1.5 v1.5 2023-04-19 22:59:23 +02:00
Iustin Pop b6d221c17a Add a few more stinit parsing tests 2023-04-18 22:14:18 +02:00
Iustin Pop e96400b602 Make sure that make clean removes coverage info
I spent 20 minutes trying to understand why lcov/gcov were complaining
about wrong coverage format/version, before I saw I had a 2 year old
file that was not overwritten nor removed…
2023-04-18 21:34:04 +02:00
Iustin Pop 3c537a17e2 Modernise the CI workflow
Switch to more recent versions of the checkout and codecov action, the
latter also removing saving the data locally, so remove the archival
of that data.
2023-04-18 20:47:08 +02:00
Iustin Pop bd3b8539d1 Fixup workflows after master->main rename 2023-04-18 20:43:05 +02:00
Iustin Pop 07e9cd2653 Fix build status badge and add a couple more 2023-04-18 20:41:52 +02:00
Iustin PopandGitHub 1dafc02c2e Merge pull request #25 from dabiged/Add_3590
Add IBM 3590 B/E format to tape densities table
2023-03-17 13:09:46 +01:00
Chris Dinneen d7e60146d2 Add: 3590 B using same syntax as T10000A 2023-02-07 12:17:14 +08:00
Chris Dinneen 4fdbc29fed Add IBM 3590 E format to tape list 2023-01-09 11:35:11 +08: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
Iustin Pop 1743522b8a Add a local coverage target
This needs lcov installed, but it's a good quick helper for local
runs. For history and pull requests, codecov keeps tracking.

Also tweak in the process gitignore to clean the noise.
2021-06-06 00:11:35 +02:00
Iustin Pop c33c6ad43e Update README badges
Switch from travis-ci to github workflows, and add codecov badge.
2021-06-06 00:03:35 +02:00
Iustin Pop 51b0d3da23 Remove travis config file 2021-06-05 23:51:41 +02:00
Iustin Pop 3241491f72 CI: Add coverage job and upload to codecov 2021-06-05 23:51:01 +02:00
Iustin Pop 5a88467b88 Create a make check target
This is the exact same mini-"tests" that are used in distcheck, but
separated so that the tests can be run with coverage tracking. Would
be good not to have duplicates - maybe use make check inside the
distcheck?
2021-06-05 23:41:47 +02:00
Iustin Pop 9759c9c469 Add github actions CI workflow 2021-06-05 23:33:42 +02:00
kishorkunal-rajandIustin Pop 5dbcde9d0d Adding ppc64le architecture support on travis-ci 2020-12-01 08:51:21 +01:00
Iustin PopandGitHub 7366f37f69 Test enable codeql analysis 2020-08-31 20:54:00 +02:00
Iustin Pop ae2907fdd6 Update changelog and bump version for 1.4 release v1.4 2020-08-30 11:43:29 +02:00
Paweł MarciniakandIustin Pop 1aaca9a944 Use of sysfs instead of udevadm 2020-07-19 18:00:04 +02:00
Paweł MarciniakandIustin Pop 639ece4580 Rename mt-st to mt-st.bash_completion 2020-07-19 18:00:04 +02:00
Paweł MarciniakandIustin Pop a109c716d8 Add BASH auto completion 2020-07-19 18:00:04 +02:00
Dan HorákandIustin Pop e0e9792238 use a variable for the install tool 2020-06-30 22:32:18 +02:00
Dan HorákandIustin Pop 72575e6bf0 don't strip binaries on installation 2020-06-30 22:32:18 +02:00
Iustin Pop 845f5e48d2 Add density code for LTO-7 formatted as M8
Still not able to find LTO-9/LTO-10 density codes, but at least this
one should be correct from internet resources.
2019-12-13 16:14:59 +01:00
Iustin Pop 66f36f2ba8 Add test for valid mode parsing result
While fixing #14, what pointed me to check parsing validity (and not
local issues as I thought at first) was that `-v -v` was showing empty
mode definitions, despite claiming parse success. So let's add a test
that mode parsing does do things, not just empty claims.
2019-10-13 20:22:46 +02:00
Iustin Pop d5720ee85e Fix stinit file parsing broken in 874d58d9
For some reason I missed this during the pull request (even if
trivial), thanks travis-ci for letting me know (indirectly :).

Fixes #14.
2019-10-13 20:14:39 +02:00
Iustin Pop c73d6ee0e5 Travis: switch build to bionic
The GCC in xenial is old (5.x), and something seems to trip it
compared to the clang build, when checking the default options, see
https://travis-ci.org/iustin/mt-st/jobs/597087158.

Switch to bionic which has GCC 7, which is recent enough.
2019-10-13 19:26:30 +02:00
Iustin Pop 1345189baf Remove left-shifting of negative values
Left-shifting of negative values is undefined behaviour according to
the C standard, because it depends on the exact representation. This
code, copied from the Linux kernel, is intended for 2's complement and
can be replaced by well-defined behaviour: ~(-1<<N) is equivalent
to (1<<N)-1.

Signed-off-by: Iustin Pop <iustin@k1024.org>
2019-02-23 23:16:33 +01:00
Iustin Pop a15c02e572 More formatting fixes
Just another run of clang-format.
2019-02-16 14:13:02 +01:00
Gris GeandIustin Pop 874d58d952 Fix coverity scan warnings.
* Fix the leaking `fd`.
 * Fix the possible overflow of strcat().

Signed-off-by: Gris Ge <fge@redhat.com>
2019-02-16 14:08:35 +01:00
hrchuandIustin Pop 0d1245dce0 Add lto-8 density code 2019-02-16 14:02:41 +01:00
Iustin Pop 0442de1f7c stinit: mark usage() as non-returning
So that we don't have to fake it's non-returnness.
2016-05-06 22:18:30 +02:00
Iustin Pop 013135f604 stinit: check that tape index values are fully correct
Right now stinit ignores leftover chars in strings such as '9a'; let's
make sure we don't miss these (at least the warning message might give
a hint)..
2016-05-06 22:13:02 +02:00
Iustin Pop a172976fd2 Remove obsolete calls to uname in do_show_options()
Commit b48a427 removed the actual kernel version checks, but forgot
the calls to populate the values themselves. Remove them as we don't
do anything with those values.
2016-05-06 22:05:57 +02:00
Iustin Pop 2299178287 mt: make usage() show default tape device
This is not unified with version(), and the quotes have been removed
(looks more standard).
2016-05-06 21:58:46 +02:00
Iustin Pop 8c47d73803 mt: move exit-after-usage() into usage()
This simplifies a bit the calls to usage().
2016-05-06 21:58:18 +02:00
Iustin Pop 14a9ca5df4 LARGE CHURN: reindent source code
The source code seems to have, over time, become less self-consistent
in style. In order to not have to keep this up manually, switch over
indenting to clang-format. A .clang-format file is provided to give
repeatable results.

The main difference is switching from tabs to non-tabs
usage. Otherwise the changes are mostly minor and leading to more
consistency. Contributions to the format style welcome!

Nota bene: this should have had no code impact. Any actual code
changes (beyond indenting) are bugs in the re-indent process.
2016-05-06 21:54:34 +02:00
Iustin Pop a8252c4f91 Re-align structure initialization lists in mt.c
There are three "tables" with structure initialization lists in mt.c,
which look like they were intended to be nicely-aligned, but over time
they got out of alignment.

Redo the alignment by unwrapping the lines and using Emacs'
align-regex, even though this leads to an exception of ~130 line
length for the 'cmds' table, since it leads to a very readable table
(on large terminals). Also protect these regions from clang-format, in
preparation for full file re-indents.
2016-05-06 21:39:48 +02:00
Iustin Pop faf3e9b3b7 Small naming change MULTIPLE_ARGS→MANY_ARGS
Will help with indenting the cmds[] array.
2016-05-06 18:19:18 +02:00
Iustin Pop ff81deb7a9 Correct stinit man page regarding database list
I can't find any mention of looking up stinit.def in the current
directory first, at least not since version 0.7. Correct the man page
to mention only `/etc/stinit.def'.
2016-05-04 01:51:12 +02:00
Iustin Pop 0e217e1ae7 Fix small typo in man page
Thanks lintian!
2016-05-03 14:10:56 +02:00
Iustin Pop a9947a9982 Add build status badge to README
Fancy stuff ☺
2016-05-02 22:39:18 +02:00
Iustin Pop 04a929ee3b Bump version to 1.3 and update changelog mt-st-1.3 2016-05-02 01:39:05 +02:00
Iustin Pop 5842bbac64 Check the supplied stinit.def file in distcheck 2016-05-02 01:27:12 +02:00
Iustin Pop 95c0789085 Small cleanup: use passed buflen in stinit:next_block
Instead of assuming all passed buffers are DEFMAX, use the given
buflen. Also change some types (int→size_t) since these are all
related to string sizes.
2016-05-02 01:09:36 +02:00
Iustin Pop 22df208f19 Fix config file parsing bug in stinit
There is a long-standing (it was already present in 0.7, so around 15
years) bug in stinit's find_pars function, related to parsing per-mode
configurations. Due to the way the temporary buffers are used, at one
point a strcat() is called on overlapping strings. This is documented
not to work, but it seems the behaviour is not deterministic: for some
pairs of strings it works, for some not (possibly related to distance
between strings, etc.). This results in the fact that parsing the
provided example file fails for _some_ entries, but not for all, with
a seemingly wrong error message (showing snippets of the input file
that do not exist).

Fix this issue in a trivial way by simply using a different (new)
buffer during the mode parsing.
2016-05-02 01:01:30 +02:00