test-execute: also mount tmpfs on /dev/shm
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 17 Feb 2023 01:21:58 +0000 (10:21 +0900)
committerLennart Poettering <lennart@poettering.net>
Fri, 17 Feb 2023 08:55:05 +0000 (09:55 +0100)
commitd51e31ac4197d971a468ff41f15593bb6fdb29f3
tree5e7351698ee4ecbd572c6a43c4e5db596843b31c
parent8c2264abb9c16bc2933f95be299f15ee66c21181
test-execute: also mount tmpfs on /dev/shm

Otherwise, if /dev/shm has a directory that cannot be accessible by
unprivileged user, then we cannot pick a dynamic user, and test service
may fail with unexpected error code:
---
Failed to enter shared memory directory /dev/shm/systemd-watch-bind-BqAGlN: Permission denied
exec-dynamicuser-supplementarygroups.service: Failed to update dynamic user credentials: Device or resource busy
exec-dynamicuser-supplementarygroups.service: Failed at step USER spawning /bin/sh: Device or resource busy
src/test/test-execute.c:885:test_exec_dynamicuser: exec-dynamicuser-supplementarygroups.service: can_unshare=no: exit status 217, expected 216
---

Follow-up for 4e032f654b94c2544ccf937209303766dfa66c24.
src/test/test-execute.c