Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
34c2e56d
Commit
34c2e56d
authored
Feb 28, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetmib1/tests: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fb077b48
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
30 deletions
+29
-30
Makefile.in
dlls/inetmib1/tests/Makefile.in
+0
-1
main.c
dlls/inetmib1/tests/main.c
+29
-29
No files found.
dlls/inetmib1/tests/Makefile.in
View file @
34c2e56d
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
inetmib1.dll
TESTDLL
=
inetmib1.dll
IMPORTS
=
snmpapi
IMPORTS
=
snmpapi
...
...
dlls/inetmib1/tests/main.c
View file @
34c2e56d
...
@@ -65,7 +65,7 @@ if (0) /* crashes on native */
...
@@ -65,7 +65,7 @@ if (0) /* crashes on native */
}
}
ret
=
pSnmpExtensionInit
(
0
,
&
event
,
&
oid
);
ret
=
pSnmpExtensionInit
(
0
,
&
event
,
&
oid
);
ok
(
ret
,
"SnmpExtensionInit failed: %d
\n
"
,
GetLastError
());
ok
(
ret
,
"SnmpExtensionInit failed: %
l
d
\n
"
,
GetLastError
());
ok
(
!
strcmp
(
"1.3.6.1.2.1.1"
,
SnmpUtilOidToA
(
&
oid
)),
ok
(
!
strcmp
(
"1.3.6.1.2.1.1"
,
SnmpUtilOidToA
(
&
oid
)),
"Expected 1.3.6.1.2.1.1, got %s
\n
"
,
SnmpUtilOidToA
(
&
oid
));
"Expected 1.3.6.1.2.1.1, got %s
\n
"
,
SnmpUtilOidToA
(
&
oid
));
...
@@ -115,10 +115,10 @@ if (0) /* crashes on native */
...
@@ -115,10 +115,10 @@ if (0) /* crashes on native */
error
=
0xdeadbeef
;
error
=
0xdeadbeef
;
index
=
0xdeadbeef
;
index
=
0xdeadbeef
;
ret
=
pSnmpExtensionQuery
(
SNMP_PDU_GET
,
&
list
,
&
error
,
&
index
);
ret
=
pSnmpExtensionQuery
(
SNMP_PDU_GET
,
&
list
,
&
error
,
&
index
);
ok
(
ret
,
"SnmpExtensionQuery failed: %
d, %
d
\n
"
,
error
,
index
);
ok
(
ret
,
"SnmpExtensionQuery failed: %
ld, %l
d
\n
"
,
error
,
index
);
ok
(
error
==
SNMP_ERRORSTATUS_NOERROR
,
ok
(
error
==
SNMP_ERRORSTATUS_NOERROR
,
"expected SNMP_ERRORSTATUS_NOERROR, got %d
\n
"
,
error
);
"expected SNMP_ERRORSTATUS_NOERROR, got %
l
d
\n
"
,
error
);
ok
(
index
==
0
,
"expected index 0, got %d
\n
"
,
index
);
ok
(
index
==
0
,
"expected index 0, got %
l
d
\n
"
,
index
);
/* Oddly enough, this "succeeds," even though the OID is clearly
/* Oddly enough, this "succeeds," even though the OID is clearly
* unsupported.
* unsupported.
...
@@ -132,15 +132,15 @@ if (0) /* crashes on native */
...
@@ -132,15 +132,15 @@ if (0) /* crashes on native */
error
=
0xdeadbeef
;
error
=
0xdeadbeef
;
index
=
0xdeadbeef
;
index
=
0xdeadbeef
;
ret
=
pSnmpExtensionQuery
(
SNMP_PDU_GET
,
&
list
,
&
error
,
&
index
);
ret
=
pSnmpExtensionQuery
(
SNMP_PDU_GET
,
&
list
,
&
error
,
&
index
);
ok
(
ret
,
"SnmpExtensionQuery failed: %
d, %
d
\n
"
,
error
,
index
);
ok
(
ret
,
"SnmpExtensionQuery failed: %
ld, %l
d
\n
"
,
error
,
index
);
ok
(
error
==
SNMP_ERRORSTATUS_NOERROR
||
ok
(
error
==
SNMP_ERRORSTATUS_NOERROR
||
broken
(
error
==
ERROR_FILE_NOT_FOUND
)
/* NT4 */
,
broken
(
error
==
ERROR_FILE_NOT_FOUND
)
/* NT4 */
,
"expected SNMP_ERRORSTATUS_NOERROR or ERROR_FILE_NOT_FOUND, got %d
\n
"
,
"expected SNMP_ERRORSTATUS_NOERROR or ERROR_FILE_NOT_FOUND, got %
l
d
\n
"
,
error
);
error
);
if
(
error
==
SNMP_ERRORSTATUS_NOERROR
)
if
(
error
==
SNMP_ERRORSTATUS_NOERROR
)
ok
(
index
==
0
,
"expected index 0, got %d
\n
"
,
index
);
ok
(
index
==
0
,
"expected index 0, got %
l
d
\n
"
,
index
);
else
if
(
error
==
ERROR_FILE_NOT_FOUND
)
else
if
(
error
==
ERROR_FILE_NOT_FOUND
)
ok
(
index
==
1
,
"expected index 1, got %d
\n
"
,
index
);
ok
(
index
==
1
,
"expected index 1, got %
l
d
\n
"
,
index
);
/* The OID isn't changed either: */
/* The OID isn't changed either: */
ok
(
!
strcmp
(
"1.2.3.4"
,
SnmpUtilOidToA
(
&
vars
[
0
].
name
)),
ok
(
!
strcmp
(
"1.2.3.4"
,
SnmpUtilOidToA
(
&
vars
[
0
].
name
)),
"expected 1.2.3.4, got %s
\n
"
,
SnmpUtilOidToA
(
&
vars
[
0
].
name
));
"expected 1.2.3.4, got %s
\n
"
,
SnmpUtilOidToA
(
&
vars
[
0
].
name
));
...
@@ -152,11 +152,11 @@ if (0) /* crashes on native */
...
@@ -152,11 +152,11 @@ if (0) /* crashes on native */
error
=
0xdeadbeef
;
error
=
0xdeadbeef
;
index
=
0xdeadbeef
;
index
=
0xdeadbeef
;
ret
=
pSnmpExtensionQuery
(
SNMP_PDU_GET
,
&
list
,
&
error
,
&
index
);
ret
=
pSnmpExtensionQuery
(
SNMP_PDU_GET
,
&
list
,
&
error
,
&
index
);
ok
(
ret
,
"SnmpExtensionQuery failed: %
d, %
d
\n
"
,
error
,
index
);
ok
(
ret
,
"SnmpExtensionQuery failed: %
ld, %l
d
\n
"
,
error
,
index
);
ok
(
error
==
SNMP_ERRORSTATUS_NOSUCHNAME
,
ok
(
error
==
SNMP_ERRORSTATUS_NOSUCHNAME
,
"expected SNMP_ERRORSTATUS_NOSUCHNAME, got %d
\n
"
,
error
);
"expected SNMP_ERRORSTATUS_NOSUCHNAME, got %
l
d
\n
"
,
error
);
/* The index is 1-based rather than 0-based */
/* The index is 1-based rather than 0-based */
ok
(
index
==
1
,
"expected index 1, got %d
\n
"
,
index
);
ok
(
index
==
1
,
"expected index 1, got %
l
d
\n
"
,
index
);
/* A Get fails on something that specifies a table (but not a particular
/* A Get fails on something that specifies a table (but not a particular
* entry in it)...
* entry in it)...
...
@@ -172,10 +172,10 @@ if (0) /* crashes on native */
...
@@ -172,10 +172,10 @@ if (0) /* crashes on native */
error
=
0xdeadbeef
;
error
=
0xdeadbeef
;
index
=
0xdeadbeef
;
index
=
0xdeadbeef
;
ret
=
pSnmpExtensionQuery
(
SNMP_PDU_GET
,
&
list
,
&
error
,
&
index
);
ret
=
pSnmpExtensionQuery
(
SNMP_PDU_GET
,
&
list
,
&
error
,
&
index
);
ok
(
ret
,
"SnmpExtensionQuery failed: %
d, %
d
\n
"
,
error
,
index
);
ok
(
ret
,
"SnmpExtensionQuery failed: %
ld, %l
d
\n
"
,
error
,
index
);
ok
(
error
==
SNMP_ERRORSTATUS_NOSUCHNAME
,
ok
(
error
==
SNMP_ERRORSTATUS_NOSUCHNAME
,
"expected SNMP_ERRORSTATUS_NOSUCHNAME, got %d
\n
"
,
error
);
"expected SNMP_ERRORSTATUS_NOSUCHNAME, got %
l
d
\n
"
,
error
);
ok
(
index
==
1
,
"expected index 1, got %d
\n
"
,
index
);
ok
(
index
==
1
,
"expected index 1, got %
l
d
\n
"
,
index
);
/* but a GetNext succeeds with the same values, because GetNext gets the
/* but a GetNext succeeds with the same values, because GetNext gets the
* entry after the specified OID, not the entry specified by it. The
* entry after the specified OID, not the entry specified by it. The
* successor to the table is the first entry in the table.
* successor to the table is the first entry in the table.
...
@@ -194,10 +194,10 @@ if (0) /* crashes on native */
...
@@ -194,10 +194,10 @@ if (0) /* crashes on native */
error
=
0xdeadbeef
;
error
=
0xdeadbeef
;
index
=
0xdeadbeef
;
index
=
0xdeadbeef
;
ret
=
pSnmpExtensionQuery
(
SNMP_PDU_GETNEXT
,
&
list
,
&
error
,
&
index
);
ret
=
pSnmpExtensionQuery
(
SNMP_PDU_GETNEXT
,
&
list
,
&
error
,
&
index
);
ok
(
ret
,
"SnmpExtensionQuery failed: %
d, %
d
\n
"
,
error
,
index
);
ok
(
ret
,
"SnmpExtensionQuery failed: %
ld, %l
d
\n
"
,
error
,
index
);
ok
(
error
==
SNMP_ERRORSTATUS_NOERROR
,
ok
(
error
==
SNMP_ERRORSTATUS_NOERROR
,
"expected SNMP_ERRORSTATUS_NOERROR, got %d
\n
"
,
error
);
"expected SNMP_ERRORSTATUS_NOERROR, got %
l
d
\n
"
,
error
);
ok
(
index
==
0
,
"expected index 0, got %d
\n
"
,
index
);
ok
(
index
==
0
,
"expected index 0, got %
l
d
\n
"
,
index
);
if
(
!
ret
)
if
(
!
ret
)
moreData
=
FALSE
;
moreData
=
FALSE
;
else
if
(
error
)
else
if
(
error
)
...
@@ -276,10 +276,10 @@ if (0) /* crashes on native */
...
@@ -276,10 +276,10 @@ if (0) /* crashes on native */
list
.
list
=
vars2
;
list
.
list
=
vars2
;
noChange
=
FALSE
;
noChange
=
FALSE
;
ret
=
pSnmpExtensionQuery
(
SNMP_PDU_GETNEXT
,
&
list
,
&
error
,
&
index
);
ret
=
pSnmpExtensionQuery
(
SNMP_PDU_GETNEXT
,
&
list
,
&
error
,
&
index
);
ok
(
ret
,
"SnmpExtensionQuery failed: %
d, %
d
\n
"
,
error
,
index
);
ok
(
ret
,
"SnmpExtensionQuery failed: %
ld, %l
d
\n
"
,
error
,
index
);
ok
(
error
==
SNMP_ERRORSTATUS_NOERROR
,
ok
(
error
==
SNMP_ERRORSTATUS_NOERROR
,
"expected SNMP_ERRORSTATUS_NOERROR, got %d
\n
"
,
error
);
"expected SNMP_ERRORSTATUS_NOERROR, got %
l
d
\n
"
,
error
);
ok
(
index
==
0
,
"expected index 0, got %d
\n
"
,
index
);
ok
(
index
==
0
,
"expected index 0, got %
l
d
\n
"
,
index
);
vars3
[
0
].
name
.
idLength
=
ARRAY_SIZE
(
mib2If
);
vars3
[
0
].
name
.
idLength
=
ARRAY_SIZE
(
mib2If
);
vars3
[
0
].
name
.
ids
=
mib2If
;
vars3
[
0
].
name
.
ids
=
mib2If
;
ok
(
!
SnmpUtilOidNCmp
(
&
vars2
[
0
].
name
,
&
vars
[
0
].
name
,
vars
[
0
].
name
.
idLength
)
||
ok
(
!
SnmpUtilOidNCmp
(
&
vars2
[
0
].
name
,
&
vars
[
0
].
name
,
vars
[
0
].
name
.
idLength
)
||
...
@@ -298,10 +298,10 @@ if (0) /* crashes on native */
...
@@ -298,10 +298,10 @@ if (0) /* crashes on native */
moreData
=
TRUE
;
moreData
=
TRUE
;
do
{
do
{
ret
=
pSnmpExtensionQuery
(
SNMP_PDU_GETNEXT
,
&
list
,
&
error
,
&
index
);
ret
=
pSnmpExtensionQuery
(
SNMP_PDU_GETNEXT
,
&
list
,
&
error
,
&
index
);
ok
(
ret
,
"SnmpExtensionQuery failed: %
d, %
d
\n
"
,
error
,
index
);
ok
(
ret
,
"SnmpExtensionQuery failed: %
ld, %l
d
\n
"
,
error
,
index
);
ok
(
error
==
SNMP_ERRORSTATUS_NOERROR
,
ok
(
error
==
SNMP_ERRORSTATUS_NOERROR
,
"expected SNMP_ERRORSTATUS_NOERROR, got %d
\n
"
,
error
);
"expected SNMP_ERRORSTATUS_NOERROR, got %
l
d
\n
"
,
error
);
ok
(
index
==
0
,
"expected index 0, got %d
\n
"
,
index
);
ok
(
index
==
0
,
"expected index 0, got %
l
d
\n
"
,
index
);
if
(
!
ret
)
if
(
!
ret
)
moreData
=
FALSE
;
moreData
=
FALSE
;
else
if
(
error
)
else
if
(
error
)
...
@@ -364,10 +364,10 @@ if (0) /* crashes on native */
...
@@ -364,10 +364,10 @@ if (0) /* crashes on native */
noChange
=
FALSE
;
noChange
=
FALSE
;
do
{
do
{
ret
=
pSnmpExtensionQuery
(
SNMP_PDU_GETNEXT
,
&
list
,
&
error
,
&
index
);
ret
=
pSnmpExtensionQuery
(
SNMP_PDU_GETNEXT
,
&
list
,
&
error
,
&
index
);
ok
(
ret
,
"SnmpExtensionQuery failed: %
d, %
d
\n
"
,
error
,
index
);
ok
(
ret
,
"SnmpExtensionQuery failed: %
ld, %l
d
\n
"
,
error
,
index
);
ok
(
error
==
SNMP_ERRORSTATUS_NOERROR
,
ok
(
error
==
SNMP_ERRORSTATUS_NOERROR
,
"expected SNMP_ERRORSTATUS_NOERROR, got %d
\n
"
,
error
);
"expected SNMP_ERRORSTATUS_NOERROR, got %
l
d
\n
"
,
error
);
ok
(
index
==
0
,
"expected index 0, got %d
\n
"
,
index
);
ok
(
index
==
0
,
"expected index 0, got %
l
d
\n
"
,
index
);
if
(
!
ret
)
if
(
!
ret
)
moreData
=
FALSE
;
moreData
=
FALSE
;
else
if
(
error
)
else
if
(
error
)
...
@@ -430,7 +430,7 @@ if (0) /* crashes on native */
...
@@ -430,7 +430,7 @@ if (0) /* crashes on native */
noChange
=
FALSE
;
noChange
=
FALSE
;
do
{
do
{
ret
=
pSnmpExtensionQuery
(
SNMP_PDU_GETNEXT
,
&
list
,
&
error
,
&
index
);
ret
=
pSnmpExtensionQuery
(
SNMP_PDU_GETNEXT
,
&
list
,
&
error
,
&
index
);
ok
(
ret
,
"SnmpExtensionQuery failed: %
d, %
d
\n
"
,
error
,
index
);
ok
(
ret
,
"SnmpExtensionQuery failed: %
ld, %l
d
\n
"
,
error
,
index
);
/* FIXME: error and index aren't checked here because the UDP table is
/* FIXME: error and index aren't checked here because the UDP table is
* the last OID currently supported by Wine, so the last GetNext fails.
* the last OID currently supported by Wine, so the last GetNext fails.
* todo_wine is also not effective because it will succeed for all but
* todo_wine is also not effective because it will succeed for all but
...
@@ -439,8 +439,8 @@ if (0) /* crashes on native */
...
@@ -439,8 +439,8 @@ if (0) /* crashes on native */
*/
*/
if
(
0
)
{
if
(
0
)
{
ok
(
error
==
SNMP_ERRORSTATUS_NOERROR
,
ok
(
error
==
SNMP_ERRORSTATUS_NOERROR
,
"expected SNMP_ERRORSTATUS_NOERROR, got %d
\n
"
,
error
);
"expected SNMP_ERRORSTATUS_NOERROR, got %
l
d
\n
"
,
error
);
ok
(
index
==
0
,
"expected index 0, got %d
\n
"
,
index
);
ok
(
index
==
0
,
"expected index 0, got %
l
d
\n
"
,
index
);
}
}
if
(
!
ret
)
if
(
!
ret
)
moreData
=
FALSE
;
moreData
=
FALSE
;
...
...
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