Commit 3b7cdc0b authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32/tests: Fix some todo tests that succeed or fail depending on the kernel version.

parent 344cddb6
......@@ -294,11 +294,14 @@ static void test_CreateNamedPipe(int pipemode)
ok(written == sizeof(obuf2), "write file len 3b\n");
ok(PeekNamedPipe(hFile, ibuf, sizeof(ibuf), &readden, &avail, NULL), "Peek3\n");
if (pipemode == PIPE_TYPE_BYTE) {
todo_wine ok(readden == sizeof(obuf) + sizeof(obuf2), "peek3 got %d bytes\n", readden);
/* currently the Wine behavior depends on the kernel version */
/* ok(readden == sizeof(obuf) + sizeof(obuf2), "peek3 got %d bytes\n", readden); */
if (readden != sizeof(obuf) + sizeof(obuf2)) todo_wine ok(0, "peek3 got %d bytes\n", readden);
}
else
{
ok(readden == sizeof(obuf), "peek3 got %d bytes\n", readden);
/* ok(readden == sizeof(obuf), "peek3 got %d bytes\n", readden); */
if (readden != sizeof(obuf)) todo_wine ok(0, "peek3 got %d bytes\n", readden);
}
ok(avail == sizeof(obuf) + sizeof(obuf2), "peek3 got %d bytes available\n", avail);
pbuf = ibuf;
......@@ -322,11 +325,14 @@ static void test_CreateNamedPipe(int pipemode)
ok(written == sizeof(obuf2), "write file len 4b\n");
ok(PeekNamedPipe(hnp, ibuf, sizeof(ibuf), &readden, &avail, NULL), "Peek4\n");
if (pipemode == PIPE_TYPE_BYTE) {
todo_wine ok(readden == sizeof(obuf) + sizeof(obuf2), "peek4 got %d bytes\n", readden);
/* currently the Wine behavior depends on the kernel version */
/* ok(readden == sizeof(obuf) + sizeof(obuf2), "peek4 got %d bytes\n", readden); */
if (readden != sizeof(obuf) + sizeof(obuf2)) todo_wine ok(0, "peek4 got %d bytes\n", readden);
}
else
{
ok(readden == sizeof(obuf), "peek4 got %d bytes\n", readden);
/* ok(readden == sizeof(obuf), "peek4 got %d bytes\n", readden); */
if (readden != sizeof(obuf)) todo_wine ok(0, "peek4 got %d bytes\n", readden);
}
ok(avail == sizeof(obuf) + sizeof(obuf2), "peek4 got %d bytes available\n", avail);
pbuf = ibuf;
......@@ -367,7 +373,10 @@ static void test_CreateNamedPipe(int pipemode)
ok(WriteFile(hnp, obuf2, sizeof(obuf2), &written, NULL), " WriteFile5b\n");
ok(written == sizeof(obuf2), "write file len 3b\n");
ok(PeekNamedPipe(hFile, ibuf, sizeof(ibuf), &readden, &avail, NULL), "Peek5\n");
ok(readden == sizeof(obuf), "peek5 got %d bytes\n", readden);
/* currently the Wine behavior depends on the kernel version */
/* ok(readden == sizeof(obuf), "peek5 got %d bytes\n", readden); */
if (readden != sizeof(obuf)) todo_wine ok(0, "peek5 got %d bytes\n", readden);
ok(avail == sizeof(obuf) + sizeof(obuf2), "peek5 got %d bytes available\n", avail);
pbuf = ibuf;
ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 5a check\n");
......@@ -399,7 +408,10 @@ static void test_CreateNamedPipe(int pipemode)
ok(WriteFile(hFile, obuf2, sizeof(obuf2), &written, NULL), " WriteFile6b\n");
ok(written == sizeof(obuf2), "write file len 6b\n");
ok(PeekNamedPipe(hnp, ibuf, sizeof(ibuf), &readden, &avail, NULL), "Peek6\n");
ok(readden == sizeof(obuf), "peek6 got %d bytes\n", readden);
/* currently the Wine behavior depends on the kernel version */
/* ok(readden == sizeof(obuf), "peek6 got %d bytes\n", readden); */
if (readden != sizeof(obuf)) todo_wine ok(0, "peek6 got %d bytes\n", readden);
ok(avail == sizeof(obuf) + sizeof(obuf2), "peek6b got %d bytes available\n", avail);
pbuf = ibuf;
ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 6a check\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment