Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/tests/lib/libpthread_dbg



Module Name:    src
Committed By:   kamil
Date:           Tue Nov 22 03:21:46 UTC 2016

Modified Files:
        src/tests/lib/libpthread_dbg: t_threads.c

Log Message:
Add new tests in lib/libpthread_dbg/t_threads: threads[6789]

These tests verifies the td_map_pth2thr().

It's rather difficult to test all aspects of pthreads_dbg(3) functions out of
context of a real application, this is the reason why these tests are
extensions of the previous ones and they test four (out of unlimited) valid
code-paths.

This function (the same as others in this class) is doing only single thing,
but its result depends on unlimited variations of the context.

The purpose of these checks is basic validation that the pthread_dbg(3) library
is still usable, but not that it's out of bugs.

threads6:
    Asserts that pthread_t can be translated with td_map_pth2thr()
    to td_thread_t -- and assert earlier that td_thr_iter() call is
    valid.

threads7:
    Asserts that pthread_t can be translated with td_map_pth2thr()
    to td_thread_t -- and assert later that td_thr_iter() call is
    valid.

threads8:
    Asserts that pthread_t can be translated with td_map_pth2thr()
    to td_thread_t -- compare thread's name of pthread_t and
    td_thread_t.

threads9:
    Asserts that pthread_t can be translated with td_map_pth2thr()
    to td_thread_t -- assert that thread is in the TD_STATE_RUNNING
    state.

All tests are passing.

Sponsored by <The NetBSD Foundation>


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libpthread_dbg/t_threads.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index