blob: 6b037d8af70b63699dac312eb527d786a693fdd2 [file] [log] [blame]
Colin Crossb27e2002013-01-28 17:19:43 -08001/*
2 * Copyright (C) 2013 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include <gtest/gtest.h>
Yabin Cui9df70402014-11-05 18:01:01 -080018#include "BionicDeathTest.h"
19
Elliott Hughese4375192013-10-21 17:09:52 -070020#include <errno.h>
Yabin Cui9df70402014-11-05 18:01:01 -080021#include <sys/wait.h>
Greg Hackmanncb215a72013-02-13 14:41:48 -080022#include <unistd.h>
23#include <string>
Colin Crossb27e2002013-01-28 17:19:43 -080024
Christopher Ferrisf04935c2013-12-20 18:43:21 -080025#if defined(__BIONIC__)
Colin Crossb27e2002013-01-28 17:19:43 -080026
27#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
28#include <sys/_system_properties.h>
29
Greg Hackmann1540f602013-06-19 13:31:21 -070030extern void *__system_property_area__;
Colin Crossb27e2002013-01-28 17:19:43 -080031
32struct LocalPropertyTestState {
Greg Hackmanncb215a72013-02-13 14:41:48 -080033 LocalPropertyTestState() : valid(false) {
Elliott Hughese4375192013-10-21 17:09:52 -070034 const char* ANDROID_DATA = getenv("ANDROID_DATA");
35 char dir_template[PATH_MAX];
36 snprintf(dir_template, sizeof(dir_template), "%s/local/tmp/prop-XXXXXX", ANDROID_DATA);
37 char* dirname = mkdtemp(dir_template);
Greg Hackmanncb215a72013-02-13 14:41:48 -080038 if (!dirname) {
Elliott Hughese4375192013-10-21 17:09:52 -070039 fprintf(stderr, "making temp file for test state failed (is %s writable?): %s",
40 dir_template, strerror(errno));
Greg Hackmanncb215a72013-02-13 14:41:48 -080041 return;
42 }
43
Greg Hackmanncb215a72013-02-13 14:41:48 -080044 pa_dirname = dirname;
45 pa_filename = pa_dirname + "/__properties__";
46
47 __system_property_set_filename(pa_filename.c_str());
48 __system_property_area_init();
49 valid = true;
Colin Crossb27e2002013-01-28 17:19:43 -080050 }
51
52 ~LocalPropertyTestState() {
Elliott Hughese4375192013-10-21 17:09:52 -070053 if (!valid) {
Greg Hackmanncb215a72013-02-13 14:41:48 -080054 return;
Elliott Hughese4375192013-10-21 17:09:52 -070055 }
Greg Hackmanncb215a72013-02-13 14:41:48 -080056
Greg Hackmanncb215a72013-02-13 14:41:48 -080057 __system_property_set_filename(PROP_FILENAME);
Tom Cherry49a309f2015-09-23 16:09:47 -070058 __system_properties_init();
Greg Hackmanncb215a72013-02-13 14:41:48 -080059 unlink(pa_filename.c_str());
60 rmdir(pa_dirname.c_str());
Colin Crossb27e2002013-01-28 17:19:43 -080061 }
Greg Hackmanncb215a72013-02-13 14:41:48 -080062public:
63 bool valid;
Colin Crossb27e2002013-01-28 17:19:43 -080064private:
Greg Hackmanncb215a72013-02-13 14:41:48 -080065 std::string pa_dirname;
66 std::string pa_filename;
Colin Crossb27e2002013-01-28 17:19:43 -080067};
68
Christopher Ferrisf04935c2013-12-20 18:43:21 -080069static void foreach_test_callback(const prop_info *pi, void* cookie) {
70 size_t *count = static_cast<size_t *>(cookie);
71
Dimitry Ivanov16b2a4d2017-01-24 20:43:29 +000072 ASSERT_TRUE(pi != nullptr);
Christopher Ferrisf04935c2013-12-20 18:43:21 -080073 (*count)++;
74}
75
76static void hierarchical_test_callback(const prop_info *pi, void *cookie) {
77 bool (*ok)[8][8] = static_cast<bool (*)[8][8]>(cookie);
78
79 char name[PROP_NAME_MAX];
80 char value[PROP_VALUE_MAX];
81
82 __system_property_read(pi, name, value);
83
84 int name_i, name_j, name_k;
85 int value_i, value_j, value_k;
86 ASSERT_EQ(3, sscanf(name, "property_%d.%d.%d", &name_i, &name_j, &name_k));
87 ASSERT_EQ(3, sscanf(value, "value_%d.%d.%d", &value_i, &value_j, &value_k));
88 ASSERT_EQ(name_i, value_i);
89 ASSERT_GE(name_i, 0);
90 ASSERT_LT(name_i, 8);
91 ASSERT_EQ(name_j, value_j);
92 ASSERT_GE(name_j, 0);
93 ASSERT_LT(name_j, 8);
94 ASSERT_EQ(name_k, value_k);
95 ASSERT_GE(name_k, 0);
96 ASSERT_LT(name_k, 8);
97
98 ok[name_i][name_j][name_k] = true;
99}
100
Dimitry Ivanov16b2a4d2017-01-24 20:43:29 +0000101static void* PropertyWaitHelperFn(void* arg) {
102 int* flag = static_cast<int*>(arg);
103 prop_info* pi = const_cast<prop_info*>(__system_property_find("property"));
Christopher Ferrisf04935c2013-12-20 18:43:21 -0800104 usleep(100000);
105
106 *flag = 1;
107 __system_property_update(pi, "value3", 6);
108
Dimitry Ivanov16b2a4d2017-01-24 20:43:29 +0000109 return nullptr;
Christopher Ferrisf04935c2013-12-20 18:43:21 -0800110}
111
112#endif // __BIONIC__
113
Colin Crossb27e2002013-01-28 17:19:43 -0800114TEST(properties, add) {
Christopher Ferrisf04935c2013-12-20 18:43:21 -0800115#if defined(__BIONIC__)
Colin Crossb27e2002013-01-28 17:19:43 -0800116 LocalPropertyTestState pa;
Greg Hackmanncb215a72013-02-13 14:41:48 -0800117 ASSERT_TRUE(pa.valid);
Colin Crossb27e2002013-01-28 17:19:43 -0800118
119 char propvalue[PROP_VALUE_MAX];
120
121 ASSERT_EQ(0, __system_property_add("property", 8, "value1", 6));
122 ASSERT_EQ(0, __system_property_add("other_property", 14, "value2", 6));
123 ASSERT_EQ(0, __system_property_add("property_other", 14, "value3", 6));
124
Dimitry Ivanov16b2a4d2017-01-24 20:43:29 +0000125 // check that there is no limit on property name length
126 char name[PROP_NAME_MAX + 11];
127 name[0] = 'p';
128 for (size_t i = 1; i < sizeof(name); i++) {
129 name[i] = 'x';
130 }
131
132 name[sizeof(name)-1] = '\0';
133 ASSERT_EQ(0, __system_property_add(name, strlen(name), "value", 5));
134
Colin Crossb27e2002013-01-28 17:19:43 -0800135 ASSERT_EQ(6, __system_property_get("property", propvalue));
136 ASSERT_STREQ(propvalue, "value1");
137
138 ASSERT_EQ(6, __system_property_get("other_property", propvalue));
139 ASSERT_STREQ(propvalue, "value2");
140
141 ASSERT_EQ(6, __system_property_get("property_other", propvalue));
142 ASSERT_STREQ(propvalue, "value3");
Dimitry Ivanov16b2a4d2017-01-24 20:43:29 +0000143
144 ASSERT_EQ(5, __system_property_get(name, propvalue));
145 ASSERT_STREQ(propvalue, "value");
Christopher Ferrisf04935c2013-12-20 18:43:21 -0800146#else // __BIONIC__
147 GTEST_LOG_(INFO) << "This test does nothing.\n";
148#endif // __BIONIC__
Colin Crossb27e2002013-01-28 17:19:43 -0800149}
150
151TEST(properties, update) {
Christopher Ferrisf04935c2013-12-20 18:43:21 -0800152#if defined(__BIONIC__)
Colin Crossb27e2002013-01-28 17:19:43 -0800153 LocalPropertyTestState pa;
Greg Hackmanncb215a72013-02-13 14:41:48 -0800154 ASSERT_TRUE(pa.valid);
Colin Crossb27e2002013-01-28 17:19:43 -0800155
156 char propvalue[PROP_VALUE_MAX];
157 prop_info *pi;
158
159 ASSERT_EQ(0, __system_property_add("property", 8, "oldvalue1", 9));
160 ASSERT_EQ(0, __system_property_add("other_property", 14, "value2", 6));
161 ASSERT_EQ(0, __system_property_add("property_other", 14, "value3", 6));
162
163 pi = (prop_info *)__system_property_find("property");
164 ASSERT_NE((prop_info *)NULL, pi);
165 __system_property_update(pi, "value4", 6);
166
167 pi = (prop_info *)__system_property_find("other_property");
168 ASSERT_NE((prop_info *)NULL, pi);
169 __system_property_update(pi, "newvalue5", 9);
170
171 pi = (prop_info *)__system_property_find("property_other");
172 ASSERT_NE((prop_info *)NULL, pi);
173 __system_property_update(pi, "value6", 6);
174
175 ASSERT_EQ(6, __system_property_get("property", propvalue));
176 ASSERT_STREQ(propvalue, "value4");
177
178 ASSERT_EQ(9, __system_property_get("other_property", propvalue));
179 ASSERT_STREQ(propvalue, "newvalue5");
180
181 ASSERT_EQ(6, __system_property_get("property_other", propvalue));
182 ASSERT_STREQ(propvalue, "value6");
Christopher Ferrisf04935c2013-12-20 18:43:21 -0800183#else // __BIONIC__
184 GTEST_LOG_(INFO) << "This test does nothing.\n";
185#endif // __BIONIC__
Colin Crossb27e2002013-01-28 17:19:43 -0800186}
187
Greg Hackmanncb215a72013-02-13 14:41:48 -0800188TEST(properties, fill) {
Christopher Ferrisf04935c2013-12-20 18:43:21 -0800189#if defined(__BIONIC__)
Colin Crossb27e2002013-01-28 17:19:43 -0800190 LocalPropertyTestState pa;
Greg Hackmanncb215a72013-02-13 14:41:48 -0800191 ASSERT_TRUE(pa.valid);
Colin Crossb27e2002013-01-28 17:19:43 -0800192 char prop_name[PROP_NAME_MAX];
193 char prop_value[PROP_VALUE_MAX];
194 char prop_value_ret[PROP_VALUE_MAX];
Greg Hackmanncb215a72013-02-13 14:41:48 -0800195 int count = 0;
Colin Crossb27e2002013-01-28 17:19:43 -0800196 int ret;
197
Greg Hackmanncb215a72013-02-13 14:41:48 -0800198 while (true) {
199 ret = snprintf(prop_name, PROP_NAME_MAX - 1, "property_%d", count);
Colin Crossb27e2002013-01-28 17:19:43 -0800200 memset(prop_name + ret, 'a', PROP_NAME_MAX - 1 - ret);
Greg Hackmanncb215a72013-02-13 14:41:48 -0800201 ret = snprintf(prop_value, PROP_VALUE_MAX - 1, "value_%d", count);
Colin Crossb27e2002013-01-28 17:19:43 -0800202 memset(prop_value + ret, 'b', PROP_VALUE_MAX - 1 - ret);
203 prop_name[PROP_NAME_MAX - 1] = 0;
204 prop_value[PROP_VALUE_MAX - 1] = 0;
205
Greg Hackmanncb215a72013-02-13 14:41:48 -0800206 ret = __system_property_add(prop_name, PROP_NAME_MAX - 1, prop_value, PROP_VALUE_MAX - 1);
207 if (ret < 0)
208 break;
209
210 count++;
Colin Crossb27e2002013-01-28 17:19:43 -0800211 }
212
Greg Hackmanncb215a72013-02-13 14:41:48 -0800213 // For historical reasons at least 247 properties must be supported
214 ASSERT_GE(count, 247);
215
216 for (int i = 0; i < count; i++) {
Colin Crossb27e2002013-01-28 17:19:43 -0800217 ret = snprintf(prop_name, PROP_NAME_MAX - 1, "property_%d", i);
218 memset(prop_name + ret, 'a', PROP_NAME_MAX - 1 - ret);
219 ret = snprintf(prop_value, PROP_VALUE_MAX - 1, "value_%d", i);
220 memset(prop_value + ret, 'b', PROP_VALUE_MAX - 1 - ret);
221 prop_name[PROP_NAME_MAX - 1] = 0;
222 prop_value[PROP_VALUE_MAX - 1] = 0;
223 memset(prop_value_ret, '\0', PROP_VALUE_MAX);
224
225 ASSERT_EQ(PROP_VALUE_MAX - 1, __system_property_get(prop_name, prop_value_ret));
226 ASSERT_EQ(0, memcmp(prop_value, prop_value_ret, PROP_VALUE_MAX));
227 }
Christopher Ferrisf04935c2013-12-20 18:43:21 -0800228#else // __BIONIC__
229 GTEST_LOG_(INFO) << "This test does nothing.\n";
230#endif // __BIONIC__
Greg Hackmannc6ff8442013-02-12 16:39:31 -0800231}
232
233TEST(properties, foreach) {
Christopher Ferrisf04935c2013-12-20 18:43:21 -0800234#if defined(__BIONIC__)
Greg Hackmannc6ff8442013-02-12 16:39:31 -0800235 LocalPropertyTestState pa;
Greg Hackmanncb215a72013-02-13 14:41:48 -0800236 ASSERT_TRUE(pa.valid);
Greg Hackmannc6ff8442013-02-12 16:39:31 -0800237 size_t count = 0;
238
239 ASSERT_EQ(0, __system_property_add("property", 8, "value1", 6));
240 ASSERT_EQ(0, __system_property_add("other_property", 14, "value2", 6));
241 ASSERT_EQ(0, __system_property_add("property_other", 14, "value3", 6));
242
243 ASSERT_EQ(0, __system_property_foreach(foreach_test_callback, &count));
244 ASSERT_EQ(3U, count);
Christopher Ferrisf04935c2013-12-20 18:43:21 -0800245#else // __BIONIC__
246 GTEST_LOG_(INFO) << "This test does nothing.\n";
247#endif // __BIONIC__
Greg Hackmannc6ff8442013-02-12 16:39:31 -0800248}
249
Colin Crossb27e2002013-01-28 17:19:43 -0800250TEST(properties, find_nth) {
Christopher Ferrisf04935c2013-12-20 18:43:21 -0800251#if defined(__BIONIC__)
Colin Crossb27e2002013-01-28 17:19:43 -0800252 LocalPropertyTestState pa;
Greg Hackmanncb215a72013-02-13 14:41:48 -0800253 ASSERT_TRUE(pa.valid);
Colin Crossb27e2002013-01-28 17:19:43 -0800254
255 ASSERT_EQ(0, __system_property_add("property", 8, "value1", 6));
256 ASSERT_EQ(0, __system_property_add("other_property", 14, "value2", 6));
257 ASSERT_EQ(0, __system_property_add("property_other", 14, "value3", 6));
258
Dimitry Ivanov581b9f62017-01-09 11:05:52 -0800259 // This method is no longer supported and should result in abort
260 ASSERT_EXIT(__system_property_find_nth(0), testing::KilledBySignal(SIGABRT),
261 "__system_property_find_nth is not supported since Android O,"
262 " please use __system_property_foreach instead.");
Christopher Ferrisf04935c2013-12-20 18:43:21 -0800263#else // __BIONIC__
264 GTEST_LOG_(INFO) << "This test does nothing.\n";
265#endif // __BIONIC__
Greg Hackmannd5276422013-06-17 12:37:09 -0700266}
267
268TEST(properties, fill_hierarchical) {
Christopher Ferrisf04935c2013-12-20 18:43:21 -0800269#if defined(__BIONIC__)
Greg Hackmannd5276422013-06-17 12:37:09 -0700270 LocalPropertyTestState pa;
271 ASSERT_TRUE(pa.valid);
272 char prop_name[PROP_NAME_MAX];
273 char prop_value[PROP_VALUE_MAX];
274 char prop_value_ret[PROP_VALUE_MAX];
275 int ret;
276
277 for (int i = 0; i < 8; i++) {
278 for (int j = 0; j < 8; j++) {
279 for (int k = 0; k < 8; k++) {
280 ret = snprintf(prop_name, PROP_NAME_MAX - 1, "property_%d.%d.%d", i, j, k);
281 memset(prop_name + ret, 'a', PROP_NAME_MAX - 1 - ret);
282 ret = snprintf(prop_value, PROP_VALUE_MAX - 1, "value_%d.%d.%d", i, j, k);
283 memset(prop_value + ret, 'b', PROP_VALUE_MAX - 1 - ret);
284 prop_name[PROP_NAME_MAX - 1] = 0;
285 prop_value[PROP_VALUE_MAX - 1] = 0;
286
287 ASSERT_EQ(0, __system_property_add(prop_name, PROP_NAME_MAX - 1, prop_value, PROP_VALUE_MAX - 1));
288 }
289 }
290 }
291
292 for (int i = 0; i < 8; i++) {
293 for (int j = 0; j < 8; j++) {
294 for (int k = 0; k < 8; k++) {
295 ret = snprintf(prop_name, PROP_NAME_MAX - 1, "property_%d.%d.%d", i, j, k);
296 memset(prop_name + ret, 'a', PROP_NAME_MAX - 1 - ret);
297 ret = snprintf(prop_value, PROP_VALUE_MAX - 1, "value_%d.%d.%d", i, j, k);
298 memset(prop_value + ret, 'b', PROP_VALUE_MAX - 1 - ret);
299 prop_name[PROP_NAME_MAX - 1] = 0;
300 prop_value[PROP_VALUE_MAX - 1] = 0;
301 memset(prop_value_ret, '\0', PROP_VALUE_MAX);
302
303 ASSERT_EQ(PROP_VALUE_MAX - 1, __system_property_get(prop_name, prop_value_ret));
304 ASSERT_EQ(0, memcmp(prop_value, prop_value_ret, PROP_VALUE_MAX));
305 }
306 }
307 }
308
309 bool ok[8][8][8];
310 memset(ok, 0, sizeof(ok));
311 __system_property_foreach(hierarchical_test_callback, ok);
312
313 for (int i = 0; i < 8; i++) {
314 for (int j = 0; j < 8; j++) {
315 for (int k = 0; k < 8; k++) {
316 ASSERT_TRUE(ok[i][j][k]);
317 }
318 }
319 }
Christopher Ferrisf04935c2013-12-20 18:43:21 -0800320#else // __BIONIC__
321 GTEST_LOG_(INFO) << "This test does nothing.\n";
322#endif // __BIONIC__
Greg Hackmannd5276422013-06-17 12:37:09 -0700323}
324
Colin Crossb27e2002013-01-28 17:19:43 -0800325TEST(properties, errors) {
Christopher Ferrisf04935c2013-12-20 18:43:21 -0800326#if defined(__BIONIC__)
Colin Crossb27e2002013-01-28 17:19:43 -0800327 LocalPropertyTestState pa;
Greg Hackmanncb215a72013-02-13 14:41:48 -0800328 ASSERT_TRUE(pa.valid);
Colin Crossb27e2002013-01-28 17:19:43 -0800329 char prop_value[PROP_NAME_MAX];
330
331 ASSERT_EQ(0, __system_property_add("property", 8, "value1", 6));
332 ASSERT_EQ(0, __system_property_add("other_property", 14, "value2", 6));
333 ASSERT_EQ(0, __system_property_add("property_other", 14, "value3", 6));
334
335 ASSERT_EQ(0, __system_property_find("property1"));
336 ASSERT_EQ(0, __system_property_get("property1", prop_value));
337
Colin Crossb27e2002013-01-28 17:19:43 -0800338 ASSERT_EQ(-1, __system_property_add("name", 4, "value", PROP_VALUE_MAX));
339 ASSERT_EQ(-1, __system_property_update(NULL, "value", PROP_VALUE_MAX));
Christopher Ferrisf04935c2013-12-20 18:43:21 -0800340#else // __BIONIC__
341 GTEST_LOG_(INFO) << "This test does nothing.\n";
342#endif // __BIONIC__
Colin Crossb27e2002013-01-28 17:19:43 -0800343}
344
345TEST(properties, serial) {
Christopher Ferrisf04935c2013-12-20 18:43:21 -0800346#if defined(__BIONIC__)
Colin Crossb27e2002013-01-28 17:19:43 -0800347 LocalPropertyTestState pa;
Greg Hackmanncb215a72013-02-13 14:41:48 -0800348 ASSERT_TRUE(pa.valid);
Colin Crossb27e2002013-01-28 17:19:43 -0800349 const prop_info *pi;
350 unsigned int serial;
351
352 ASSERT_EQ(0, __system_property_add("property", 8, "value1", 6));
353 ASSERT_NE((const prop_info *)NULL, pi = __system_property_find("property"));
354 serial = __system_property_serial(pi);
355 ASSERT_EQ(0, __system_property_update((prop_info *)pi, "value2", 6));
356 ASSERT_NE(serial, __system_property_serial(pi));
Christopher Ferrisf04935c2013-12-20 18:43:21 -0800357#else // __BIONIC__
358 GTEST_LOG_(INFO) << "This test does nothing.\n";
359#endif // __BIONIC__
Colin Crossb27e2002013-01-28 17:19:43 -0800360}
361
362TEST(properties, wait) {
Christopher Ferrisf04935c2013-12-20 18:43:21 -0800363#if defined(__BIONIC__)
Colin Crossb27e2002013-01-28 17:19:43 -0800364 LocalPropertyTestState pa;
Greg Hackmanncb215a72013-02-13 14:41:48 -0800365 ASSERT_TRUE(pa.valid);
Colin Crossb27e2002013-01-28 17:19:43 -0800366 unsigned int serial;
367 prop_info *pi;
368 pthread_t t;
369 int flag = 0;
370
371 ASSERT_EQ(0, __system_property_add("property", 8, "value1", 6));
372 serial = __system_property_wait_any(0);
Dimitry Ivanov16b2a4d2017-01-24 20:43:29 +0000373
374 pi = const_cast<prop_info*>(__system_property_find("property"));
375 ASSERT_TRUE(pi != nullptr);
Colin Crossb27e2002013-01-28 17:19:43 -0800376 __system_property_update(pi, "value2", 6);
377 serial = __system_property_wait_any(serial);
378
Dimitry Ivanov16b2a4d2017-01-24 20:43:29 +0000379 ASSERT_EQ(0, pthread_create(&t, nullptr, PropertyWaitHelperFn, &flag));
Colin Crossb27e2002013-01-28 17:19:43 -0800380 ASSERT_EQ(flag, 0);
381 serial = __system_property_wait_any(serial);
382 ASSERT_EQ(flag, 1);
383
384 void* result;
385 ASSERT_EQ(0, pthread_join(t, &result));
Christopher Ferrisf04935c2013-12-20 18:43:21 -0800386#else // __BIONIC__
387 GTEST_LOG_(INFO) << "This test does nothing.\n";
388#endif // __BIONIC__
Colin Crossb27e2002013-01-28 17:19:43 -0800389}
390
391class KilledByFault {
392 public:
393 explicit KilledByFault() {};
394 bool operator()(int exit_status) const;
395};
396
397bool KilledByFault::operator()(int exit_status) const {
398 return WIFSIGNALED(exit_status) &&
399 (WTERMSIG(exit_status) == SIGSEGV ||
400 WTERMSIG(exit_status) == SIGBUS ||
401 WTERMSIG(exit_status) == SIGABRT);
402}
403
Yabin Cui9df70402014-11-05 18:01:01 -0800404class properties_DeathTest : public BionicDeathTest {};
405
406TEST_F(properties_DeathTest, read_only) {
Christopher Ferrisf04935c2013-12-20 18:43:21 -0800407#if defined(__BIONIC__)
Elliott Hughese4375192013-10-21 17:09:52 -0700408
409 // This test only makes sense if we're talking to the real system property service.
410 struct stat sb;
Dimitry Ivanov16b2a4d2017-01-24 20:43:29 +0000411 ASSERT_FALSE(stat(PROP_FILENAME, &sb) == -1 && errno == ENOENT);
Elliott Hughese4375192013-10-21 17:09:52 -0700412
413 ASSERT_EXIT(__system_property_add("property", 8, "value", 5), KilledByFault(), "");
Christopher Ferrisf04935c2013-12-20 18:43:21 -0800414#else // __BIONIC__
415 GTEST_LOG_(INFO) << "This test does nothing.\n";
416#endif // __BIONIC__
Colin Crossb27e2002013-01-28 17:19:43 -0800417}