]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix the testcase so it works on platforms where _IOC_NONE != 0
authorFlorian Krohm <florian@eich-krohm.de>
Sat, 14 Mar 2015 15:54:05 +0000 (15:54 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Sat, 14 Mar 2015 15:54:05 +0000 (15:54 +0000)
Filtering script and expected output file adapted.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15013

none/tests/filter_ioctl_moans
none/tests/ioctl_moans.c
none/tests/ioctl_moans.stderr.exp

index b4b8e624935e15f9bc7d386de1d88098363cf0db..d819b6f2f4671bd2fb0931a38e9b0bc8f3445e53 100755 (executable)
@@ -4,5 +4,9 @@ dir=`dirname $0`
 
 $dir/../../tests/filter_stderr_basic |
 
+# Filter out differences in the ioctls because IOC_NONE is
+# not == 0 on all platforms.
+sed 's/0x[13]/0x./' |
+
 # Remove "Nulgrind, ..." line and the following copyright line.
 sed "/^Nulgrind, the minimal Valgrind tool/ , /./ d"
index d56e6f7a3c366271ff66eb9a0aae7b489955811d..65fbc02e1ea566145aac1f48be0fc6d8f193bc52 100644 (file)
@@ -4,8 +4,11 @@
 
 #include <sys/ioctl.h>
 
-/* An ioctl request for a strange ioctl device driver. */
-#define IOCTL_REQUEST_BASE 0x12345670
+/* An ioctl request for a strange ioctl device driver.
+   The choice of values here needs to match the logic in
+   ML_(PRE_unknown_ioctl) and take into account that _IOC_NONE
+   is not == 0 everywhere. */
+#define IOCTL_REQUEST_BASE (0x12345670 | _IOC(_IOC_NONE,0,0,0))
 
 int main(int argc, const char *argv[])
 {
index 10bda0b4b0c0f0742ffae1cbdcc405921a327919..2a1ac04ce10bef0507c61716a373932e78b0ab8c 100644 (file)
@@ -1,30 +1,30 @@
-Warning: noted but unhandled ioctl 0x12345670 with no size/direction hints.
+Warning: noted but unhandled ioctl 0x.2345670 with no size/direction hints.
    This could cause spurious value errors to appear.
    See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
-Warning: noted but unhandled ioctl 0x12345671 with no size/direction hints.
+Warning: noted but unhandled ioctl 0x.2345671 with no size/direction hints.
    This could cause spurious value errors to appear.
    See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
-Warning: noted but unhandled ioctl 0x12345672 with no size/direction hints.
+Warning: noted but unhandled ioctl 0x.2345672 with no size/direction hints.
    This could cause spurious value errors to appear.
    See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
-Warning: noted but unhandled ioctl 0x12345673 with no size/direction hints.
+Warning: noted but unhandled ioctl 0x.2345673 with no size/direction hints.
    This could cause spurious value errors to appear.
    See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
-Warning: noted but unhandled ioctl 0x12345674 with no size/direction hints.
+Warning: noted but unhandled ioctl 0x.2345674 with no size/direction hints.
    This could cause spurious value errors to appear.
    See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
-Warning: noted but unhandled ioctl 0x12345675 with no size/direction hints.
+Warning: noted but unhandled ioctl 0x.2345675 with no size/direction hints.
    This could cause spurious value errors to appear.
    See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
-Warning: noted but unhandled ioctl 0x12345676 with no size/direction hints.
+Warning: noted but unhandled ioctl 0x.2345676 with no size/direction hints.
    This could cause spurious value errors to appear.
    See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
-Warning: noted but unhandled ioctl 0x12345677 with no size/direction hints.
+Warning: noted but unhandled ioctl 0x.2345677 with no size/direction hints.
    This could cause spurious value errors to appear.
    See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
-Warning: noted but unhandled ioctl 0x12345678 with no size/direction hints.
+Warning: noted but unhandled ioctl 0x.2345678 with no size/direction hints.
    This could cause spurious value errors to appear.
    See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
-Warning: noted but unhandled ioctl 0x12345679 with no size/direction hints.
+Warning: noted but unhandled ioctl 0x.2345679 with no size/direction hints.
    This could cause spurious value errors to appear.
    See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.