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
233d14db
Commit
233d14db
authored
Oct 02, 2017
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add make-driven parallelism
parent
a5b0288c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
18 deletions
+21
-18
tests/tests-randomized/check-bundles.sh
tests/tests-randomized/check-bundles.sh
+21
-18
No files found.
tests/tests-randomized/check-bundles.sh
View file @
233d14db
...
...
@@ -108,30 +108,33 @@ compile_and_test() {
return
4
fi
# Do a LibFuzzer based testing
local
fuzz_time
=
10
local
fuzz_cmd
=
"
${
ASAN_ENV_FLAGS
}
UBSAN_OPTIONS=print_stacktrace=1"
fuzz_cmd+
=
" ./random-test-driver"
fuzz_cmd+
=
" -timeout=3 -max_total_time=
${
fuzz_time
}
-max_len=128"
if
!
grep
-q
"^fuzz:"
Makefile
;
then
local
fuzz_targets
=
$(
echo
random-data/
*
|
sed
-e
's/random-data./fuzz-/g'
)
echo
"fuzz:
$fuzz_targets
"
>>
Makefile
echo
"fuzz-%: random-data/% random-test-driver"
>>
Makefile
echo
" ASN1_DATA_DIR=
\$
<
${
fuzz_cmd
}
\$
<"
>>
Makefile
fi
# If LIBFUZZER_CFLAGS are properly defined, do the fuzz test as well
if
echo
"
${
LIBFUZZER_CFLAGS
}
"
|
grep
-qi
"[a-z]"
;
then
echo
"Recompiling for fuzzing..."
rm
-f
random-test-driver.o
rm
-f
random-test-driver
CFLAGS
=
"
${
LIBFUZZER_CFLAGS
}
${
CFLAGS
}
"
make
CFLAGS
=
"
${
LIBFUZZER_CFLAGS
}
${
CFLAGS
}
"
make
-j4
# Do a LibFuzzer based testing
fuzz_time
=
10
for
data_dir
in
random-data/
*
;
do
echo
"Fuzzing
$data_dir
will take
$fuzz_time
seconds..."
local
cmd
=
"
${
ASAN_ENV_FLAGS
}
UBSAN_OPTIONS=print_stacktrace=1"
cmd+
=
" ASN1_DATA_DIR=
$data_dir
"
# Dir for our code
cmd+
=
" ./random-test-driver"
cmd+
=
" -timeout=3 -max_total_time=
${
fuzz_time
}
-max_len=128"
cmd+
=
"
$data_dir
"
# Dir for LLVM fuzzer driver
echo
"
$cmd
"
if
!
eval
"
$cmd
"
;
then
echo
"RETRY
$data_dir
:"
echo
"(cd
${
RNDTEMP
}
&& CC=
${
CC
}
CFLAGS=
\"
${
LIBFUZZER_CFLAGS
}
${
CFLAGS
}
\"
make &&
$cmd
)"
if
!
make
-j4
fuzz
;
then
echo
"RETRY:"
echo
"(cd
${
RNDTEMP
}
&& CC=
${
CC
}
CFLAGS=
\"
${
LIBFUZZER_CFLAGS
}
${
CFLAGS
}
\"
make fuzz)"
return
5
fi
done
fi
return
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