refactor test_dlfcn_qsort