808706d3a2
This implements a test app, testglxmakecurrent, which verifies the correctness of the API library's GL dispatching when a vendor's context is current in one or more threads. This test spawns a given number of threads each with their own separate context and window, and has each thread make current to its given context. The thread then calls some core GL functions and (to-be-implemented) a GL extension function, glMakeCurrentTestResults(), which returns the number of times each core GL function was called. The test then compares glMakeCurrentTestResults()'s result (which should match up with the vendor library's call count) to the application's call count and fails if there is a mismatch. The test is designed to only require pthreads if multiple threads are used. This verifies that the API library's single-threaded fake pthread wrapper functions work properly. Add testglxmc{basic,late,loop,threads}.sh scripts, which run the testglxmakecurrent test with different arguments for ordering of glXGetProcAddress(), number of threads, and number of iterations. Isolate helper functions for window creation/destruction to a separate test_utils.c source file which will be used by later tests.
10 lines
262 B
Bash
Executable file
10 lines
262 B
Bash
Executable file
#!/bin/bash
|
|
|
|
export __GLX_VENDOR_LIBRARY_NAME=dummy
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TOP_BUILDDIR/tests/GLX_dummy/.libs
|
|
|
|
|
|
# Run the make current test exactly once, but with GetProcAddress() called
|
|
# after MakeCurrent().
|
|
./testglxmakecurrent -t 1 -i 1 -l
|