Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Packetdrill_tarr_ext
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stefan Gense
Packetdrill_tarr_ext
Commits
4debdf27
Commit
4debdf27
authored
9 years ago
by
Michael Tüxen
Browse files
Options
Downloads
Patches
Plain Diff
Shorten the lines.
parent
5cf86f8a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gtests/net/packetdrill/run_system_call.c
+28
-14
28 additions, 14 deletions
gtests/net/packetdrill/run_system_call.c
with
28 additions
and
14 deletions
gtests/net/packetdrill/run_system_call.c
+
28
−
14
View file @
4debdf27
...
@@ -1609,7 +1609,8 @@ static int syscall_getsockopt(struct state *state, struct syscall_spec *syscall,
...
@@ -1609,7 +1609,8 @@ static int syscall_getsockopt(struct state *state, struct syscall_spec *syscall,
}
}
if
(
live_optlen
!=
script_optlen
)
{
if
(
live_optlen
!=
script_optlen
)
{
asprintf
(
error
,
"Bad getsockopt optlen: expected: %d actual: %d"
,
(
int
)
script_optlen
,
(
int
)
live_optlen
);
asprintf
(
error
,
"Bad getsockopt optlen: expected: %d actual: %d"
,
(
int
)
script_optlen
,
(
int
)
live_optlen
);
free
(
live_optval
);
free
(
live_optval
);
return
STATUS_ERR
;
return
STATUS_ERR
;
}
}
...
@@ -1617,12 +1618,14 @@ static int syscall_getsockopt(struct state *state, struct syscall_spec *syscall,
...
@@ -1617,12 +1618,14 @@ static int syscall_getsockopt(struct state *state, struct syscall_spec *syscall,
if
(
val_expression
->
type
==
EXPR_LINGER
)
{
if
(
val_expression
->
type
==
EXPR_LINGER
)
{
struct
linger
*
ling
=
live_optval
;
struct
linger
*
ling
=
live_optval
;
if
(
ling
->
l_onoff
!=
val_expression
->
value
.
linger
.
l_onoff
)
{
if
(
ling
->
l_onoff
!=
val_expression
->
value
.
linger
.
l_onoff
)
{
asprintf
(
error
,
"Bad getsockopt Linger onoff: expected: %d actual: %d"
,
val_expression
->
value
.
linger
.
l_onoff
,
ling
->
l_onoff
);
asprintf
(
error
,
"Bad getsockopt Linger onoff: expected: %d actual: %d"
,
val_expression
->
value
.
linger
.
l_onoff
,
ling
->
l_onoff
);
free
(
live_optval
);
free
(
live_optval
);
return
STATUS_ERR
;
return
STATUS_ERR
;
}
}
if
(
ling
->
l_linger
!=
val_expression
->
value
.
linger
.
l_linger
)
{
if
(
ling
->
l_linger
!=
val_expression
->
value
.
linger
.
l_linger
)
{
asprintf
(
error
,
"Bad getsockopt Linger Value: expected: %d actual: %d"
,
val_expression
->
value
.
linger
.
l_linger
,
ling
->
l_linger
);
asprintf
(
error
,
"Bad getsockopt Linger Value: expected: %d actual: %d"
,
val_expression
->
value
.
linger
.
l_linger
,
ling
->
l_linger
);
free
(
live_optval
);
free
(
live_optval
);
return
STATUS_ERR
;
return
STATUS_ERR
;
}
}
...
@@ -1630,15 +1633,18 @@ static int syscall_getsockopt(struct state *state, struct syscall_spec *syscall,
...
@@ -1630,15 +1633,18 @@ static int syscall_getsockopt(struct state *state, struct syscall_spec *syscall,
}
else
if
(
val_expression
->
type
==
EXPR_SCTP_RTOINFO
)
{
}
else
if
(
val_expression
->
type
==
EXPR_SCTP_RTOINFO
)
{
struct
sctp_rtoinfo
*
rtoinfo
=
live_optval
;
struct
sctp_rtoinfo
*
rtoinfo
=
live_optval
;
if
(
rtoinfo
->
srto_initial
!=
val_expression
->
value
.
sctp_rtoinfo
.
srto_initial
){
if
(
rtoinfo
->
srto_initial
!=
val_expression
->
value
.
sctp_rtoinfo
.
srto_initial
){
asprintf
(
error
,
"Bad getsockopt SCTP_RTOINFO initial: expected: %u actual: %u"
,
val_expression
->
value
.
sctp_rtoinfo
.
srto_initial
,
rtoinfo
->
srto_initial
);
asprintf
(
error
,
"Bad getsockopt SCTP_RTOINFO initial: expected: %u actual: %u"
,
val_expression
->
value
.
sctp_rtoinfo
.
srto_initial
,
rtoinfo
->
srto_initial
);
free
(
live_optval
);
free
(
live_optval
);
return
STATUS_ERR
;
return
STATUS_ERR
;
}
else
if
(
rtoinfo
->
srto_max
!=
val_expression
->
value
.
sctp_rtoinfo
.
srto_max
){
}
else
if
(
rtoinfo
->
srto_max
!=
val_expression
->
value
.
sctp_rtoinfo
.
srto_max
){
asprintf
(
error
,
"Bad getsockopt SCTP_RTOINFO SRTO_MAX: expected: %u actual: %u"
,
val_expression
->
value
.
sctp_rtoinfo
.
srto_max
,
rtoinfo
->
srto_max
);
asprintf
(
error
,
"Bad getsockopt SCTP_RTOINFO SRTO_MAX: expected: %u actual: %u"
,
val_expression
->
value
.
sctp_rtoinfo
.
srto_max
,
rtoinfo
->
srto_max
);
free
(
live_optval
);
free
(
live_optval
);
return
STATUS_ERR
;
return
STATUS_ERR
;
}
else
if
(
rtoinfo
->
srto_min
!=
val_expression
->
value
.
sctp_rtoinfo
.
srto_min
){
}
else
if
(
rtoinfo
->
srto_min
!=
val_expression
->
value
.
sctp_rtoinfo
.
srto_min
){
asprintf
(
error
,
"Bad getsockopt SCTP_RTOINFO SRTO_MIN: expected: %u actual: %u"
,
val_expression
->
value
.
sctp_rtoinfo
.
srto_min
,
rtoinfo
->
srto_min
);
asprintf
(
error
,
"Bad getsockopt SCTP_RTOINFO SRTO_MIN: expected: %u actual: %u"
,
val_expression
->
value
.
sctp_rtoinfo
.
srto_min
,
rtoinfo
->
srto_min
);
free
(
live_optval
);
free
(
live_optval
);
return
STATUS_ERR
;
return
STATUS_ERR
;
}
}
...
@@ -1648,38 +1654,46 @@ static int syscall_getsockopt(struct state *state, struct syscall_spec *syscall,
...
@@ -1648,38 +1654,46 @@ static int syscall_getsockopt(struct state *state, struct syscall_spec *syscall,
struct
sctp_status
*
live_val
=
live_optval
;
struct
sctp_status
*
live_val
=
live_optval
;
struct
sctp_status
*
expected_val
=
&
(
val_expression
->
value
.
sctp_status
);
struct
sctp_status
*
expected_val
=
&
(
val_expression
->
value
.
sctp_status
);
if
(
live_val
->
sstat_state
!=
expected_val
->
sstat_state
)
{
if
(
live_val
->
sstat_state
!=
expected_val
->
sstat_state
)
{
asprintf
(
error
,
"Bad getsockopt SCTP_STATUS state: expected: %d actual: %d "
,
expected_val
->
sstat_state
,
live_val
->
sstat_state
);
asprintf
(
error
,
"Bad getsockopt SCTP_STATUS state: expected: %d actual: %d "
,
expected_val
->
sstat_state
,
live_val
->
sstat_state
);
free
(
live_optval
);
free
(
live_optval
);
return
STATUS_ERR
;
return
STATUS_ERR
;
}
else
if
(
live_val
->
sstat_rwnd
!=
expected_val
->
sstat_rwnd
)
{
}
else
if
(
live_val
->
sstat_rwnd
!=
expected_val
->
sstat_rwnd
)
{
asprintf
(
error
,
"Bad getsockopt SCTP_STATUS rwnd: expected: %u actual: %u "
,
expected_val
->
sstat_rwnd
,
live_val
->
sstat_rwnd
);
asprintf
(
error
,
"Bad getsockopt SCTP_STATUS rwnd: expected: %u actual: %u "
,
expected_val
->
sstat_rwnd
,
live_val
->
sstat_rwnd
);
free
(
live_optval
);
free
(
live_optval
);
return
STATUS_ERR
;
return
STATUS_ERR
;
}
else
if
(
live_val
->
sstat_unackdata
!=
expected_val
->
sstat_unackdata
)
{
}
else
if
(
live_val
->
sstat_unackdata
!=
expected_val
->
sstat_unackdata
)
{
asprintf
(
error
,
"Bad getsockopt SCTP_STATUS unackdata: expected: %u actual: %u"
,
expected_val
->
sstat_unackdata
,
live_val
->
sstat_unackdata
);
asprintf
(
error
,
"Bad getsockopt SCTP_STATUS unackdata: expected: %u actual: %u"
,
expected_val
->
sstat_unackdata
,
live_val
->
sstat_unackdata
);
free
(
live_optval
);
free
(
live_optval
);
return
STATUS_ERR
;
return
STATUS_ERR
;
}
else
if
(
live_val
->
sstat_penddata
!=
expected_val
->
sstat_penddata
)
{
}
else
if
(
live_val
->
sstat_penddata
!=
expected_val
->
sstat_penddata
)
{
asprintf
(
error
,
"Bad getsockopt SCTP_STATUS penddata: expected: %u actual: %u"
,
expected_val
->
sstat_penddata
,
live_val
->
sstat_penddata
);
asprintf
(
error
,
"Bad getsockopt SCTP_STATUS penddata: expected: %u actual: %u"
,
expected_val
->
sstat_penddata
,
live_val
->
sstat_penddata
);
free
(
live_optval
);
free
(
live_optval
);
return
STATUS_ERR
;
return
STATUS_ERR
;
}
else
if
(
live_val
->
sstat_instrms
!=
expected_val
->
sstat_instrms
)
{
}
else
if
(
live_val
->
sstat_instrms
!=
expected_val
->
sstat_instrms
)
{
asprintf
(
error
,
"Bad getsockopt SCTP_STATUS instreams: expected: %u actual: %u"
,
expected_val
->
sstat_instrms
,
live_val
->
sstat_instrms
);
asprintf
(
error
,
"Bad getsockopt SCTP_STATUS instreams: expected: %u actual: %u"
,
expected_val
->
sstat_instrms
,
live_val
->
sstat_instrms
);
free
(
live_optval
);
free
(
live_optval
);
return
STATUS_ERR
;
return
STATUS_ERR
;
}
else
if
(
live_val
->
sstat_outstrms
!=
expected_val
->
sstat_outstrms
)
{
}
else
if
(
live_val
->
sstat_outstrms
!=
expected_val
->
sstat_outstrms
)
{
asprintf
(
error
,
"Bad getsockopt SCTP_STATUS outstreams: expected: %u actual: %u"
,
expected_val
->
sstat_outstrms
,
live_val
->
sstat_outstrms
);
asprintf
(
error
,
"Bad getsockopt SCTP_STATUS outstreams: expected: %u actual: %u"
,
expected_val
->
sstat_outstrms
,
live_val
->
sstat_outstrms
);
free
(
live_optval
);
free
(
live_optval
);
return
STATUS_ERR
;
return
STATUS_ERR
;
}
else
if
(
live_val
->
sstat_fragmentation_point
!=
expected_val
->
sstat_fragmentation_point
){
}
else
if
(
live_val
->
sstat_fragmentation_point
!=
expected_val
->
sstat_fragmentation_point
){
asprintf
(
error
,
"Bad getsockopt SCTP_STATUS fragmentation point: expected: %u actual: %u"
,
expected_val
->
sstat_fragmentation_point
,
live_val
->
sstat_fragmentation_point
);
asprintf
(
error
,
"Bad getsockopt SCTP_STATUS fragmentation point: expected: %u actual: %u"
,
expected_val
->
sstat_fragmentation_point
,
live_val
->
sstat_fragmentation_point
);
free
(
live_optval
);
free
(
live_optval
);
return
STATUS_ERR
;
return
STATUS_ERR
;
}
}
#endif
#endif
}
else
{
}
else
{
if
(
*
(
int
*
)
live_optval
!=
script_optval
)
{
if
(
*
(
int
*
)
live_optval
!=
script_optval
)
{
asprintf
(
error
,
"Bad getsockopt optval: expected: %d actual: %d"
,
(
int
)
script_optval
,
*
(
int
*
)
live_optval
);
asprintf
(
error
,
"Bad getsockopt optval: expected: %d actual: %d"
,
(
int
)
script_optval
,
*
(
int
*
)
live_optval
);
free
(
live_optval
);
free
(
live_optval
);
return
STATUS_ERR
;
return
STATUS_ERR
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment