Fix the testcase so it works on platforms where _IOC_NONE != 0
Filtering script and expected output file adapted.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15013 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/none/tests/filter_ioctl_moans b/none/tests/filter_ioctl_moans
index b4b8e62..d819b6f 100755
--- a/none/tests/filter_ioctl_moans
+++ b/none/tests/filter_ioctl_moans
@@ -4,5 +4,9 @@
 
 $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"
diff --git a/none/tests/ioctl_moans.c b/none/tests/ioctl_moans.c
index d56e6f7..65fbc02 100644
--- a/none/tests/ioctl_moans.c
+++ b/none/tests/ioctl_moans.c
@@ -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[])
 {
diff --git a/none/tests/ioctl_moans.stderr.exp b/none/tests/ioctl_moans.stderr.exp
index 10bda0b..2a1ac04 100644
--- a/none/tests/ioctl_moans.stderr.exp
+++ b/none/tests/ioctl_moans.stderr.exp
@@ -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.