···167167# Takes the name of the unit as an argument and returns a bool whether the unit is active or not.
168168sub unit_is_active {
169169 my ($unit_name) = @_;
170170- my $units = busctl_call_systemd1_mgr("ListUnitsByNames", "as", 1, $unit_name)->{data}->[0];
170170+ my $units = busctl_call_systemd1_mgr("ListUnitsByNames", "as", 1, , "--", $unit_name)->{data}->[0];
171171 if (scalar(@{$units}) == 0) {
172172 return 0;
173173 }
+38-1
nixos/tests/switch-test.nix
···214214 systemd.services."escaped\\x2ddash".serviceConfig.X-Test = "test";
215215 };
216216217217+ unitStartingWithDash.configuration = {
218218+ systemd.services."-" = {
219219+ wantedBy = [ "multi-user.target" ];
220220+ serviceConfig = {
221221+ Type = "oneshot";
222222+ RemainAfterExit = true;
223223+ ExecStart = "${pkgs.coreutils}/bin/true";
224224+ };
225225+ };
226226+ };
227227+228228+ unitStartingWithDashModified.configuration = {
229229+ imports = [ unitStartingWithDash.configuration ];
230230+ systemd.services."-" = {
231231+ reloadIfChanged = true;
232232+ serviceConfig.ExecReload = "${pkgs.coreutils}/bin/true";
233233+ };
234234+ };
235235+217236 unitWithRequirement.configuration = {
218237 systemd.services.required-service = {
219238 wantedBy = [ "multi-user.target" ];
···637656 assert_contains(out, "\nstarting the following units: escaped\\x2ddash.service\n")
638657 assert_lacks(out, "the following new units were started:")
639658659659+ # Ensure units can start with a dash
660660+ out = switch_to_specialisation("${machine}", "unitStartingWithDash")
661661+ assert_contains(out, "stopping the following units: escaped\\x2ddash.service\n")
662662+ assert_lacks(out, "NOT restarting the following changed units:")
663663+ assert_lacks(out, "reloading the following units:")
664664+ assert_lacks(out, "\nrestarting the following units:")
665665+ assert_lacks(out, "\nstarting the following units:")
666666+ assert_contains(out, "the following new units were started: -.service\n")
667667+668668+ # The regression only occurs when reloading units
669669+ out = switch_to_specialisation("${machine}", "unitStartingWithDashModified")
670670+ assert_lacks(out, "stopping the following units:")
671671+ assert_lacks(out, "NOT restarting the following changed units:")
672672+ assert_contains(out, "reloading the following units: -.service")
673673+ assert_lacks(out, "\nrestarting the following units:")
674674+ assert_lacks(out, "\nstarting the following units:")
675675+ assert_lacks(out, "the following new units were started:")
676676+640677 # Ensure units that require changed units are properly reloaded
641678 out = switch_to_specialisation("${machine}", "unitWithRequirement")
642642- assert_contains(out, "stopping the following units: escaped\\x2ddash.service\n")
679679+ assert_contains(out, "stopping the following units: -.service\n")
643680 assert_lacks(out, "NOT restarting the following changed units:")
644681 assert_lacks(out, "reloading the following units:")
645682 assert_lacks(out, "\nrestarting the following units:")
···11---- a/CMakeLists.txt
22-+++ b/CMakeLists.txt
33-@@ -131,10 +131,21 @@ if (NOT LIBCXXABI_ENABLE_SHARED AND NOT LIBCXXABI_ENABLE_STATIC)
44- message(FATAL_ERROR "libc++abi must be built as either a shared or static library.")
55- endif()
66-77--# TODO: Remove this, which shouldn't be necessary since we know we're being built
88--# side-by-side with libc++.
99- set(LIBCXXABI_LIBCXX_INCLUDES "" CACHE PATH
1010- "Specify path to libc++ includes.")
1111-+if (NOT libcxx IN_LIST LLVM_ENABLE_RUNTIMES)
1212-+ if (NOT IS_DIRECTORY ${LIBCXXABI_LIBCXX_INCLUDES})
1313-+ message(FATAL_ERROR
1414-+ "LIBCXXABI_LIBCXX_INCLUDES=${LIBCXXABI_LIBCXX_INCLUDES} is not a valid directory. "
1515-+ "Please provide the path to where the libc++ headers have been installed.")
1616-+ endif()
1717-+ add_library(cxx-headers INTERFACE)
1818-+ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC" OR "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC")
1919-+ target_compile_options(cxx-headers INTERFACE /I "${LIBCXXABI_LIBCXX_INCLUDES}")
2020-+ else()
2121-+ target_compile_options(cxx-headers INTERFACE -I "${LIBCXXABI_LIBCXX_INCLUDES}")
2222-+ endif()
2323-+endif()
2424-2525- set(LIBCXXABI_HERMETIC_STATIC_LIBRARY_DEFAULT OFF)
2626- if (WIN32)
2727---- a/test/CMakeLists.txt
2828-+++ b/test/CMakeLists.txt
2929-@@ -61,9 +61,13 @@ if (LIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY)
3030- list(APPEND LIBCXXABI_TEST_DEPS cxx_external_threads)
3131- endif()
3232-3333--list(APPEND LIBCXXABI_TEST_DEPS cxx)
3434--if (LIBCXXABI_USE_LLVM_UNWINDER AND TARGET unwind)
3535-- list(APPEND LIBCXXABI_TEST_DEPS unwind)
3636-+if(libcxx IN_LIST LLVM_ENABLE_RUNTIMES)
3737-+ list(APPEND LIBCXXABI_TEST_DEPS cxx)
3838-+endif()
3939-+if(libunwind IN_LIST LLVM_ENABLE_RUNTIMES)
4040-+ if (LIBCXXABI_USE_LLVM_UNWINDER AND TARGET unwind)
4141-+ list(APPEND LIBCXXABI_TEST_DEPS unwind)
4242-+ endif()
4343- endif()
4444-4545- set(AUTO_GEN_COMMENT "## Autogenerated by libcxxabi configuration.\n# Do not edit!")