Go to file
Romain Naour 084cc7df3f support/testing: TestPolkitSystemd: fix systemctl exit code check on failure
As reported by [1] [2], the return code of systemctl command between
systemd 253 and 254 has changed when the polkit authentication is
refused:

/bin/systemctl restart systemd-timesyncd.service

The return code changed from 1 to 4. The Polkit test case
"TestPolkitSystemd" expected 1 as return code [3].

The service log is not the same either:

systemd v253:
Failed to restart systemd-timesyncd.service: Interactive authentication required.

systemd v254:
Failed to restart systemd-timesyncd.service: Access denied

git bisect report this commit:
959301cf9f

From the PR (to get more context):
https://github.com/systemd/systemd/pull/26365

Note: systemd doesn't recommend using systemctl exit code to check unit states:
"The mapping of LSB service states to systemd unit states is imperfect, so it is better to
not rely on those return values but to look for specific unit states and substates instead."

Since we only want to check if the command failed, update our test to
check if systemctl returned a non zero code whatever the reason of the
failure.

Thanks to Yann E. MORIN for the brainstorming!

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/4768561464 (TestPolkitSystemd)

[1] http://lists.busybox.net/pipermail/buildroot/2023-August/671900.html
[2] https://lists.freedesktop.org/archives/systemd-devel/2023-August/049362.html
[3] https://git.buildroot.net/buildroot/tree/support/testing/tests/package/test_polkit.py?h=2023.08-rc1#n45
[4] https://github.com/systemd/systemd/blob/v254/man/systemctl.xml#L2612

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-08-09 19:21:27 +02:00
arch arch/Config.in.x86: consolidate Geode CPU targets 2023-08-01 23:16:02 +02:00
board board/zynq/post-image.sh: correct comment text 2023-08-08 00:03:54 +02:00
boot boot/at91dataflashboot: force arm mode instead of Thumb mode 2023-08-06 14:12:34 +02:00
configs configs/qemu_m68k: add Linux kernel patch to fix build with binutils >= 2.41 2023-08-08 00:03:22 +02:00
docs Update for 2023.08-rc1 2023-08-05 23:03:28 +02:00
fs fs/cpio: allow users to provide their own dracut modules 2023-02-06 22:46:35 +01:00
linux {linux, linux-headers}: security bump 4.{14, 19}.x / 5.{4, 10, 15}.x / 6.{1, 4}.x series 2023-08-09 12:20:52 +02:00
package package/flite: add FLITE_CPE_ID_VENDOR 2023-08-09 19:21:26 +02:00
support support/testing: TestPolkitSystemd: fix systemctl exit code check on failure 2023-08-09 19:21:27 +02:00
system package/systemd: bump linux-headers dependency to 4.14 2023-08-02 21:18:16 +02:00
toolchain toolchain: introduce BR2_TOOLCHAIN_HAS_BINUTILS_BUG_30730 2023-08-07 23:34:02 +02:00
utils utils/docker-run: fix running when CWD is not MAIN_DIR 2023-07-31 20:56:57 +02:00
.checkpackageignore package/elf2flt: refresh patches 2023-08-06 15:43:07 +02:00
.clang-format .clang-format: initial import from Linux 5.15.6 2022-01-01 15:01:13 +01:00
.defconfig
.flake8
.gitignore
.gitlab-ci.yml .gitlab-ci.yml: update Docker image to use 2023-02-07 18:15:00 +01:00
.shellcheckrc utils/check-package: improve shellcheck reproducibility 2022-07-25 23:52:47 +02:00
CHANGES Update for 2023.08-rc1 2023-08-05 23:03:28 +02:00
Config.in package/sam-ba: drop 32bit host lib requirement 2023-07-30 23:41:44 +02:00
Config.in.legacy package/binutils: drop 2.38.x series 2023-08-01 23:12:01 +02:00
COPYING
DEVELOPERS DEVELOPERS: sort entries of Neal Frager 2023-08-03 21:16:34 +02:00
Makefile Update for 2023.08-rc1 2023-08-05 23:03:28 +02:00
Makefile.legacy
README docs: move the IRC channel away from Freenode 2021-05-29 22:16:23 +02:00

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on OFTC IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches