Age | Commit message (Collapse) | Author |
|
The whole idea of re-generating archives and matching them against
checksums has a big issue in that we cannot controll the underlying
compressors. If the underlying compressor changes its behavior
between versions, the checksums will be broken. For this exact reason,
the zstd and LZ4 checks that used to be present, have already been
removed. On Fedora, the script now breaks because of the zlib to
zstd-ng transition. If we fix the checksums to work on Fedora, it WILL
now break on other distributions. Ultimately, it is better to remove
the script alltogether.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
We fix filenames containing components like COM1 or PRN by appending
an underscore ('_'). A squashfs archive may contain files that already
have such a modifed name (e.g. COM1_) which would now potentially
clash.
This is fixed by matching any number of trailing '_' characters for
the bad name and adding another one. So all existing names that start
with an illegal prefix and have any number of underscores, will always
have an additional one appended.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
The idea is to iterate over a (canonicalized) path with forward
slashes by components, i.e. file and directory names. Each name
is then looked at by iterating over components, i.e. everything
between dots.
If a component is an illegal name, like COM1 or AUX, we add an
underscore. If it contains illegal characters, like : or \, we
re-map that character into unicode private use area.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Instead of abusing the directory tree of another test case, add a
proper dummy hierarchy. This also fixes issues with parallel tests,
where another test generates squashfs images in the target path.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
- Force all tests into their proper sub directory
- Temporarily remove the corpora tests. They have been used for
regression tests before releases and are disabled by default, so
we should not ship them either. A script should be added for that,
downloading what is needed.
- The "pack a directory" test is also removed. It was rather hacky
and there already is a test case for the fstree_from_dir function,
which isn't ideal either. Something should be added to the
regression test suite.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Instead of sleeping in the worker thread, busy-loop-wait on a ticket
counter to try and serialize the workers in backward order.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
The "from dir" and from "from file" code, as well as the "sort file"
code is specific to gensquashfs, so move them there and the test
cases as well.
The medium term idea is to reduce libfstree to a stub, merge it into
the generic writer and ultimately hoist that into libsquashfs.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Similar to the hex blob decoder, we need this once for tar and
once for the filemap xattr parser.
Simply add a single, central implementation to libutil, with a
simple unit test, and then use it in both libtar and gensquashfs.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Since we need it twice (once for tar, once for the filemap xattr
parser), add a single, central implementation to libutil, add a
unit test for that implementation and then use it in both libtar
and gensquashfs.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
- Make the script faster by unpacking everything at once instead
of file-by-file
- Also compare symlinks and directories
- More verbose output
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Some of the on-disk format internals are moved to a separate header
and some of the stuff from internal.h is moved to that format header.
C++ guards are added in addtion.
Everything PAX related is moved to pax_header.c, some internal
functions are marked as static.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Move all the libutil stuff from the toplevel include/ to a util/
sub directory and fix up the includes that make use of them.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
On GNU/Linux, *BSD or MacOS we can simply use the system default
library. The copy was primarily only there for the Windows build.
The build script for Windows has now been adapted to download and
compile a shared library from a tarball.
This removes a huge chunk of code from the git tree as well as
the release tarballs. Additionally it gets rid of iffy things like
removing the Zlib copyright/version strings, so the libsquashfs DLL
doesn't export it.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
The idea was originally to use struct stat in the libfstree code, so
we can simply hose data read from a directory into the fstree_t. The
struct was then also used with libtar, for simpler interoperation,
but it turned out to introduce a lot of platform quirks and causes
more trouble than it's worth.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Now that there is a wrapper for main() on Windows, all executable
programs must use a common, cannonical signature for main().
Furthermore, the Windows version of the epoch test needs wrappers
for setenv/unsetenv.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Always insert the tree nodes in the correct oder and remove the
post-process sorting step.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Now that there is a wrapper for main() on Windows, all executable
programs must use a common, cannonical signature for main().
Furthermore, the Windows version of the epoch test needs wrappers
for setenv/unsetenv.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
The intention of the (severely incomplete) ABI test case is to detect
changes to the ABI of libsquashfs. Currently it tries to blurt out if
the layout of some structure is changed unintentionally.
Unfortunately, the test uses some unportable assumptions. Among other
things, it was assumed that a 64 bit field will always require 64 bit
alignment. This is apparently no the case on 32 bit x86.
This patch makes the check work on 32 bit and 64 bit x86, by adding
an additional runtime check that relies on the __alignof__ extension
offered by gcc and clang (the only 2 compilers that are really
supported at the moment).
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Due to the change in directory size accounting, the checksums no
longer matched.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
In addition to the preprocessor define, use an Automake conditional
for optional compilation of the zstd stream tests.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
A modified version of the libfstream XZ stream uncompress test case
is added that deliberately chops the compressed data up into two
independend XZ streams to test the behaviour where the decompressor
has to read across stream boundaries, like those resulting from
parallel compression.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
The xattr_benchmark program requires libcommon.a, which isn't built if
the tools are not built.
Since the intention of the --without-tools switch is to build libsquashfs
only, this commit makes the xattr_benchmark build depend on BUILD_TOOLS.
Reported-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
This allows putting globbed files & directories into the filesystem
root, as well as explicitly setting attributes of the root directory
from the file lisiting.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
For the test, we pack the license ifle directory. The musl license
text got added, so the result changed.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
A cleaner separation between common code, frontend code and backend
code is made.
The "is this byte blob zero" function is moved out to libutil (with
test case and everything) with a more optimized implementation.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
The thread pool enforces ordering of items during dequeue similar
to the already existing implementation in libsqfs. The idea is to
eventually pull this functionality out of the block processor and
turn it into a cleaner, separately tested module.
The thread pool is implemented as an abstract interface, so we can
have multiple implementations around, including the serial fallback
implementation which we can then *always* test, irregardless of the
compile config and run through static analysis as well.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Add the missing compat.h header include so we have the correct
endian conversion macros.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
The test case basically adds a few key/value pairs and make sure they
are deduplicated correctly, including a case where they are added in
a different order and a case where the value is stored OOL.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|