]> www.infradead.org Git - mtd-utils.git/commitdiff
mtd: unittests: Use proper unsigned long type for ioctl requests
authorBalint Reczey <balint@balintreczey.hu>
Tue, 6 Feb 2018 20:49:14 +0000 (03:49 +0700)
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>
Wed, 14 Feb 2018 14:25:51 +0000 (15:25 +0100)
This fixes tests on s390x

Signed-off-by: Balint Reczey <balint.reczey@canonical.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
tests/unittests/test_lib.h

index 122672b41b4ff018804dc9fdcf5ee83f5babe528..f5f0f347719fa808cab6dee85a8278cd1a0ed4b3 100644 (file)
@@ -40,7 +40,7 @@ int __wrap_close(int fd)
        return retval;
 }
 
-int __wrap_ioctl(int fd, int req, ...)
+int __wrap_ioctl(int fd, unsigned long req, ...)
 {
        assert_true(fd > 0);
        check_expected(req);
@@ -108,14 +108,14 @@ off_t __wrap_lseek(int fd, off_t seek, int whence)
        } while(0);
 
 #define expect_ioctl(W,X,Y,Z) do { \
-               expect_value(__wrap_ioctl, req, (int)W);\
+               expect_value(__wrap_ioctl, req, W);\
                will_return(__wrap_ioctl, X);\
                will_return(__wrap_ioctl, Y);\
                will_return(__wrap_ioctl, Z);\
        } while(0);
 
 #define expect_ioctl_short(X,Y) do { \
-               expect_value(__wrap_ioctl, req, (int)X);\
+               expect_value(__wrap_ioctl, req, X);\
                will_return(__wrap_ioctl, Y);\
                will_return(__wrap_ioctl, NULL);\
                will_return(__wrap_ioctl, 0);\