首页> 外文OA文献 >効率良いテストケース生成による並行処理プログラムのデバッグとテスト
【2h】

効率良いテストケース生成による並行処理プログラムのデバッグとテスト

机译:使用有效的测试用例生成来调试和测试并发程序

摘要

Debugging multi-threaded concurrent programs is more difficult than sequential programs because errors are not always reproducible. Re-executing or instrumenting a concurrent program for tracing might change the execution timing and might cause the concurrent program to take a different execution path. In other words, the exact timing that caused the error is unknown. In order to reproduce the error, one needs to execute the concurrent program with the same input values many times as test cases by changing interleavings, but it is not always feasible to test them all. This dissertation proposes a debugging/testing system that generates all possible executions as test cases based on the limited information obtained from an execution trace, and then detects potential race conditions caused by different schedules and interrupt timings on a concurrent multi-threaded program. There are a number of studies about test cases reduction using partial order reduction, but there are still redundancies for the purpose of checking race conditions. The objective is to efficiently reproduce concurrent errors, specifically race conditions, by proposing three methods. The first is to reduce the numbers of interleavings to be tested. This is achieved by reducing redundant test cases and eliminating infeasible ones. The originality of the proposed method is to exploit the nature of branch coverage and utilize data flows from the trace information to identify only those interleavings that affect branch outcomes, whereas existing methods try to identify all the interleavings which may affect shared variables. Since the execution paths with the same branch outcomes would have equivalent sequences of lock/unlock and read/write operations to shared variables, they can be grouped together in the same “race-equivalent” group. In order to reduce the task for reproducing race conditions, it is sufficient to check only one member of the group. In this way, the proposed method can significantly reduces the number of interleavings for testing while still capable of detecting the same race conditions. Furthermore, the proposed method extends the existing model of execution trace to identify and avoid generating infeasible interleavings due to dependency caused by lock/unlock and wait/notify mechanisms. Experimental results suggest that redundant interleavings can be identified and removed which leads to a significant reduction of test cases. We evaluated the proposed method against several concurrent Java programs. The experimental results for an open source program Apache Commons Pool show the number of test cases is reduced from 23, which is based on the existing Thread-Pair-Interleaving method (TPAIR), to only 2 by the proposed method. Moreover, for concurrent programs that contain infinite loops, the proposed method generates only a finite and very few numbers of test cases, while many existing methods generate an infinite number of test cases. The second is to reduce the memory space required for generating test cases. Redundant test cases were still generated by the existing reachability testing method even though there was no need to execute them. Here, we propose a new method by analyzing data dependency to generate only those test cases that might affect sequences of lock/unlock and read/write operations to shared variables. The experimental results for the Apache Commons Pool show that the size of the graph for creating the test cases is reduced from 990 nodes, as based on the reachability testing method used in our previous work, to only 4 nodes by our new method. The third improvement is to reduce the effort involved in checking race conditions by utilizing previous test results. Existing work requires checking race conditions in the whole execution trace for every new test case. The proposed method can identify only those parts of the execution trace in which the sequence of lock/unlock and read/write operations to shared variables might be affected by a new test case, thus necessitating that race conditions be rechecked only for those affected parts. From the new improvements introduced above, the proposed methods accomplish to significantly reduce the efforts for exhaustively checking all possible interleavings. The proposed methods provide programmers the information regarding whether there exist program errors caused by interleavings, the interleaving (path) when the errors occurred, and accesses to shared variables with inconsistent locking.
机译:与顺序程序相比,调试多线程并发程序更加困难,因为错误并不总是可以重现。重新执行或检测并发程序以进行跟踪可能会更改执行时间,并可能导致并发程序采用不同的执行路径。换句话说,导致错误的确切时间是未知的。为了重现该错误,需要通过改变交错来以与测试用例相同的输入值多次执行并发程序,但是对它们全部进行测试并不总是可行的。本文提出了一种调试/测试系统,该系统基于从执行跟踪获得的有限信息,生成所有可能的执行作为测试用例,然后在并发多线程程序上检测到由于不同的调度和中断时间而导致的潜在竞争状况。关于使用部分订单减少来减少测试用例的研究很多,但是出于检查竞争条件的目的,仍然存在冗余。目的是通过提出三种方法来有效地重现并发错误,特别是竞争条件。第一个是减少要测试的交错次数。这可以通过减少冗余测试用例并消除不可行的测试用例来实现。所提出方法的独创性是利用分支覆盖范围的性质,并利用跟踪信息中的数据流来仅识别那些影响分支结果的交错,而现有方法则试图识别所有可能影响共享变量的交错。由于具有相同分支结果的执行路径将对共享变量具有等效的锁定/解锁和读/写操作序列,因此可以将它们分组到相同的“等效种族”组中。为了减少再现比赛条件的任务,仅检查组中的一个成员就足够了。以此方式,所提出的方法可以显着减少用于测试的交错的数量,同时仍然能够检测相同的比赛条件。此外,所提出的方法扩展了执行跟踪的现有模型,以识别并避免由于锁定/解锁和等待/通知机制所引起的依赖性而产生不可行的交错。实验结果表明,可以识别和删除多余的交错,从而大大减少了测试用例。我们针对多个并发Java程序评估了所提出的方法。开源程序Apache Commons Pool的实验结果表明,测试案例的数量从基于现有的线程对交错方法(TPAIR)的23个减少到建议的方法的2个。此外,对于包含无限循环的并发程序,所提出的方法仅生成有限且数量很少的测试用例,而许多现有方法均生成无限数量的测试用例。第二是减少生成测试用例所需的存储空间。即使不需要执行冗余测试用例,仍然可以通过现有的可达性测试方法来生成它们。在这里,我们提出了一种通过分析数据依赖关系以仅生成可能影响锁定/解锁和对共享变量的读/写操作序列的测试用例的新方法。 Apache Commons Pool的实验结果表明,用于创建测试用例的图形的大小从990个节点(基于我们以前的工作中使用的可到达性测试方法)减少到了新方法中的仅4个节点。第三个改进是通过利用以前的测试结果来减少检查比赛条件的工作量。现有工作需要检查每个新测试用例在整个执行跟踪中的竞争条件。所提出的方法只能识别执行跟踪的那些部分,其中对共享变量的锁定/解锁和读/写操作的顺序可能会受到新测试用例的影响,因此有必要仅针对那些受影响的部分重新检查竞争条件。从上面介绍的新改进中,提出的方法可以显着减少用于穷举检查所有可能的交错的工作。所提出的方法为程序员提供了有关是否存在由交织引起的程序错误,发生错误时的交织(路径)以及使用不一致的锁定访问共享变量的信息。

著录项

  • 作者

    Setiadi Theodorus Eric;

  • 作者单位
  • 年度 2016
  • 总页数
  • 原文格式 PDF
  • 正文语种 en
  • 中图分类

相似文献

  • 外文文献
  • 中文文献
  • 专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号