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:
Depends on:
Reported: 2020-01-20 17:35 UTC by Bastien Nocera
Modified: 2020-01-20 17:35 UTC (History)
0 users

See Also:


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) { 
                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.