From: Florian Krohm Date: Sat, 14 Mar 2015 15:54:05 +0000 (+0000) Subject: Fix the testcase so it works on platforms where _IOC_NONE != 0 X-Git-Tag: svn/VALGRIND_3_11_0~579 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35b966c09e306c697ff731cb3c96f44a0b438fa4;p=thirdparty%2Fvalgrind.git 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 --- diff --git a/none/tests/filter_ioctl_moans b/none/tests/filter_ioctl_moans index b4b8e62493..d819b6f2f4 100755 --- a/none/tests/filter_ioctl_moans +++ b/none/tests/filter_ioctl_moans @@ -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" diff --git a/none/tests/ioctl_moans.c b/none/tests/ioctl_moans.c index d56e6f7a3c..65fbc02e1e 100644 --- a/none/tests/ioctl_moans.c +++ b/none/tests/ioctl_moans.c @@ -4,8 +4,11 @@ #include -/* 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 10bda0b4b0..2a1ac04ce1 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.