计算机科学 ›› 2017, Vol. 44 ›› Issue (11): 27-32.doi: 10.11896/j.issn.1002-137X.2017.11.005
佘艺,唐弘胤,吴国全,陈伟,魏峻,黄涛
SHE Yi, TANG Hong-yin, WU Guo-quan, CHEN Wei, WEI Jun and HUANG Tao
摘要: Android应用是一种事件驱动的并发程序。后台线程与异步事件执行顺序的不确定,导致数据竞争在Android应用中普遍存在。现有的针对Android应用的竞争检测工具会产生大量误报,且不能确定地重现竞争。针对以上问题,在现有的竞争检测结果的基础上,提出了一种基于测试用例生成的Android应用数据竞争验证方法。该方法首先构建应用的状态转化图,并基于状态转化图和现有竞争检测工具的检测结果自动生成包含潜在数据竞争的测试用例,然后在测试用例执行的过程中通过控制事件分发和线程的执行顺序来暴露竞争,观察竞争是否会引起程序异常。实验结果表明,该方法能有效地重现数据竞争引起的并发错误,并指出检测结果中的误报。
[1] SAFI G,SHAHBAZIAN A,HALFOND W G J,et al.Detecting event anomalies in event-based systems[C]∥Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering.ACM,2015:25-37. [2] BIELIK P,RAYCHEV V,VECHEV M.Scalable race detection for android applications[J].ACM SIGPLAN Notices,2015,50(10):332-348. [3] YANG S,YAN D,WU H,et al.Static control-flow analysis of user-driven callbacks in Android applications[C]∥Proceedings of the 37th International Conference on Software Engineering-Volume 1.IEEE,2015:89-99. [4] YANG S,ZHANG H,WU H,et al.Static Window Transition Graphs for Android (T)[C]∥2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE).IEEE,2015:658-668. [5] CHOI W,NECULA G,SEN K.Guided gui testing of android apps with minimal restart and approximate learning[J].ACM SIGPLAN Notices,2013,48(10):623-640. [6] AZIM T,NEAMTIU I.Targeted and depth-first exploration for systematic testing of android apps[J].ACM SIGPLAN Notices,2013,48(10):641-660. [7] MAIYA P,KANADE A,MAJUMDAR R.Race detection forAndroid applications[C]∥ACM SIGPLAN Notices.2014:316-325. [8] HSIAO C H,YU J,NARAYANASAMY S,et al.Race detection for event-driven mobile applications[J].ACM SIGPLAN Notices,2014,49(6):326-336. [9] Espresso.https://google.github.io/android-testing-sup-port-library/docs/espresso. [10] PETROV B,VECHEV M,SRIDHARAN M,et al.Race detection for web applications[J].ACM SIGPLAN Notices,2012,47(6):251-262. [11] RAYCHEV V,VECHEV M,S RIDHARAN M.Effective race detection for event-driven programs[J].ACM SIGPLAN Notices,2013,48(10):151-166. [12] LIN Y,RADOI C,DIG D.Retrofitting concurrency for android applications through refactoring[C]∥Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering.ACM,2014:341-352. [13] SEN K.Race directed random testing of concurrent programs[J].ACM SIGPLAN Notices,2008,43(6):11-21. [14] Robtotium.Github.https://github.com/RobotiumTech/robotium. |
No related articles found! |
|