我正在开发一个实现用户级线程的线程库(我有类似 pthread_setscope 的东西可以工作),我正在寻找一些测试集以避免为我实现的每个函数(互斥锁、条件等)编写一个测试...)
有人知道吗?
最佳答案
这是 OpenGroup POSIX Threads Test Suite :
The test suite can be run in the following modes :
- POSIX 1003.1-1996 mode, covering Pthreads only.
- UNIX 98 mode, covering Pthreads and the XSH5 extensions
- POSIX 1003.1-2003 mode
- UNIX 03 mode
This allows the test suite to easily be used during development of your threads implementation, for example initially you might only want to run the POSIX 1003.1-1996 subset.
The assertion counts are as follows:
- POSIX 96 MODE: PTHR.hdr 286, PTHR.os 445
- UNIX98 MODE: PTHR.hdr 365, PTHR.os 563
还有 IEEE POSIX Certification Test Suites .
最后你可以看看 Open POSIX Test Suite .
关于C : POSIX threads library test-suite,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/535908/