diff options
author | Balint Reczey <balint@balintreczey.hu> | 2018-02-06 05:31:32 +0700 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2018-02-14 15:52:27 +0100 |
commit | 9c6173559f95e939e66efb2ec3193d6f3618cf69 (patch) | |
tree | 22148a73f24f9205a9be4a245853b68d919fb2d8 /tests/unittests/test_lib.h | |
parent | daef4f155f4b677907f210d93839013204168d02 (diff) |
mtd: unittests: Stop testing stat() calls
Sometimes __xstat is called instead that makes tests fragile.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tests/unittests/test_lib.h')
-rw-r--r-- | tests/unittests/test_lib.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/tests/unittests/test_lib.h b/tests/unittests/test_lib.h index 806a4bc..7a6a003 100644 --- a/tests/unittests/test_lib.h +++ b/tests/unittests/test_lib.h @@ -57,13 +57,6 @@ int __wrap_ioctl(int fd, unsigned long req, ...) return retval; } -int __wrap_stat(const char *path, struct stat *buf) -{ - check_expected(path); - assert_non_null(buf); - return mock_type(int); -} - int __wrap_read(int fd, char *buf, size_t len) { assert_true(fd > 0); @@ -118,11 +111,6 @@ off_t __wrap_lseek(int fd, off_t seek, int whence) will_return(__wrap_ioctl, NULL);\ } while(0); -#define expect_stat(X,Y) do { \ - expect_string(__wrap_stat, path, X);\ - will_return(__wrap_stat, Y);\ - } while(0); - #define expect_write(X,Y,Z) do { \ will_return(__wrap_write, X);\ will_return(__wrap_write, Y);\ |