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
e2a8da9e
Commit
e2a8da9e
authored
Sep 28, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Sep 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetmib1: Skip tests if a portion of inetmib1 isn't implemented.
This fixes a hang (and sometimes a system hang) on MacOSX when running the inetmib1 tests. Spotted by Owen Rudge.
parent
17d798ea
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
5 deletions
+47
-5
main.c
dlls/inetmib1/tests/main.c
+47
-5
No files found.
dlls/inetmib1/tests/main.c
View file @
e2a8da9e
...
...
@@ -53,7 +53,7 @@ static void testQuery(void)
{
BOOL
(
WINAPI
*
pQuery
)(
BYTE
,
SnmpVarBindList
*
,
AsnInteger32
*
,
AsnInteger32
*
);
BOOL
ret
,
moreData
;
BOOL
ret
,
moreData
,
noChange
;
SnmpVarBindList
list
;
AsnInteger32
error
,
index
;
UINT
bogus
[]
=
{
1
,
2
,
3
,
4
};
...
...
@@ -157,6 +157,7 @@ static void testQuery(void)
SnmpUtilOidCpy
(
&
vars2
[
2
].
name
,
&
vars
[
2
].
name
);
list
.
list
=
vars2
;
moreData
=
TRUE
;
noChange
=
FALSE
;
entry
=
0
;
do
{
SetLastError
(
0xdeadbeef
);
...
...
@@ -180,6 +181,15 @@ static void testQuery(void)
else
if
(
SnmpUtilOidNCmp
(
&
vars2
[
2
].
name
,
&
vars
[
2
].
name
,
vars
[
2
].
name
.
idLength
))
moreData
=
FALSE
;
else
if
(
!
SnmpUtilOidCmp
(
&
vars
[
0
].
name
,
&
vars2
[
0
].
name
)
||
!
SnmpUtilOidCmp
(
&
vars
[
0
].
name
,
&
vars2
[
0
].
name
)
||
!
SnmpUtilOidCmp
(
&
vars
[
0
].
name
,
&
vars2
[
0
].
name
))
{
/* If the OID isn't modified, the function isn't implemented on this
* platform, skip the remaining tests.
*/
noChange
=
TRUE
;
}
if
(
moreData
)
{
UINT
lastID
;
...
...
@@ -224,7 +234,9 @@ static void testQuery(void)
"expected a value of 0, 1, or 2, got %u
\n
"
,
vars2
[
2
].
value
.
asnValue
.
unsigned32
);
}
}
while
(
moreData
);
else
if
(
noChange
)
skip
(
"no change in OID, no MIB2 IF table implementation
\n
"
);
}
while
(
moreData
&&
!
noChange
);
SnmpUtilVarBindFree
(
&
vars2
[
0
]);
SnmpUtilVarBindFree
(
&
vars2
[
1
]);
SnmpUtilVarBindFree
(
&
vars2
[
2
]);
...
...
@@ -240,6 +252,7 @@ static void testQuery(void)
list
.
len
=
1
;
list
.
list
=
vars2
;
moreData
=
TRUE
;
noChange
=
FALSE
;
ret
=
pQuery
(
SNMP_PDU_GETNEXT
,
&
list
,
&
error
,
&
index
);
ok
(
ret
,
"SnmpExtensionQuery failed: %d
\n
"
,
GetLastError
());
ok
(
error
==
SNMP_ERRORSTATUS_NOERROR
,
...
...
@@ -272,6 +285,13 @@ static void testQuery(void)
else
if
(
SnmpUtilOidNCmp
(
&
vars2
[
0
].
name
,
&
vars
[
0
].
name
,
vars
[
0
].
name
.
idLength
))
moreData
=
FALSE
;
else
if
(
!
SnmpUtilOidCmp
(
&
vars2
[
0
].
name
,
&
vars
[
0
].
name
))
{
/* If the OID isn't modified, the function isn't implemented on this
* platform, skip the remaining tests.
*/
noChange
=
TRUE
;
}
if
(
moreData
)
{
/* Make sure the size of the OID is right.
...
...
@@ -304,7 +324,9 @@ static void testQuery(void)
}
}
}
}
while
(
moreData
);
else
if
(
noChange
)
skip
(
"no change in OID, no MIB2 IP address table implementation
\n
"
);
}
while
(
moreData
&&
!
noChange
);
SnmpUtilVarBindFree
(
&
vars2
[
0
]);
/* Check the type and OIDs of the IP route table */
...
...
@@ -315,6 +337,7 @@ static void testQuery(void)
list
.
len
=
1
;
list
.
list
=
vars2
;
moreData
=
TRUE
;
noChange
=
FALSE
;
do
{
ret
=
pQuery
(
SNMP_PDU_GETNEXT
,
&
list
,
&
error
,
&
index
);
ok
(
ret
,
"SnmpExtensionQuery failed: %d
\n
"
,
GetLastError
());
...
...
@@ -328,6 +351,13 @@ static void testQuery(void)
else
if
(
SnmpUtilOidNCmp
(
&
vars2
[
0
].
name
,
&
vars
[
0
].
name
,
vars
[
0
].
name
.
idLength
))
moreData
=
FALSE
;
else
if
(
!
SnmpUtilOidCmp
(
&
vars2
[
0
].
name
,
&
vars
[
0
].
name
))
{
/* If the OID isn't modified, the function isn't implemented on this
* platform, skip the remaining tests.
*/
noChange
=
TRUE
;
}
if
(
moreData
)
{
/* Make sure the size of the OID is right.
...
...
@@ -360,7 +390,9 @@ static void testQuery(void)
}
}
}
}
while
(
moreData
);
else
if
(
noChange
)
skip
(
"no change in OID, no MIB2 IP route table implementation
\n
"
);
}
while
(
moreData
&&
!
noChange
);
SnmpUtilVarBindFree
(
&
vars2
[
0
]);
/* Check the type and OIDs of the UDP table */
...
...
@@ -371,6 +403,7 @@ static void testQuery(void)
list
.
len
=
1
;
list
.
list
=
vars2
;
moreData
=
TRUE
;
noChange
=
FALSE
;
do
{
ret
=
pQuery
(
SNMP_PDU_GETNEXT
,
&
list
,
&
error
,
&
index
);
ok
(
ret
,
"SnmpExtensionQuery failed: %d
\n
"
,
GetLastError
());
...
...
@@ -392,6 +425,13 @@ static void testQuery(void)
else
if
(
SnmpUtilOidNCmp
(
&
vars2
[
0
].
name
,
&
vars
[
0
].
name
,
vars
[
0
].
name
.
idLength
))
moreData
=
FALSE
;
else
if
(
!
SnmpUtilOidCmp
(
&
vars2
[
0
].
name
,
&
vars
[
0
].
name
))
{
/* If the OID isn't modified, the function isn't implemented on this
* platform, skip the remaining tests.
*/
noChange
=
TRUE
;
}
if
(
moreData
)
{
/* Make sure the size of the OID is right. */
...
...
@@ -422,7 +462,9 @@ static void testQuery(void)
}
}
}
}
while
(
moreData
);
else
if
(
noChange
)
skip
(
"no change in OID, no MIB2 UDP table implementation
\n
"
);
}
while
(
moreData
&&
!
noChange
);
SnmpUtilVarBindFree
(
&
vars2
[
0
]);
}
...
...
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