Bug 14243 - pypamtest.run_pamtest doesn't support not having echo_on argument
Summary: pypamtest.run_pamtest doesn't support not having echo_on argument
Status: NEW
Alias: None
Product: cwrap
Classification: Unclassified
Component: library (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Andreas Schneider
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-20 17:35 UTC by Bastien Nocera
Modified: 2020-01-20 17:35 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bastien Nocera 2020-01-20 17:35:31 UTC
Running a test with:
res = pypamtest.run_pamtest("toto", "fprintd-pam-test", [tc])
would fail with a MemoryError
(likely from this chunk of code:
        rc = fill_conv_data(py_echo_off, py_echo_on, &conv_data);
        if (rc != 0) { 
                PyMem_Free(test_list);
                PyErr_NoMemory();
                return NULL;
        }

Passing garbage, when the module tested doesn't need any pam data, such as the fingerprint reader PAM module, works around the problem:
pypamtest.run_pamtest("toto", "fprintd-pam-test", [tc], [ 'unused' ])

Tested using pam_wrapper-1.0.7-3.fc31.x86_64, but the current git seems to behave the same way.