| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
I think this is easier to grok too.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the interpeter is missing, we get an exit code of 127. Let's treat those
tests as skipped too. If we could run the test far enough so that it could do
the check itself, it would return 77 anyway.
$ test/asdf; echo $?
exec: Failed to execute process 'test/asdf': The file specified the interpreter '/bin/asdf', which is not an executable command.
127
$ test/asdf; echo $?
/usr/bin/env: ‘/bin/asdf’: No such file or directory
127
This should resolve the problem that TEST-02 fails or Debian's 'unit-tests' fail
when python3 is not installed. Installing python3 via the mechanism that is
used to construct TEST images, i.e. the dracut dependency chasing scheme, would
be a lot of work for python with its modules in multiple locations and hundreds
of little files. So I think it OK to just skip the test there, and also in
other cases where python is not available.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As part of the build, we would populate build/test/sys/ using
sys-script.py, and then udev-test.p[ly] would create a tmpfs instance
on build/test/tmpfs and copy the sys tree to build/test/tmpfs/sys.
Also, we had udev-test.p[ly] which called test-udev. test-udev was
marked as a manual test and installed, but neither udev-test.p[ly] or
sys-script.py were.
test-udev is renamed to udev-rule-runner, which reduces confusion and
frees up the test-udev name. udev-test.py is renamed to test-udev.py.
All three files are now installed.
test-udev.py is modified to internally call sys-script.py to set up the
sys tree. Copying and creating it from scratch should take the same
amount of time. We avoid having a magic directory, everything is now
done underneath a temporary directory.
test-udev.py is now a normal installed test, and run-unit-tests.py will
pick it up. When test-udev.py is invoked from meson, the path to
udev-rule-runner is passed via envvar; when it is invoked via
run-unit-tests.py or directly, it looks for udev-rule-runner in a relative
path.
The goal of this whole change is to let Debian drop the 'udev' test.
It called sys-script.py and udev-test.pl from the source directory and
had to recreate a bunch of the logic. Now test-udev.py will now be called
via 'upstream'.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I tried to keep this a 1:1 rewrite with the same field names.
Nevertheless, some changes were made:
- exp_add_error and exp_rem_error are dropped. Those fields meant that
"./test-udev add <devpath>" actually succeeded, but symlinks were not
created, and exp_links was ignored and could contain bogus content.
Instead, exp_links and not_exp_links are adjusted to not contain
garbage and the tests check that "./test-udev add" succeeds and that
the links are as expected from exp_links and not_exp_links.
- cleanup was only used in one rule, and that rule was expected to fail,
so cleanup wasn't actually necessary. So the cleanup field and the
logic to call cleanup from individual tests is removed.
- a bunch of fields were set, but didn't seem to be connected to any
implementation: not_exp_name, not_exp_test.
e62acc3159935781f05fa59c48e5a74e85c61ce2 did a rewrite of some of the
tests and it seems that not_exp_test was added by mistake and
not_exp_name was left behind by mistake.
In Python, the field list is declared in the class, so it's harder to
assign an unused attribute. Those uses were converted to not_exp_links.
- in most rules, r"""…""" is used, so that escaping is not necessary.
- the logic to generate devices was only used in one place, and the
generator function also had provisions to handle arguments that were
never given. all_block_devs() is made much simpler.
- Descriptions that started with a capital letter were shortened
and lowercased.
- no special test case counting is done. pytest just counts the cases
(Rules objects).
- the output for failures is also removed. If something goes wrong, the
user can use pytest --pdb or such to debug the issue.
- perl version used a semaphore to manage udev runners, and would fork,
optionally wait a bit, and then start the runner. In the python
version, we just spawn them all and wait for them to exit. It's not
very convenient to call fork() from python, so instead the runner
was modified (in previous commit) to wait.
The test can be called as:
(cd build && sudo pytest -v ../test/udev-test.py)
sudo meson test -C build udev-test.py -v
I think this generally provides functionality that is close to the perl
version. It seems some of the checks are now more fully implemented.
Support for strace/gdb/valgrind is missing.
Runtime goes down: 8.36 s → 5.78 s.
|
|
|
|
| |
Which got resolved by e652663a04.
|
|
|
|
| |
Resolves: #27523
|
|
|
|
|
|
|
| |
Since we do `FD_TO_PTR(fd)` that expands to `INT_TO_PTR(fd) + 1` which
triggers an integer overflow.
Resolves: #27522
|
|
|
|
|
|
|
| |
Most notably:
- use `systemd-id128 new` instead of `journalctl --new-id128`
- move all temporary files to /tmp
- wrap repetitive checks in a function
|
|
|
|
| |
To make the rest of the test significantly faster.
|
| |
|
|
|
|
|
|
| |
And make adding them slightly easier.
Provides coverage for b5335da7a5.
|
|\
| |
| | |
test: add a simple fuzzer for manager serialization
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
If the test environment is too slow, then sleeping 2 seconds may not be
sufficient.
|
|/
|
|
| |
Closes #27473.
|
|
|
|
|
|
|
|
|
|
| |
Last month I monkey-patched journald to produce a small (64K) but valid
journal and used that as an input to four AFL fuzzers. After a month it
generated quite a nice corpora (4738 test cases) and after filtering
and minimizing it I was left with 619 unique journals with various
levels of corruption that probe the journal code.
It seems to detect past issues like systemd#26567, etc.
|
| |
|
|
|
|
|
|
|
| |
So when collecting coverage the test-.service dropin works as
expected.
Follow-up to 969f5f3cea.
|
|
|
|
|
|
|
|
|
|
| |
As the systemd-pstore process is quite short lived, it might sometimes
lack the necessary metadata to make matching against a unit or a syslog
tag work. Since we already use a cursor file to make the matching window
small as possible, let's just drop the unit match completely and hope
for the best.
Resolves: #27453
|
| |
|
| |
|
|\
| |
| | |
test: add a couple of tests for systemd-pstore
|
| | |
|
| |
| |
| |
| |
| | |
When anchoring the pattern using '$' regular expression operator it forces '=~'
operator to match the entire string.
|
|\ \
| | |
| | | |
tmpfiles: add conditionalized execute permission (X) support
|
| | | |
|
|/ / |
|
|\ \
| | |
| | | |
locale: improve vc -> x11 keyboard conversion
|
| | |
| | |
| | |
| | |
| | |
| | | |
When doing a conversion and the specified 'xc->xvariant' has no match, select
the x11 layout entry with a matching layout and an empty xvariant if such entry
exists. It's still better than no conversion at all.
|
|\ \ \
| | | |
| | | | |
CoredumpFilter: fix stack overflow and invalid assignment with 'all'
|
| | |/
| |/| |
|
|\ \ \
| | | |
| | | | |
repart: Add Minimize= support for verity hash partitions
|
| | | |
| | | |
| | | |
| | | | |
Fixes #27414
|
|\ \ \ \
| |_|/ /
|/| | | |
udev-rule: fix negative match
|
| | | | |
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | | |
As described in systemd/systemd#27204 reexecuting the daemon while
running in a systemd-run "session" causes the session end prematurely.
Let's skip the Reexecute() method in dfuzzer and trigger it manually
until the issue is resolved.
|
|/ / |
|
| |
| |
| |
| |
| | |
In a few cases, also avoid a sleep in the last (failed) iteration of the loop.
It doesn't matter too much, but it's still ugly.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Brief is sweet.
|
| | |
|
|/ |
|
|\
| |
| | |
tree-wide: code spelling fixes
|
| |
| |
| |
| | |
As reported by Fossies.
|