| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
The set_put function returns 0 if the element is already in the set and
not EEXIST, like e.g. hashmap does.
|
|
|
| |
A NetDev is needed to create the bridge in order to match the example's description "This creates a bridge..."
|
|
|
|
|
|
| |
Without the section header the assignments were effectively ignored.
Follow-up to 9fff8e1fdd222f8f05b9ecf170814a9059acfc78.
|
|\
| |
| | |
bootspec: do not build too many json object at once
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
This adds a testcase for the issue oss-fuzz#50949
(https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50949).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a workaround for an issue in the memory sanitizer.
If a function is called with too many arguments, then the sanitizer
triggers the following false-positive warning:
==349==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x7f8b247134a7 in json_buildv /work/build/../../src/systemd/src/shared/json.c:3213:17
#1 0x7f8b24714231 in json_build /work/build/../../src/systemd/src/shared/json.c:4117:13
#2 0x7f8b24487fa5 in show_boot_entries /work/build/../../src/systemd/src/shared/bootspec.c:1424:29
#3 0x4a6a1b in LLVMFuzzerTestOneInput /work/build/../../src/systemd/src/fuzz/fuzz-bootspec.c:119:16
#4 0x4c6693 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:611:15
#5 0x4c5e7a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:514:3
#6 0x4c7ce4 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:826:7
#7 0x4c7f19 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:857:3
#8 0x4b757f in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:912:6
#9 0x4e0bd2 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
#10 0x7f8b23ead082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
#11 0x41f69d in _start (build-out/fuzz-bootspec+0x41f69d)
Follow-up for #24541.
Fixes #24551.
|
|/ |
|
|
|
|
| |
size
|
|
|
|
| |
This also verify that the extra string does not contain '/'.
|
| |
|
|\
| |
| | |
test: forward nspawn logs to journal
|
| |
| |
| |
| | |
if the binary is not available.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Dumping everything to console slows the test quite considerably on
slower machines, so let's forward nspawn logs to the journal to still
have them available in case something goes south.
This should, hopefully, help with TEST-13 timeouts in Ubuntu CI and
maybe with CPU soft lockups in CentOS CI.
|
|\ \
| |/
|/| |
A couple of tweaks for test-exec-deserialization
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This should make the test faster on fast machines and more reliable on
slower/under-load machines, where the 4 sec sleep wasn't sometimes enough.
Spotted on C8S machines under load:
```
test_added_after (__main__.ExecutionResumeTest) ... FAIL
test_added_before (__main__.ExecutionResumeTest) ... ok
test_interleaved (__main__.ExecutionResumeTest) ... ok
test_issue_6533 (__main__.ExecutionResumeTest) ... ok
test_no_change (__main__.ExecutionResumeTest) ... ok
test_removal (__main__.ExecutionResumeTest) ... ok
test_swapped (__main__.ExecutionResumeTest) ... ok
======================================================================
FAIL: test_added_after (__main__.ExecutionResumeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./test/test-exec-deserialization.py", line 101, in check_output
with open(self.output_file, 'r') as log:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpjnec1dj4'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./test/test-exec-deserialization.py", line 150, in test_added_after
self.check_output(expected_output)
File "./test/test-exec-deserialization.py", line 104, in check_output
self.fail()
AssertionError: None
----------------------------------------------------------------------
Ran 7 tests in 44.270s
```
|
|\ \
| | |
| | | |
bootspec: slightly stricter validation + process tries-left/tries-done counters in filenames
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This has been a long-time omission in the userspace parser of bootspec
files. Correct that.
Fixes: #16457
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It's really the file name, so name it like that. Just some renaming.
(This is preparation for later work, to extract tries-done/tries-left
info from filenames)
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Also, given we are looking for whitespace as separators, just pass NULL
as separators, extract_first_word() defaults to whitespace after all.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Inspired by #23913, let's complain if people use paths with ".."
in Type #1 bootspec entries.
Let's prefix all paths with "/" if it is missing.
Let's simplify all paths.
let's refuse paths/warn with "..".
Fixes: #23913
|
| |
| |
| |
| |
| | |
Required to fix Debian testing/unstable builds, as resolved is
now in its own package
|
| |
| |
| |
| |
| |
| |
| |
| | |
if the console fd is not open we shouldn#t try to move it out of the 0…2
range.
Fixes: #24535
Alternative-for: #24537
|
|\ \
| | |
| | | |
dissect-image: introduce dissect_loop_device() which takes LoopDevice object
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Preparation for the next commit. No functional change.
|
| | | |
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| |
| | |
In sd-device, `devpath` is a kind of syspath without '/sys' prefix, e.g.
/devices/pci0000:00/0000:00:1c.4/0000:3c:00.0/nvme/nvme0/nvme0n1,
and `devname` is a path to the device node, e.g. /dev/nvme0n1.
Let's use the consistent name for the helper function.
|
|/
|
|
| |
We want the parent dir here, let's fix that.
|
|\
| |
| | |
condition: unify operator parsing handling
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
So this is a bit of a bikeshedding thing. But I think we should do this
nonetheless, before this is released.
Playing around with the glob matches I realized that "=$" is really hard
to grep for, since in shell code it's an often seen construct. Also,
when reading code I often found myself thinking first that the "$"
belongs to the rvalue instead of the operator, in a variable expansion
scheme.
If we move the $ character to the left hand, I think we are on the safer
side, since usually lvalues are much more restricted in character sets
than rvalues (at least most programming languages do enforce limits on
the character set for identifiers).
It makes it much easier to grep for the new operator, and easier to read
too. Example:
before:
ConditionOSRelease=ID=$fedora-*
after:
ConditionOSRelease=ID$=fedora-*
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
comparison, and ==/<> version comparison
The only reason to do this is to ensure uniformity with the other
options, that work like this, i.e. ConditionOSRelease= or
ConditionSecurity=.
This is a compatibility break, but a minor one, given that string
comparison and version comparison is mostly the same for equality and
inequality.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This ensures that "=" and "!=" are now interpreted as literal string
compares, and "==" and "<>" are for version compares.
This is not a compat break, since the SMBIOS stuff has not been included
in any release yet.
Main reason to do this, is to be systematic with the other conditions
that check for text stuff.
|
| |
| |
| |
| |
| |
| | |
This is mostly to make things systematic, and brings no new
functionality, as not specifying any operator is identical to prefixing
with =$ anyway.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
These two operators always indicate ordering comparisons, as opposed to
"=" and "!=" which depending on context mean literal string compares.
This is useful for ConditionOSRelease= for example, as this means
there's now always a way to do version compares.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Let's change the lookup table to contain pairs of operator/strings,
instead of being indexed by operator.
The table isn't dense anymore, and this allows us to add alias strings
sooner or later.
|
| |
| |
| |
| |
| | |
We support this for smbios matches, hence do so for /etc/os-release
matches too.
|
| |
| |
| |
| |
| |
| |
| | |
comparison via simple string compares
This allows us to switch condition_test_osrelease() to use generic
version_or_fnmatch_compare() for executing the comparison.
|