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
b36d81c6
Commit
b36d81c6
authored
9 years ago
by
hoelscher
Browse files
Options
Downloads
Patches
Plain Diff
correct some little styleerrors
parent
1555e7ba
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gtests/net/packetdrill/parser.y
+8
-9
8 additions, 9 deletions
gtests/net/packetdrill/parser.y
gtests/net/packetdrill/run_system_call.c
+7
-7
7 additions, 7 deletions
gtests/net/packetdrill/run_system_call.c
with
15 additions
and
16 deletions
gtests/net/packetdrill/parser.y
+
8
−
9
View file @
b36d81c6
...
...
@@ -566,10 +566,10 @@ static struct tcp_option *new_tcp_fast_open_option(const char *cookie_string,
%type <expression_list> expression_list function_arguments
%type <expression> expression binary_expression array
%type <expression> decimal_integer hex_integer
%type <expression> inaddr sockaddr msghdr iovec pollfd opt_revents
%type <expression> inaddr sockaddr msghdr iovec pollfd opt_revents
%type <expression> linger l_onoff l_linger
%type <expression> sctp_status sstat_state sstat_rwnd sstat_unackdata sstat_penddata
%type <expression> sstat_instrms sstat_outstrms sstat_fragmentation_point sstat_primary
%type <expression> sctp_status sstat_state sstat_rwnd sstat_unackdata sstat_penddata
%type <expression> sstat_instrms sstat_outstrms sstat_fragmentation_point sstat_primary
%type <expression> sctp_initmsg sctp_assocval sctp_sackinfo
%type <expression> sctp_rtoinfo srto_initial srto_max srto_min sctp_paddrinfo
%type <expression> sctp_paddrparams spp_address spp_hbinterval spp_pathmtu spp_pathmaxrxt
...
...
@@ -2294,18 +2294,17 @@ opt_revents
;
l_onoff
: ONOFF '=' INTEGER {
: ONOFF '=' INTEGER {
if (!is_valid_s32($3)) {
semantic_error("linger onoff out of range");
} else {
$$ = new_integer_expression($3, "%ld");
}
}
$$ = new_integer_expression($3, "%ld");
}
| ONOFF '=' ELLIPSIS { $$ = new_expression(EXPR_ELLIPSIS); }
;
l_linger
: LINGER '=' INTEGER {
: LINGER '=' INTEGER {
if (!is_valid_s32($3)) {
semantic_error("linger out of range");
}
...
...
@@ -2563,7 +2562,7 @@ sctp_paddrinfo
;
sctp_status
: '{' sstat_state ',' sstat_rwnd ',' sstat_unackdata ',' sstat_penddata ',' sstat_instrms ',' sstat_outstrms ','
: '{' sstat_state ',' sstat_rwnd ',' sstat_unackdata ',' sstat_penddata ',' sstat_instrms ',' sstat_outstrms ','
sstat_fragmentation_point ',' sstat_primary '}' {
$$ = new_expression(EXPR_SCTP_STATUS);
$$->value.sctp_status = (struct sctp_status_expr*) calloc(1, sizeof(struct sctp_status_expr));
...
...
This diff is collapsed.
Click to expand it.
gtests/net/packetdrill/run_system_call.c
+
7
−
7
View file @
b36d81c6
...
...
@@ -205,7 +205,7 @@ static int get_s32(struct expression *expression,
* success; on failure returns STATUS_ERR and sets error message.
*/
static
short
get_s16
(
struct
expression
*
expression
,
s16
*
value
,
char
**
error
)
s16
*
value
,
char
**
error
)
{
if
(
check_type
(
expression
,
EXPR_INTEGER
,
error
))
return
STATUS_ERR
;
...
...
@@ -1658,27 +1658,27 @@ static int syscall_getsockopt(struct state *state, struct syscall_spec *syscall,
struct
expression
*
l_linger
=
val_expression
->
value
.
linger
->
l_linger
;
struct
linger
*
ling
=
live_optval
;
int
val_onoff
=
0
;
if
(
l_onoff
->
type
=
=
EXPR_
INTEGER
)
{
if
(
l_onoff
->
type
!
=
EXPR_
ELLIPSIS
)
{
if
(
get_s32
(
l_onoff
,
&
val_onoff
,
error
))
{
free
(
live_optval
);
return
STATUS_ERR
;
}
if
(
val_onoff
!=
ling
->
l_onoff
)
{
asprintf
(
error
,
"Bad getsockopt Linger onoff: expected: %d actual: %d"
,
(
int
)
val_onoff
,
ling
->
l_onoff
);
val_onoff
,
ling
->
l_onoff
);
free
(
live_optval
);
return
STATUS_ERR
;
}
}
int
val_linger
=
0
;
if
(
l_linger
->
type
=
=
EXPR_
INTEGER
)
{
if
(
l_linger
->
type
!
=
EXPR_
ELLIPSIS
)
{
if
(
get_s32
(
l_linger
,
&
val_linger
,
error
))
{
free
(
live_optval
);
return
STATUS_ERR
;
}
if
(
ling
->
l_linger
!=
val_linger
)
{
asprintf
(
error
,
"Bad getsockopt Linger Value: expected: %d actual: %d"
,
val_linger
,
ling
->
l_linger
);
val_linger
,
ling
->
l_linger
);
free
(
live_optval
);
return
STATUS_ERR
;
}
...
...
@@ -1758,7 +1758,7 @@ static int syscall_getsockopt(struct state *state, struct syscall_spec *syscall,
}
if
(
live_status
->
sstat_rwnd
!=
rwnd
)
{
asprintf
(
error
,
"Bad getsockopt SCTP_STATUS rwnd: expected: %u actual: %u "
,
rwnd
,
live_status
->
sstat_rwnd
);
rwnd
,
live_status
->
sstat_rwnd
);
free
(
live_optval
);
return
STATUS_ERR
;
}
...
...
@@ -1770,7 +1770,7 @@ static int syscall_getsockopt(struct state *state, struct syscall_spec *syscall,
}
if
(
live_status
->
sstat_unackdata
!=
unackdata
)
{
asprintf
(
error
,
"Bad getsockopt SCTP_STATUS unackdata: expected: %hu actual: %hu"
,
unackdata
,
live_status
->
sstat_unackdata
);
unackdata
,
live_status
->
sstat_unackdata
);
free
(
live_optval
);
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