Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
ba2c5727
Commit
ba2c5727
authored
Oct 20, 2017
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more debug
parent
1418d985
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
tests/tests-randomized/random-test-driver.c
tests/tests-randomized/random-test-driver.c
+11
-2
No files found.
tests/tests-randomized/random-test-driver.c
View file @
ba2c5727
...
@@ -227,6 +227,13 @@ check_random_roundtrip(enum asn_transfer_syntax syntax, size_t max_random_value_
...
@@ -227,6 +227,13 @@ check_random_roundtrip(enum asn_transfer_syntax syntax, size_t max_random_value_
}
}
assert
(
structure
!=
0
);
assert
(
structure
!=
0
);
if
(
debug
)
{
fprintf
(
stderr
,
"Random structure %s:
\n
"
,
sizeof
(
ASN1_STR
)
>
60
?
"T"
:
ASN1_STR
);
asn_fprint
(
stderr
,
&
asn_DEF_T
,
structure
);
xer_fprint
(
stderr
,
&
asn_DEF_T
,
structure
);
}
asn_enc_rval_t
er
;
asn_enc_rval_t
er
;
for
(;;)
{
for
(;;)
{
er
=
asn_encode_to_buffer
(
er
=
asn_encode_to_buffer
(
...
@@ -270,6 +277,8 @@ check_random_roundtrip(enum asn_transfer_syntax syntax, size_t max_random_value_
...
@@ -270,6 +277,8 @@ check_random_roundtrip(enum asn_transfer_syntax syntax, size_t max_random_value_
er
.
encoded
,
rval
.
consumed
);
er
.
encoded
,
rval
.
consumed
);
fprintf
(
stderr
,
"Original random structure:
\n
"
);
fprintf
(
stderr
,
"Original random structure:
\n
"
);
asn_fprint
(
stderr
,
&
asn_DEF_T
,
structure
);
asn_fprint
(
stderr
,
&
asn_DEF_T
,
structure
);
fprintf
(
stderr
,
"Partially decoded %s value:
\n
"
,
ASN1_STR
);
asn_fprint
(
stderr
,
&
asn_DEF_T
,
decoded_structure
);
assert
((
ssize_t
)
rval
.
consumed
==
er
.
encoded
);
assert
((
ssize_t
)
rval
.
consumed
==
er
.
encoded
);
exit
(
EX_SOFTWARE
);
exit
(
EX_SOFTWARE
);
}
}
...
@@ -288,7 +297,7 @@ check_random_roundtrip(enum asn_transfer_syntax syntax, size_t max_random_value_
...
@@ -288,7 +297,7 @@ check_random_roundtrip(enum asn_transfer_syntax syntax, size_t max_random_value_
*/
*/
int
cmp
=
asn_DEF_T
.
op
->
compare_struct
(
&
asn_DEF_T
,
structure
,
int
cmp
=
asn_DEF_T
.
op
->
compare_struct
(
&
asn_DEF_T
,
structure
,
decoded_structure
);
decoded_structure
);
if
(
cmp
!=
0
)
{
if
(
cmp
!=
0
||
debug
)
{
fprintf
(
stderr
,
"Random %s value:
\n
"
,
ASN1_STR
);
fprintf
(
stderr
,
"Random %s value:
\n
"
,
ASN1_STR
);
asn_fprint
(
stderr
,
&
asn_DEF_T
,
structure
);
asn_fprint
(
stderr
,
&
asn_DEF_T
,
structure
);
xer_fprint
(
stderr
,
&
asn_DEF_T
,
structure
);
xer_fprint
(
stderr
,
&
asn_DEF_T
,
structure
);
...
@@ -335,7 +344,7 @@ int main(int argc, char **argv) {
...
@@ -335,7 +344,7 @@ int main(int argc, char **argv) {
mode
=
MODE_CHECK_RANDOM_ROUNDTRIP
;
mode
=
MODE_CHECK_RANDOM_ROUNDTRIP
;
break
;
break
;
case
'd'
:
case
'd'
:
debug
=
1
;
debug
++
;
break
;
break
;
case
'e'
:
case
'e'
:
enabled_encodings
|=
1
<<
lookup_syntax
(
optarg
);
enabled_encodings
|=
1
<<
lookup_syntax
(
optarg
);
...
...
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