summaryrefslogtreecommitdiffstats
path: root/test/udev-dmi-memory-id-test.sh (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-11-30contrib: include co-authors to the contributor list of NEWSYu Watanabe1-1/+6
Closes #30261.
2023-11-30core/executor: avoid double closing serialization fdMike Yuan1-20/+14
Before this commit, between fdopen() (in parse_argv()) and fdset_remove(), the serialization fd is owned by both arg_serialization FILE stream and fdset. Therefore, if something wrong happens between the two calls, or if --deserialize= is specified more than once, we end up closing the serialization fd twice. Normally this doesn't matter much, but I still think it's better to fix this. Let's call fdset_new_fill() after parsing serialization fd hence. We set the fd to CLOEXEC in parse_argv(), so it will be filtered when the fdset is created. While at it, also move fdset_new_fill() under the second log_open(), so that we always log to the log target specified in arguments.
2023-11-30sd-journal: fix typo in function nameYu Watanabe1-5/+5
2023-11-29core: Always call log_open() in systemd-executorDaan De Meyer1-5/+3
log_setup() will open the console in systemd-executor because it's not pid 1 and it's not connected to the journal. So if the log target is later changed to kmsg, we have to reopen the log. But since log_open() won't open the same log twice, let's just call it unconditionally since it will be a noop if we try to reopen the same log. This makes sure that systemd-executor will log to the log target passed via --log-target= after parsing arguments.
2023-11-29test: ignore gcov errors with RestrictFileSystems=Frantisek Sumsal1-2/+5
The errors are valid, since the file system is indeed not writable, but we don't care about the missing coverage data in this case. Follow-up to 4a43c2b3a1.
2023-11-29network: Add missing commaDaan De Meyer1-1/+1
2023-11-29Revert "mkosi ci: enable jammy-proposed"Luca Boccassi1-5/+0
libsolv has migrated to jammy-updates, so we can disable the proposed-updates repository again. This reverts commit 48bfc6791dca3b130befe419fc07f15f515b291c.
2023-11-29mkosi: Drop building custom kernel logicDaan De Meyer14-355/+0
Now that mkosi-kernel is a thing, this logic in systemd is just mostly bitrotting since I just use mkosi-kernel these days. If I ever need to hack on systemd and the kernel in tandem, I'll just add support for building systemd to mkosi-kernel instead, so let's drop the support for building a custom kernel in systemd's mkosi configuration.
2023-11-29mkosi: Install integritysetup on CentOS/FedoraDaan De Meyer1-0/+1
Required for running integration tests
2023-11-29rules: go to the end of rules indeed when dm is suspendedjanana2-2/+6
The previous patch 466266c does not make sense indeed, that is to say, if the SYSTEMD_READY is not recorded in the database, the GOTO="systemd_end" will not be applied. The IMPORT{db} is actually a matching token, it returns false when there is no SYSTEMD_READY recorded in the database. The previous patch 466266c tended to inherit the state of SYSTEMD_READY from the database and skip to the end of current rule file. But when the database does not contain SYSTEMD_READY, e.g., the dm-* is not set db_persistent during initrd and the database will be cleared after switching root, the following rules will still be applied not as expected.
2023-11-29stdio-bridge: properly handle org.freedesktop.DBus.Local.Disconnected signalLennart Poettering1-5/+10
Previously, we'd forward org.freedesktop.DBus.Local.Disconnected like any other message to the other side. But that's not OK, as messages in the org.freedesktop.DBus.Local.* namespace are supposed to never touch the wire, and are synthetic messages that the library uses to communicate with the app, but never with other apps. dbus-daemon never cared, but dbus-broker complains about this, hence clean this up. See: #28514
2023-11-29stub: get_extra_dir() can return NULLLennart Poettering2-3/+6
If we have a device path that is not the usual file system directory get_extra_dir() will return NULL. Handle that gracefully. Fixes: #30228
2023-11-28mkosi: pin CentOS8 kernel to working versionDaan De Meyer5-5/+19
Newer kernels are affected by a regression that causes a kernel panic on boot when using cgroupv2, so pin them for now. Can be reverted once that problem is fixed.
2023-11-28homed: properly handle operation exit statussesLennart Poettering1-1/+1
2023-11-28shared/cryptsetup-util: build problematic code only in developer modeZbigniew Jędrzejewski-Szmek2-4/+3
This code doesn't link when gcc+lld is used: $ LDFLAGS=-fuse-ld=lld meson setup build-lld && ninja -C build-lld udevadm ... ld.lld: error: src/shared/libsystemd-shared-255.a(libsystemd-shared-255.a.p/cryptsetup-util.c.o): symbol crypt_token_external_path@@ has undefined version collect2: error: ld returned 1 exit status As a work-around, restrict it to developer mode. Closes https://github.com/systemd/systemd/issues/30218.
2023-11-28man: typo, it's DHCP not DCHP in DHCPPrefixDelegation=Дамјан Георгиевски1-1/+1
2023-11-28Update to mkosi v19Daan De Meyer63-83/+205
- Use mkosi.images/ instead of mkosi.presets/ - Use the .chroot suffix to run scripts in the image - Use BuildSources= match for the kernel build - Move 10-systemd.conf to mkosi.conf and rely on mkosi.local.conf for local configuration
2023-11-28boot: suffix SecureBoot message with newlineLennart Poettering1-4/+3
Output is otherwise so weird, since this is the last log line seen for a while typically, and if it doesn#t put the cursor back in the first column it looks like something is incomplete and hanging. Hence do what we always do: finish log messages with a newline.
2023-11-28pam-util: fix pam_syslog_pam_error() format stringLennart Poettering1-1/+2
To cut off a string at some position we must set the "precision" not the field width in format strings. This led to some assert()s being hit where they really should not be.
2023-11-28gpt-auto-generator: enable TPM2 unlocking in gpt-auto-generatorLennart Poettering1-6/+9
If we detect a TPM, let's also unlock the disk with it, if it has an enrollment for that. Fixes: #30176
2023-11-28loginctl: show null fields for unset seat/tty fields of sessionsLennart Poettering1-13/+16
2023-11-28loginctl: set appropriate ersatz strings for all tablesLennart Poettering2-1/+12
2023-11-28logind: align columns of a tableLennart Poettering1-5/+5
2023-11-28utmp-wtmp: fix wrong suffix assignment on putting dead processYu Watanabe1-1/+1
Fixes a bug introduced by f1d553e9dfd56f95b7564dd20a0b56e6a0d6492c. Fixes #30213.
2023-11-28core/cgroup: fix compile errorYu Watanabe1-1/+2
With gcc-13, ``` CFLAGS="-O3 -fno-semantic-interposition" meson setup build ``` triggers the following error: ``` ../src/core/cgroup.c: In function ‘cgroup_context_dump’: ../src/core/cgroup.c:633:44: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 633 | "%sDeviceAllow: %s %s\n", | ^~ cc1: some warnings being treated as errors ``` Fixes #30223.
2023-11-28test: check journal files are not corrupted after soft-rebootYu Watanabe1-0/+7
2023-11-28unit: make journald stopped on soft-reboot before broadcasting SIGKILLYu Watanabe2-0/+10
Workaround for #30195.
2023-11-28man: also SIGKILL is sent on soft-rebootYu Watanabe1-2/+2
2023-11-28varlinkctl: add short commentYu Watanabe1-0/+1
2023-11-28capability-util: avoid false-positive use-of-uninitialized-value errorYu Watanabe1-1/+2
fuzzers randomly fail with the following: ``` ==172==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x7f41169cb39b in update_argv /work/build/../../src/systemd/src/basic/argv-util.c:96:13 #1 0x7f41169cb39b in rename_process /work/build/../../src/systemd/src/basic/argv-util.c:210:16 #2 0x7f4116b6824e in safe_fork_full /work/build/../../src/systemd/src/basic/process-util.c:1516:21 #3 0x7f4116bffa36 in safe_fork /work/build/../../src/systemd/src/basic/process-util.h:191:16 #4 0x7f4116bffa36 in parse_timestamp /work/build/../../src/systemd/src/basic/time-util.c:1047:13 #5 0x4a61e6 in LLVMFuzzerTestOneInput /work/build/../../src/systemd/src/fuzz/fuzz-time-util.c:16:16 #6 0x4c4a13 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:611:15 #7 0x4c41fa 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 #8 0x4c58c9 in fuzzer::Fuzzer::MutateAndTestOne() /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:757:19 #9 0x4c6595 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:895:5 #10 0x4b58ff in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:912:6 #11 0x4def52 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10 #12 0x7f4115ea3082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: e678fe54a5d2c2092f8e47eb0b33105e380f7340) #13 0x41f5ad in _start (build-out/fuzz-time-util+0x41f5ad) DEDUP_TOKEN: update_argv--rename_process--safe_fork_full Uninitialized value was created by an allocation of 'fv' in the stack frame of function 'have_effective_cap' #0 0x7f41169d3540 in have_effective_cap /work/build/../../src/systemd/src/basic/capability-util.c:21 ```
2023-11-27test: verify json format passed through varlinkYu Watanabe3-4/+11
This drops logs of failed unit tests in TEST-02-UNITTESTS from the journal, as the expected logs from test-varlink-idl makes the post script fail. Saving logs in journal is simply noisy, and we will output anyway after qemu or nspawn finished by check_result_{qemu,nspawn}_unittests().
2023-11-27test: show saved journal files after TEST-02-UNITTESTSYu Watanabe1-0/+2
2023-11-27test: drop remaining console outputYu Watanabe6-10/+1
Follow-up for fa6f37c04391d0103c95e24813ad345c2d5c4b67. Partially reverts d5ab23aa54229e9e89427e7d20883bd8c93fd976 and 3540ce8587cbd21ce9c2dbec72ea7fa3d1b38a5f.
2023-11-27test: add simple coverity test for 'resolvectl show-cache'Yu Watanabe1-0/+5
2023-11-27varlink: fix key name in reply of org.varlink.service.GetInterfaceDescriptionYu Watanabe1-1/+2
Fixes https://github.com/systemd/systemd/pull/30203#issuecomment-1826746111.
2023-11-27resolve: fix varink message verificationYu Watanabe1-2/+42
Fixes #30199.
2023-11-27test-time-util: suppress timestamp conversion failures for Africa/Khartoum ↵Zbigniew Jędrzejewski-Szmek1-4/+18
timezone Our timestamp conversion roundtrip test was failing. But I think that this is not our bug: $ TZ='Africa/Khartoum' date --date='@1509482094' Tue Oct 31 23:34:54 EAT 2017 $ TZ='Africa/Khartoum' date --date='Tue Oct 31 23:34:54 EAT 2017' +%s 1509485694 $ TZ='Africa/Khartoum' date --date='@1509485694' Tue Oct 31 23:34:54 CAT 2017 $ echo $[1509485694 - 1509482094] 3600 This is essentially the same as what happens in our test. After a round-trip, we end up one hour ahead. > For 1509482094632752, from the change log of tzdata: > > Release 2017c - 2017-10-20 14:49:34 -0700 > > Changes to future timestamps > Sudan will switch from +03 to +02 on 2017-11-01. Fixes https://github.com/systemd/systemd/issues/28472.
2023-11-26hwdb: ieee1394-unit-function: add Sony DVMC-DA1Adam Goldman1-0/+10
This commit adds a hwdb entry for the Sony DVMC-DA1. This media converter works with video capture software such as dvgrab, but it doesn't support the AV/C command set and doesn't match the general entry.
2023-11-25test: drop 'noearly' from crypttabFrantisek Sumsal1-1/+1
It's a Debian thing, we don't support it. [ 30.639971] testsuite-64.sh[475]: + systemctl restart cryptsetup.target [ 30.697667] systemd-cryptsetup[3389]: Encountered unknown /etc/crypttab option 'noearly', ignoring. [ 30.700529] systemd-cryptsetup[3390]: Encountered unknown /etc/crypttab option 'noearly', ignoring. [ 30.700594] systemd-cryptsetup[3391]: Encountered unknown /etc/crypttab option 'noearly', ignoring. [ 30.704638] systemd-cryptsetup[3392]: Encountered unknown /etc/crypttab option 'noearly', ignoring
2023-11-25test: drop invalid LogTarget= assignmentFrantisek Sumsal1-1/+0
It's been there since the test was introduced and I'm not really sure what was the original intention behind it, but it makes systemd sad: [ 4.909056] systemd[1]: /usr/lib/systemd/tests/testdata/units/testsuite-44.service:13: Unknown key name 'LogTarget' in section 'Service', ignoring.
2023-11-25systemctl: include unit ID in the property mapFrantisek Sumsal1-0/+1
Otherwise we get a not very nice message when trying to display a non-existent man page: ~# systemctl cat test.service [Unit] Description=Hello [Service] ExecStart=true ~# systemctl help test.service Documentation for (null) not known.
2023-11-25import: append % to X_IMPORT_PROGRESS=Frantisek Sumsal7-7/+7
Since we parse it on the other side via parse_percent() which requires that, otherwise we get an error: [ 8.133131] testsuite-13.sh[649]: + machinectl import-raw /tmp/container.raw container-raw [ 8.175035] machinectl[1143]: Enqueued transfer job 1. Press C-c to continue download in background. [ 8.182130] machinectl[1143]: Importing '/tmp/container.raw', saving as 'container-raw'. [ 8.182377] systemd-importd[1144]: Got invalid percent value '0', ignoring. [ 8.182451] machinectl[1143]: Imported 0%. [ 8.282669] systemd-importd[1144]: Got invalid percent value '40', ignoring. [ 8.282746] machinectl[1143]: Imported 40%. [ 8.366448] machinectl[1143]: Wrote 64.0M. [ 8.366519] machinectl[1143]: Operation completed successfully. [ 8.366617] machinectl[1143]: Exiting.
2023-11-25test: remove the reboot counter just before spawning container/VMFrantisek Sumsal1-3/+4
Doing that in test_run() is not enough, since it's called only once and spawns all QEMU/nspawn jobs.
2023-11-25units: disable start rate limit for systemd-vconsole-setup.serviceZbigniew Jędrzejewski-Szmek1-0/+6
The unit will be started or restarted a few times during boot, but but it has StartLimitBurst = DefaultStartLimitBurst = 5, which means that the fifth restart will already fail. On my laptop, I have exactly 4 restarts, so I don't hit the limit, but on a slightly different system we will easily hit the limit. In https://bugzilla.redhat.com/show_bug.cgi?id=2251394, there are five reloads and we hit the limit. Since 6ef512c0bb7aeb2000588d7d05e23b4681da8657 we propagate the start counter over switch-root and daemon reloads, so it's easier to hit the limit during boot. In principle there might be systems with lots of vtcon devices, so let's just allow the unit to be restarted without a limit. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2251394.
2023-11-25man/systemd-vconsole-setup: improve markupZbigniew Jędrzejewski-Szmek1-1/+1
2023-11-25nspawn-patch-uid: clarify that changing mode of symlink is unsupportedMike Yuan1-1/+1
2023-11-25Revert "nspawn-patch-uid: try fchmodat2() to restore mode of symlink"Mike Yuan1-10/+5
This reverts commit 30462563b19b92d8c6ed196d30d3cf7de90e8131. fchmodat2(), while accepting AT_SYMLINK_NOFOLLOW as a valid flag, always returns EOPNOTSUPP when operating on a symlink. The Linux kernel simply doesn't support changing the mode of a symlink. Fixes #30157
2023-11-25ukify: be more explicit about where to find ukifyPaymon MARANDI1-1/+2
when KERNEL_INSTALL_UKIFY is not supplied we set ukify to $PWD/ukify that will fail (perhaps only for manual installations): FileNotFoundError: [Errno 2] No such file or directory: '/usr/src/linux-6.7-rc1/ukify' this will make sure we have a sane default for UKIFY Signed-off-by: Paymon MARANDI <paymon@utubeipod.xyz>
2023-11-25udevadm: exiting udevadm monitor normally under SIGTERM or SIGINThuyubiao1-1/+1
Under SIGTERM or SIGINT, exit event and release resources, and exit udevadm monitor normally.
2023-11-25analyze: return earlier when there is no path to be prependedYu Watanabe1-3/+3
Follow-up for 2f6181ad4d6c126e3ebf6880ba30b3b0059c6fc8. Addresses the post-merge comment: https://github.com/systemd/systemd/pull/30172#discussion_r1404209035