[PATCH 00/12] firmware: cirrus: Add KUnit tests for cs_dsp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



This series adds KUnit tests for the cs_dsp module.

Most of the functionality in cs_dsp is for downloading firmware to
DSP memory and interacting with "control" words defined in that
memory. This doesn't require any emulation of running firmware,
because it is only reading and writing registers. So the testing can
be done using a dummy regmap. The way this is used to perform testing
is described in more detail in the commit message for each test.

ADSP1 is not tested because this was only used by the WM2200 codec,
a long-obsolete part that was discontinued in 2015.

Richard Fitzgerald (12):
  firmware: cs_dsp: Add mock regmap for KUnit testing
  firmware: cs_dsp: Add mock DSP memory map for KUnit testing
  firmware: cs_dsp: Add mock wmfw file generator for KUnit testing
  firmware: cs_dsp: Add mock bin file generator for KUnit testing
  firmware: cs_dsp: Add KUnit testing of bin file download
  firmware: cs_dsp: Add KUnit testing of wmfw download
  firmware: cs_dsp: Add KUnit testing of control parsing
  firmware: cs_dsp: Add KUnit testing of control cache
  firmware: cs_dsp: Add KUnit testing of control read/write
  firmware: cs_dsp: Add KUnit testing of bin error cases
  firmware: cs_dsp: Add KUnit testing of wmfw error cases
  firmware: cs_dsp: Add KUnit testing of client callbacks

 MAINTAINERS                                   |    4 +-
 drivers/firmware/cirrus/Kconfig               |   20 +
 drivers/firmware/cirrus/Makefile              |    2 +
 drivers/firmware/cirrus/test/Makefile         |   23 +
 .../firmware/cirrus/test/cs_dsp_mock_bin.c    |  199 +
 .../cirrus/test/cs_dsp_mock_mem_maps.c        |  751 ++++
 .../firmware/cirrus/test/cs_dsp_mock_regmap.c |  367 ++
 .../firmware/cirrus/test/cs_dsp_mock_utils.c  |   13 +
 .../firmware/cirrus/test/cs_dsp_mock_wmfw.c   |  473 +++
 .../firmware/cirrus/test/cs_dsp_test_bin.c    | 2557 +++++++++++++
 .../cirrus/test/cs_dsp_test_bin_error.c       |  600 +++
 .../cirrus/test/cs_dsp_test_callbacks.c       |  688 ++++
 .../cirrus/test/cs_dsp_test_control_cache.c   | 3282 +++++++++++++++++
 .../cirrus/test/cs_dsp_test_control_parse.c   | 1851 ++++++++++
 .../cirrus/test/cs_dsp_test_control_rw.c      | 2669 ++++++++++++++
 .../firmware/cirrus/test/cs_dsp_test_wmfw.c   | 2211 +++++++++++
 .../cirrus/test/cs_dsp_test_wmfw_error.c      | 1347 +++++++
 drivers/firmware/cirrus/test/cs_dsp_tests.c   |   14 +
 .../linux/firmware/cirrus/cs_dsp_test_utils.h |  160 +
 19 files changed, 17229 insertions(+), 2 deletions(-)
 create mode 100644 drivers/firmware/cirrus/test/Makefile
 create mode 100644 drivers/firmware/cirrus/test/cs_dsp_mock_bin.c
 create mode 100644 drivers/firmware/cirrus/test/cs_dsp_mock_mem_maps.c
 create mode 100644 drivers/firmware/cirrus/test/cs_dsp_mock_regmap.c
 create mode 100644 drivers/firmware/cirrus/test/cs_dsp_mock_utils.c
 create mode 100644 drivers/firmware/cirrus/test/cs_dsp_mock_wmfw.c
 create mode 100644 drivers/firmware/cirrus/test/cs_dsp_test_bin.c
 create mode 100644 drivers/firmware/cirrus/test/cs_dsp_test_bin_error.c
 create mode 100644 drivers/firmware/cirrus/test/cs_dsp_test_callbacks.c
 create mode 100644 drivers/firmware/cirrus/test/cs_dsp_test_control_cache.c
 create mode 100644 drivers/firmware/cirrus/test/cs_dsp_test_control_parse.c
 create mode 100644 drivers/firmware/cirrus/test/cs_dsp_test_control_rw.c
 create mode 100644 drivers/firmware/cirrus/test/cs_dsp_test_wmfw.c
 create mode 100644 drivers/firmware/cirrus/test/cs_dsp_test_wmfw_error.c
 create mode 100644 drivers/firmware/cirrus/test/cs_dsp_tests.c
 create mode 100644 include/linux/firmware/cirrus/cs_dsp_test_utils.h

-- 
2.39.5





[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux