Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit b497cc9

Browse files
JustGalaxy30Snild-Sony
authored andcommitted
Increase the space used by properties filenames
The filename size for properties has 74 bytes overhead when used by CtsBionicTestCases testcases as they have this form: /data/local/tmp/TemporaryDir-fntJb8/appcompat_override/u:object_r:PROPERTY_NAME_prop:s0 With this overhead, a 128-byte filename size leaves only 53 bytes for property names. Longer names cause abort() in several test cases, e.g. __system_property_update(), resulting in CTS failures on some devices. Bring the size up to 256 bytes. Bug: 357631695 Test: run cts-dev -m CtsBionicTestCases -t properties#* Fixes: I524d7e5ffd415ba0c3d600eb94801a304b1b4bb4 Change-Id: Ic93c2ea28eed2f5f392cc8fe366ed10eb6dcac6b
1 parent b1a578a commit b497cc9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

libc/system_properties/include/system_properties/properties_filename.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ class PropertiesFilename {
4646
const char* c_str() { return filename_; }
4747

4848
private:
49-
// Typically something like "/dev/__properties__/properties_serial".
50-
char filename_[128];
49+
// Typically something like "/dev/__properties__/properties_serial", but can be as long as
50+
// "/data/local/tmp/TemporaryDir-fntJb8/appcompat_override/u:object_r:PROPERTY_NAME_prop:s0"
51+
// when running CTS.
52+
char filename_[256];
5153
};

0 commit comments

Comments
 (0)