Sort the list of possible plugins before printing it.
This gives more reproducible error messages for the tests.
This commit is contained in:
@@ -453,6 +453,9 @@ _python_plugin_get_class(const char *plugin_path, PyObject *py_module, const cha
|
||||
py_sudo_log(SUDO_CONV_ERROR_MSG, "No plugin class is specified for python module '%s'. "
|
||||
"Use 'ClassName' configuration option in 'sudo.conf'\n", plugin_path);
|
||||
if (py_plugin_list != NULL) {
|
||||
/* Sorting the plugin list makes regress test output consistent. */
|
||||
PyObject *py_obj = PyObject_CallMethod(py_plugin_list, "sort", "");
|
||||
Py_CLEAR(py_obj);
|
||||
char *possible_plugins = py_join_str_list(py_plugin_list, ", ");
|
||||
if (possible_plugins != NULL) {
|
||||
py_sudo_log(SUDO_CONV_ERROR_MSG, "Possible plugins: %s\n", possible_plugins);
|
||||
|
@@ -1,3 +1,3 @@
|
||||
No plugin class is specified for python module 'SRC_DIR/regress/plugin_errorstr.py'. Use 'ClassName' configuration option in 'sudo.conf'
|
||||
Possible plugins: ErrorMsgPlugin, ConstructErrorPlugin
|
||||
Possible plugins: ConstructErrorPlugin, ErrorMsgPlugin
|
||||
Failed during loading plugin class
|
||||
|
Reference in New Issue
Block a user