summaryrefslogtreecommitdiff
path: root/init/ueventd_parser_test.cpp
AgeCommit message (Collapse)Author
2021-04-16ueventd: Allow pattern matching to find external firmware handlerSuchang Woo
Only the exact same devpath uevent can launch external handler specified in ueventd.rc. So, you should specify all possible devpaths, even firmware with different filenames on the same device. Pattern mactching can be used to simplify this. Test: atest CtsInitTestCases Signed-off-by: Suchang Woo <suchang.woo@samsung.com> Change-Id: If3b7a2cabb8055bf4b768d928f0fc0012da3c177
2021-04-06ueventd: Fix wrong argument index in devpath comparisonSuchang Woo
args[2](user name to run as) is used instead of args[1](devpath). Test: atest CtsInitTestCases Signed-off-by: Suchang Woo <suchang.woo@samsung.com> Change-Id: Id271755993d55e332bad54d0414e2232071e5e8e
2020-12-07ueventd: add no_fnm_pathname optionTom Cherry
If a `*` appears within (but not at the end) of a /dev or /sys path in a ueventd.rc file, then that path is matched with fnmatch() using the FNM_PATHNAME, which means `*` will not match `/`. That is not always the intended behavior and this change creates the no_fnm_pathname option, which will not use the FNM_PATHNAME flag and will have `*` match `/`. Bug: 172880724 Test: these unit tests Change-Id: I85b813d89237dbf3af47564e5cbf6806df5d412f
2019-09-12ueventd: allow using external firmware handlersTom Cherry
Userspace may want to load a different firmware than the one that the kernel requests in some cases, therefore this change adds the ability to ueventd to run an external handler that will determine the name of the file that should actually be loaded. Bug: 138352500 Test: unit tests Change-Id: Ic5da37268fd78109f83ae52d1b903bf7322a5ee5
2019-09-09ueventd: make parallel restorecon functionality optionalTom Cherry
5aa6197d5f387579ff04c330001840d6988e825f added the ability to parallelize restorecon to speed up boot for devices that have not completely moved to genfscon. This parallel restorecon happens after the parallel ueventd handling. This causes a performance regression for devices that have moved to genfscon, since previously, the restorecon() was done in the main ueventd thread in parallel with the uevent handlers. I also tried to run the fully parallelized restorecon in parallel with the uevent handlers, but that did not make any change to the cold boot time, likely due to the additional overhead of parallelizing the work. Bug: 140458170 Test: blueline coldboot time returns to pre-regression time. Change-Id: I3cd6a869cc9b62792466813d94ad6c69834e854e
2018-12-06ueventd: allow configuring SO_RCVBUF(FORCE) for the ueventd socketTom Cherry
Some configurations won't allow ueventd to have CAP_NET_ADMIN, so the new default size of 16M is not possible for those. Those configurations also won't need such a large buffer size, so this change allows devices to customize the SO_RCVBUF(FORCE) size for the uevent socket. This is done by adding the line 'uevent_socket_rcvbuf_size <size>' to your device's ueventd.rc file. <size> is specified as a byte count, for example '16M' is 16MiB. The last parsed uevent_socket_rcvbuf_size line is the one that is used. Bug: 120485624 Test: boot sailfish Test: ueventd unit tests Change-Id: If8123b92ca8a9b089ad50318caada2f21bc94707
2018-11-14switch to using android-base/file.h instead of android-base/test_utils.hMark Salyzyn
Test: compile Bug: 119313545 Change-Id: I4f7ad84743e974b4b4d1d7256088f6c8b749a237
2018-07-17ueventd: add a test for ueventd_parser.cppTom Cherry
Test: this unit test Change-Id: Ib23f23ea5b362bb458adf8208573e5dc80ad6cf0