mirror of
https://github.com/iustin/mt-st.git
synced 2026-01-24 12:12:02 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e8e6d543de | ||
|
|
34978b4019 | ||
|
|
8056c1542a | ||
|
|
c36a4a0fa5 | ||
|
|
f9c0570e34 | ||
|
|
aec3bd67f6 | ||
|
|
52a6c218b9 | ||
|
|
4a72962872 |
34
.github/workflows/ci.yml
vendored
34
.github/workflows/ci.yml
vendored
@@ -33,6 +33,9 @@ jobs:
|
||||
- name: Build the code
|
||||
run: make
|
||||
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get install -yy shelltestrunner
|
||||
|
||||
- name: Test creating the release archive
|
||||
run: make distcheck
|
||||
|
||||
@@ -62,3 +65,34 @@ jobs:
|
||||
#fail_ci_if_error: true
|
||||
verbose: true
|
||||
gcov: true
|
||||
|
||||
sanitizers:
|
||||
name: Test with clang sanitizers
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
compiler: ['clang']
|
||||
# These are the various sanitizers from https://github.com/google/sanitizers:
|
||||
cflags:
|
||||
- '-fsanitize=address -O1 -fno-omit-frame-pointer -g'
|
||||
- '-fsanitize=memory -fsanitize-memory-track-origins -fPIE -pie -fno-omit-frame-pointer -g -O2'
|
||||
- '-fsanitize=undefined'
|
||||
|
||||
fail-fast: false
|
||||
env:
|
||||
CC: ${{ matrix.compiler }}
|
||||
CFLAGS: ${{ matrix.cflags }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build the code
|
||||
run: make
|
||||
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get install -yy shelltestrunner
|
||||
|
||||
- name: Run tests
|
||||
run: make check
|
||||
|
||||
19
CHANGELOG.md
19
CHANGELOG.md
@@ -1,5 +1,24 @@
|
||||
# Changelog
|
||||
|
||||
## Changes in version 1.7 (Thu, 20 Apr 2023)
|
||||
|
||||
Fixes a single bug in stinit parsing of invalid definitions. This is a
|
||||
trivial bug, and only affects config files manually installed by root,
|
||||
so the impact should be minimal.
|
||||
|
||||
The bug also does not appear on amd64/x86, but (in Debian) was only
|
||||
triggered (as undefined behaviour) on mips64el, arm64 and s390x,
|
||||
likely due to different platform behaviour.
|
||||
|
||||
## Changes in version 1.6 (Wed, 19 Apr 2023)
|
||||
|
||||
This is bugfix release agains 1.5. In between 1.4 and 1.5, the "make
|
||||
check" target was migrated to using
|
||||
[shelltest](https://github.com/simonmichael/shelltestrunner), but the
|
||||
`make dist` and `distcheck` targets were no, so the built archive was
|
||||
actually not. This only fixes that and has no functional code changes
|
||||
from 1.5.
|
||||
|
||||
## Changes in version 1.5 (Wed, 19 Apr 2023)
|
||||
|
||||
Trivial release:
|
||||
|
||||
17
Makefile
17
Makefile
@@ -28,7 +28,10 @@ DISTFILES = \
|
||||
.dir-locals.el \
|
||||
.clang-format
|
||||
|
||||
VERSION=1.5
|
||||
TESTFILES = $(wildcard tests/*.test)
|
||||
TESTDATAFILES = $(wildcard tests/data/*.data)
|
||||
|
||||
VERSION=1.7
|
||||
RELEASEDIR=mt-st-$(VERSION)
|
||||
TARFILE=mt-st-$(VERSION).tar.gz
|
||||
|
||||
@@ -58,7 +61,10 @@ dist:
|
||||
trap "rm -rf $$BASE" EXIT && \
|
||||
DIST="$$BASE/$(RELEASEDIR)" && \
|
||||
mkdir "$$DIST" && \
|
||||
$(INSTALL) -m 0644 -p -t "$$DIST/" $(DISTFILES) && \
|
||||
mkdir "$$DIST/tests" && mkdir "$$DIST/tests/data" && \
|
||||
$(INSTALL) -m 0644 -p -t "$$DIST/" $(DISTFILES) && \
|
||||
$(INSTALL) -m 0644 -p -t "$$DIST/tests" $(TESTFILES) && \
|
||||
$(INSTALL) -m 0644 -p -t "$$DIST/tests/data" $(TESTDATAFILES) && \
|
||||
tar czvf $(TARFILE) -C "$$BASE" \
|
||||
--owner root --group root \
|
||||
$(RELEASEDIR)
|
||||
@@ -71,12 +77,7 @@ distcheck: dist
|
||||
tar xvf $(TARFILE) -C "$$SRC" && \
|
||||
cd "$$SRC/$(RELEASEDIR)" && \
|
||||
make CFLAGS="-Wall -Wextra -Werror" && \
|
||||
echo Checking version output && \
|
||||
./mt --version && ./stinit --version && \
|
||||
echo Checking parse status && \
|
||||
./stinit -p -f stinit.def.examples && \
|
||||
echo Checking complete stinit parsing && \
|
||||
( ./stinit -v -v -p -f stinit.def.examples 2>&1 | grep -q 'Mode 1 definition: scsi2logical=1 can-bsr=1 auto-lock=0 two-fms=0 drive-buffering=1 buffer-writes read-ahead=1 async-writes=1 can-partitions=0 fast-eom=1 blocksize=0 sili=1 timeout=900 long-timeout=14400 density=0x44 compression=0' ) && \
|
||||
make check && \
|
||||
make dist && \
|
||||
make install DESTDIR="$$DST" && \
|
||||
numfiles=$$( \
|
||||
|
||||
10
stinit.c
10
stinit.c
@@ -139,9 +139,13 @@ static char *find_string(char *s, char *target, char *buf, int buflen)
|
||||
cp++;
|
||||
for (cp2 = cp; *cp2 != '"' && *cp2 != '\0'; cp2++)
|
||||
;
|
||||
} else
|
||||
for (cp2 = cp + 1; isalnum(*cp2) || *cp2 == '-'; cp2++)
|
||||
;
|
||||
} else {
|
||||
if (*cp == '\0')
|
||||
return NULL;
|
||||
else
|
||||
for (cp2 = cp + 1; isalnum(*cp2) || *cp2 == '-'; cp2++)
|
||||
;
|
||||
}
|
||||
if (*cp2 == '\0')
|
||||
return NULL;
|
||||
have_arg = TRUE;
|
||||
|
||||
Reference in New Issue
Block a user