summaryrefslogtreecommitdiff
path: root/test/dm/misc.c
Commit message (Collapse)AuthorAgeFilesLines
* dm: Rename DM test flags to make them more genericSimon Glass2020-08-071-1/+1
| | | | | | | | | | The test flags used by driver model are currently not available to other tests. Rather than creating two sets of flags, make these flags generic by changing the DM_ prefix to UT_ and moving them to the test.h header. This will allow adding other test flags without confusion. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: core: Drop header files from dm/test.hSimon Glass2020-08-031-0/+1
| | | | | | | | These header file should not be included in other header files. Remove them and add to each individual file. Add test/test.h to test/ui.h since that is a reasonable place. Signed-off-by: Simon Glass <sjg@chromium.org>
* test: Use ut_asserteq_mem() where possibleSimon Glass2020-05-191-5/+5
| | | | | | | | | | Quite a few tests still use ut_assertok(memcmp(...)) and variants. Modify them to use the macro designed for this purpose. Suggested-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
* misc: Update read() and write() methods to return bytes xferedSimon Glass2018-11-201-3/+3
| | | | | | | | | | | At present these functions return 0 on success. For some devices we want to know how many bytes were transferred. It seems useful to adjust the API to be more like the POSIX read() and write() functions. Update these two methods, a test and all users. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
* test: Add tests for misc uclassMario Six2018-08-111-0/+83
Add a set of tests for the misc uclass. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org>