kirancodes.me
To Proof Maintenance & Beyond!

Generating test cases to expose concurrency bugs in Android applications

Hongyin Tang, Guoquan Wu, Jun Wei, Hua Zhong

Abstract

Mobile systems usually support an event-based model of concurrent programming. This model, although advantageous to maintain responsive user interfaces, may lead to subtle concurrency errors due to unforeseen threads interleaving coupled with non-deterministic reordering of asynchronous events. These bugs are very difficult to reproduce even by the same user action sequences that trigger them, due to the undetermined schedules of underlying events and threads. In this paper, we proposed RacerDroid, a novel technique that aims to expose concurrency bugs in android applications by actively controlling event schedule and thread interleaving, given the test cases that have potential data races. By exploring the state model of the application constructed dynamically, our technique starts first to generate a test case that has potential data races based on the results obtained from existing static or dynamic race detection technique. Then it reschedules test cases execution by actively controlling event dispatching and thread interleaving to determine whether such potential races really lead to thrown exceptions or assertion violations. Our preliminary experiments show that RacerDroid is effective, and it confirms real data races, while at the same time eliminates false warnings for Android apps found in the wild.

BibTeX
@inproceedings{Tang-al:ASE16,
  author    = {Hongyin Tang and
               Guoquan Wu and
               Jun Wei and
               Hua Zhong},
  title     = {Generating test cases to expose concurrency bugs in Android applications},
  booktitle = {ASE},
  pages     = {648--653},
  publisher = {{ACM}},
  year      = {2016},
}

Related papers