Lines Matching refs:mutated
191 DBusString *mutated) in randomly_shorten_or_lengthen() argument
195 if (orig_data != mutated) in randomly_shorten_or_lengthen()
197 _dbus_string_set_length (mutated, 0); in randomly_shorten_or_lengthen()
199 if (!_dbus_string_copy (orig_data, 0, mutated, 0)) in randomly_shorten_or_lengthen()
203 if (_dbus_string_get_length (mutated) == 0) in randomly_shorten_or_lengthen()
206 delta = random_int_in_range (- _dbus_string_get_length (mutated), in randomly_shorten_or_lengthen()
207 _dbus_string_get_length (mutated) * 3); in randomly_shorten_or_lengthen()
210 _dbus_string_shorten (mutated, - delta); in randomly_shorten_or_lengthen()
215 i = _dbus_string_get_length (mutated); in randomly_shorten_or_lengthen()
216 if (!_dbus_string_lengthen (mutated, delta)) in randomly_shorten_or_lengthen()
219 while (i < _dbus_string_get_length (mutated)) in randomly_shorten_or_lengthen()
221 _dbus_string_set_byte (mutated, in randomly_shorten_or_lengthen()
231 DBusString *mutated) in randomly_change_one_byte() argument
235 if (orig_data != mutated) in randomly_change_one_byte()
237 _dbus_string_set_length (mutated, 0); in randomly_change_one_byte()
239 if (!_dbus_string_copy (orig_data, 0, mutated, 0)) in randomly_change_one_byte()
243 if (_dbus_string_get_length (mutated) == 0) in randomly_change_one_byte()
246 i = random_int_in_range (0, _dbus_string_get_length (mutated)); in randomly_change_one_byte()
248 _dbus_string_set_byte (mutated, i, in randomly_change_one_byte()
254 DBusString *mutated) in randomly_remove_one_byte() argument
258 if (orig_data != mutated) in randomly_remove_one_byte()
260 _dbus_string_set_length (mutated, 0); in randomly_remove_one_byte()
262 if (!_dbus_string_copy (orig_data, 0, mutated, 0)) in randomly_remove_one_byte()
266 if (_dbus_string_get_length (mutated) == 0) in randomly_remove_one_byte()
269 i = random_int_in_range (0, _dbus_string_get_length (mutated)); in randomly_remove_one_byte()
271 _dbus_string_delete (mutated, i, 1); in randomly_remove_one_byte()
277 DBusString *mutated) in randomly_add_one_byte() argument
281 if (orig_data != mutated) in randomly_add_one_byte()
283 _dbus_string_set_length (mutated, 0); in randomly_add_one_byte()
285 if (!_dbus_string_copy (orig_data, 0, mutated, 0)) in randomly_add_one_byte()
289 i = random_int_in_range (0, _dbus_string_get_length (mutated)); in randomly_add_one_byte()
291 _dbus_string_insert_bytes (mutated, i, 1, in randomly_add_one_byte()
297 DBusString *mutated) in randomly_modify_length() argument
305 if (orig_data != mutated) in randomly_modify_length()
307 _dbus_string_set_length (mutated, 0); in randomly_modify_length()
309 if (!_dbus_string_copy (orig_data, 0, mutated, 0)) in randomly_modify_length()
313 if (_dbus_string_get_length (mutated) < 12) in randomly_modify_length()
316 d = _dbus_string_get_const_data (mutated); in randomly_modify_length()
324 i = random_int_in_range (4, _dbus_string_get_length (mutated) - 8); in randomly_modify_length()
327 orig = _dbus_demarshal_uint32 (mutated, byte_order, i, NULL); in randomly_modify_length()
331 _dbus_marshal_set_uint32 (mutated, byte_order, i, in randomly_modify_length()
337 DBusString *mutated) in randomly_set_extreme_ints() argument
363 if (orig_data != mutated) in randomly_set_extreme_ints()
365 _dbus_string_set_length (mutated, 0); in randomly_set_extreme_ints()
367 if (!_dbus_string_copy (orig_data, 0, mutated, 0)) in randomly_set_extreme_ints()
371 if (_dbus_string_get_length (mutated) < 12) in randomly_set_extreme_ints()
374 d = _dbus_string_get_const_data (mutated); in randomly_set_extreme_ints()
382 i = random_int_in_range (4, _dbus_string_get_length (mutated) - 8); in randomly_set_extreme_ints()
385 orig = _dbus_demarshal_uint32 (mutated, byte_order, i, NULL); in randomly_set_extreme_ints()
392 _dbus_marshal_set_uint32 (mutated, byte_order, i, in randomly_set_extreme_ints()
423 DBusString *mutated) in randomly_change_one_type() argument
428 if (orig_data != mutated) in randomly_change_one_type()
430 _dbus_string_set_length (mutated, 0); in randomly_change_one_type()
432 if (!_dbus_string_copy (orig_data, 0, mutated, 0)) in randomly_change_one_type()
436 if (_dbus_string_get_length (mutated) == 0) in randomly_change_one_type()
439 len = _dbus_string_get_length (mutated); in randomly_change_one_type()
448 b = _dbus_string_get_byte (mutated, i); in randomly_change_one_type()
451 _dbus_string_set_byte (mutated, i, random_type ()); in randomly_change_one_type()
462 DBusString *mutated, in randomly_do_n_things() argument
467 DBusString *mutated) = in randomly_do_n_things()
478 _dbus_string_set_length (mutated, 0); in randomly_do_n_things()
480 if (!_dbus_string_copy (orig_data, 0, mutated, 0)) in randomly_do_n_things()
490 (* functions[which]) (mutated, mutated); in randomly_do_n_things()
504 DBusString mutated; in find_breaks_based_on() local
516 if (!_dbus_string_init (&mutated)) in find_breaks_based_on()
530 randomly_change_one_byte (&orig_data, &mutated); in find_breaks_based_on()
531 try_mutated_data (&mutated); in find_breaks_based_on()
540 randomly_modify_length (&orig_data, &mutated); in find_breaks_based_on()
541 try_mutated_data (&mutated); in find_breaks_based_on()
550 randomly_remove_one_byte (&orig_data, &mutated); in find_breaks_based_on()
551 try_mutated_data (&mutated); in find_breaks_based_on()
560 randomly_add_one_byte (&orig_data, &mutated); in find_breaks_based_on()
561 try_mutated_data (&mutated); in find_breaks_based_on()
570 randomly_set_extreme_ints (&orig_data, &mutated); in find_breaks_based_on()
571 try_mutated_data (&mutated); in find_breaks_based_on()
580 randomly_change_one_type (&orig_data, &mutated); in find_breaks_based_on()
581 try_mutated_data (&mutated); in find_breaks_based_on()
590 randomly_shorten_or_lengthen (&orig_data, &mutated); in find_breaks_based_on()
591 try_mutated_data (&mutated); in find_breaks_based_on()
600 randomly_do_n_things (&orig_data, &mutated, 2); in find_breaks_based_on()
601 try_mutated_data (&mutated); in find_breaks_based_on()
610 randomly_do_n_things (&orig_data, &mutated, 3); in find_breaks_based_on()
611 try_mutated_data (&mutated); in find_breaks_based_on()
620 randomly_do_n_things (&orig_data, &mutated, 4); in find_breaks_based_on()
621 try_mutated_data (&mutated); in find_breaks_based_on()
631 _dbus_string_free (&mutated); in find_breaks_based_on()