Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
f27a7153
Commit
f27a7153
authored
May 28, 2007
by
Francois Gouget
Committed by
Alexandre Julliard
May 29, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4/tests: Fix signed/unsigned and 32/64bit issues with the wiredatalen parameter.
parent
2e21d090
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
ndr_marshall.c
dlls/rpcrt4/tests/ndr_marshall.c
+10
-10
No files found.
dlls/rpcrt4/tests/ndr_marshall.c
View file @
f27a7153
...
...
@@ -113,7 +113,7 @@ static void test_pointer_marshal(const unsigned char *formattypes,
void
*
memsrc
,
long
srcsize
,
const
void
*
wiredata
,
long
wiredatalen
,
ULONG
wiredatalen
,
int
(
*
cmp
)(
const
void
*
,
const
void
*
,
size_t
),
long
num_additional_allocs
,
const
char
*
msgpfx
)
...
...
@@ -152,7 +152,7 @@ static void test_pointer_marshal(const unsigned char *formattypes,
ptr
=
NdrPointerMarshall
(
&
StubMsg
,
memsrc
,
formattypes
);
ok
(
ptr
==
NULL
,
"%s: ret %p
\n
"
,
msgpfx
,
ptr
);
ok
(
StubMsg
.
Buffer
-
StubMsg
.
BufferStart
==
wiredatalen
,
"%s: Buffer %p Start %p len %
l
d
\n
"
,
msgpfx
,
StubMsg
.
Buffer
,
StubMsg
.
BufferStart
,
wiredatalen
);
ok
(
StubMsg
.
Buffer
-
StubMsg
.
BufferStart
==
wiredatalen
,
"%s: Buffer %p Start %p len %d
\n
"
,
msgpfx
,
StubMsg
.
Buffer
,
StubMsg
.
BufferStart
,
wiredatalen
);
ok
(
!
memcmp
(
StubMsg
.
BufferStart
,
wiredata
,
wiredatalen
),
"%s: incorrectly marshaled
\n
"
,
msgpfx
);
StubMsg
.
Buffer
=
StubMsg
.
BufferStart
;
...
...
@@ -163,7 +163,7 @@ static void test_pointer_marshal(const unsigned char *formattypes,
/* NdrPointerMemorySize crashes under Wine */
size
=
NdrPointerMemorySize
(
&
StubMsg
,
formattypes
);
ok
(
size
==
StubMsg
.
MemorySize
,
"%s: mem size %u size %u
\n
"
,
msgpfx
,
StubMsg
.
MemorySize
,
size
);
ok
(
StubMsg
.
Buffer
-
StubMsg
.
BufferStart
==
wiredatalen
,
"%s: Buffer %p Start %p len %
l
d
\n
"
,
msgpfx
,
StubMsg
.
Buffer
,
StubMsg
.
BufferStart
,
wiredatalen
);
ok
(
StubMsg
.
Buffer
-
StubMsg
.
BufferStart
==
wiredatalen
,
"%s: Buffer %p Start %p len %d
\n
"
,
msgpfx
,
StubMsg
.
Buffer
,
StubMsg
.
BufferStart
,
wiredatalen
);
if
(
formattypes
[
1
]
&
0x10
/* FC_POINTER_DEREF */
)
ok
(
size
==
srcsize
+
4
,
"%s: mem size %u
\n
"
,
msgpfx
,
size
);
else
...
...
@@ -173,7 +173,7 @@ static void test_pointer_marshal(const unsigned char *formattypes,
StubMsg
.
MemorySize
=
16
;
size
=
NdrPointerMemorySize
(
&
StubMsg
,
formattypes
);
ok
(
size
==
StubMsg
.
MemorySize
,
"%s: mem size %u size %u
\n
"
,
msgpfx
,
StubMsg
.
MemorySize
,
size
);
ok
(
StubMsg
.
Buffer
-
StubMsg
.
BufferStart
==
wiredatalen
,
"%s: Buffer %p Start %p len %
l
d
\n
"
,
msgpfx
,
StubMsg
.
Buffer
,
StubMsg
.
BufferStart
,
wiredatalen
);
ok
(
StubMsg
.
Buffer
-
StubMsg
.
BufferStart
==
wiredatalen
,
"%s: Buffer %p Start %p len %d
\n
"
,
msgpfx
,
StubMsg
.
Buffer
,
StubMsg
.
BufferStart
,
wiredatalen
);
if
(
formattypes
[
1
]
&
0x10
/* FC_POINTER_DEREF */
)
ok
(
size
==
srcsize
+
4
+
16
,
"%s: mem size %u
\n
"
,
msgpfx
,
size
);
else
...
...
@@ -183,7 +183,7 @@ static void test_pointer_marshal(const unsigned char *formattypes,
StubMsg
.
MemorySize
=
1
;
size
=
NdrPointerMemorySize
(
&
StubMsg
,
formattypes
);
ok
(
size
==
StubMsg
.
MemorySize
,
"%s: mem size %u size %u
\n
"
,
msgpfx
,
StubMsg
.
MemorySize
,
size
);
ok
(
StubMsg
.
Buffer
-
StubMsg
.
BufferStart
==
wiredatalen
,
"%s: Buffer %p Start %p len %
l
d
\n
"
,
msgpfx
,
StubMsg
.
Buffer
,
StubMsg
.
BufferStart
,
wiredatalen
);
ok
(
StubMsg
.
Buffer
-
StubMsg
.
BufferStart
==
wiredatalen
,
"%s: Buffer %p Start %p len %d
\n
"
,
msgpfx
,
StubMsg
.
Buffer
,
StubMsg
.
BufferStart
,
wiredatalen
);
if
(
formattypes
[
1
]
&
0x10
/* FC_POINTER_DEREF */
)
ok
(
size
==
srcsize
+
4
+
(
srcsize
==
8
?
8
:
4
),
"%s: mem size %u
\n
"
,
msgpfx
,
size
);
else
...
...
@@ -203,7 +203,7 @@ static void test_pointer_marshal(const unsigned char *formattypes,
ok
(
ptr
==
NULL
,
"%s: ret %p
\n
"
,
msgpfx
,
ptr
);
ok
(
mem
==
mem_orig
,
"%s: mem has changed %p %p
\n
"
,
msgpfx
,
mem
,
mem_orig
);
ok
(
!
cmp
(
mem
,
memsrc
,
srcsize
),
"%s: incorrectly unmarshaled
\n
"
,
msgpfx
);
ok
(
StubMsg
.
Buffer
-
StubMsg
.
BufferStart
==
wiredatalen
,
"%s: Buffer %p Start %p len %
l
d
\n
"
,
msgpfx
,
StubMsg
.
Buffer
,
StubMsg
.
BufferStart
,
wiredatalen
);
ok
(
StubMsg
.
Buffer
-
StubMsg
.
BufferStart
==
wiredatalen
,
"%s: Buffer %p Start %p len %d
\n
"
,
msgpfx
,
StubMsg
.
Buffer
,
StubMsg
.
BufferStart
,
wiredatalen
);
ok
(
StubMsg
.
MemorySize
==
0
,
"%s: memorysize %d
\n
"
,
msgpfx
,
StubMsg
.
MemorySize
);
ok
(
my_alloc_called
==
num_additional_allocs
,
"%s: my_alloc got called %d times
\n
"
,
msgpfx
,
my_alloc_called
);
my_alloc_called
=
0
;
...
...
@@ -219,7 +219,7 @@ todo_wine {
ok
(
mem
==
mem_orig
,
"%s: mem has changed %p %p
\n
"
,
msgpfx
,
mem
,
mem_orig
);
}
ok
(
!
cmp
(
mem
,
memsrc
,
srcsize
),
"%s: incorrectly unmarshaled
\n
"
,
msgpfx
);
ok
(
StubMsg
.
Buffer
-
StubMsg
.
BufferStart
==
wiredatalen
,
"%s: Buffer %p Start %p len %
l
d
\n
"
,
msgpfx
,
StubMsg
.
Buffer
,
StubMsg
.
BufferStart
,
wiredatalen
);
ok
(
StubMsg
.
Buffer
-
StubMsg
.
BufferStart
==
wiredatalen
,
"%s: Buffer %p Start %p len %d
\n
"
,
msgpfx
,
StubMsg
.
Buffer
,
StubMsg
.
BufferStart
,
wiredatalen
);
ok
(
StubMsg
.
MemorySize
==
0
,
"%s: memorysize %d
\n
"
,
msgpfx
,
StubMsg
.
MemorySize
);
todo_wine
{
...
...
@@ -235,7 +235,7 @@ todo_wine {
ok
(
ptr
==
NULL
,
"%s: ret %p
\n
"
,
msgpfx
,
ptr
);
ok
(
mem
!=
StubMsg
.
BufferStart
+
wiredatalen
-
srcsize
,
"%s: mem points to buffer %p %p
\n
"
,
msgpfx
,
mem
,
StubMsg
.
BufferStart
);
ok
(
!
cmp
(
mem
,
memsrc
,
size
),
"%s: incorrectly unmarshaled
\n
"
,
msgpfx
);
ok
(
StubMsg
.
Buffer
-
StubMsg
.
BufferStart
==
wiredatalen
,
"%s: Buffer %p Start %p len %
l
d
\n
"
,
msgpfx
,
StubMsg
.
Buffer
,
StubMsg
.
BufferStart
,
wiredatalen
);
ok
(
StubMsg
.
Buffer
-
StubMsg
.
BufferStart
==
wiredatalen
,
"%s: Buffer %p Start %p len %d
\n
"
,
msgpfx
,
StubMsg
.
Buffer
,
StubMsg
.
BufferStart
,
wiredatalen
);
ok
(
StubMsg
.
MemorySize
==
0
,
"%s: memorysize %d
\n
"
,
msgpfx
,
StubMsg
.
MemorySize
);
ok
(
my_alloc_called
==
num_additional_allocs
+
1
,
"%s: my_alloc got called %d times
\n
"
,
msgpfx
,
my_alloc_called
);
my_alloc_called
=
0
;
...
...
@@ -251,7 +251,7 @@ todo_wine {
ok
(
mem
==
StubMsg
.
BufferStart
+
wiredatalen
-
srcsize
,
"%s: mem doesn't point to buffer %p %p
\n
"
,
msgpfx
,
mem
,
StubMsg
.
BufferStart
);
}
ok
(
!
cmp
(
mem
,
memsrc
,
size
),
"%s: incorrecly unmarshaled
\n
"
,
msgpfx
);
ok
(
StubMsg
.
Buffer
-
StubMsg
.
BufferStart
==
wiredatalen
,
"%s: Buffer %p Start %p len %
l
d
\n
"
,
msgpfx
,
StubMsg
.
Buffer
,
StubMsg
.
BufferStart
,
wiredatalen
);
ok
(
StubMsg
.
Buffer
-
StubMsg
.
BufferStart
==
wiredatalen
,
"%s: Buffer %p Start %p len %d
\n
"
,
msgpfx
,
StubMsg
.
Buffer
,
StubMsg
.
BufferStart
,
wiredatalen
);
ok
(
StubMsg
.
MemorySize
==
0
,
"%s: memorysize %d
\n
"
,
msgpfx
,
StubMsg
.
MemorySize
);
todo_wine
{
ok
(
my_alloc_called
==
num_additional_allocs
,
"%s: my_alloc got called %d times
\n
"
,
msgpfx
,
my_alloc_called
);
...
...
@@ -454,7 +454,7 @@ static void test_simple_struct_marshal(const unsigned char *formattypes,
void
*
memsrc
,
long
srcsize
,
const
void
*
wiredata
,
long
wiredatalen
,
ULONG
wiredatalen
,
int
(
*
cmp
)(
const
void
*
,
const
void
*
,
size_t
),
long
num_additional_allocs
,
const
char
*
msgpfx
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment