Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
German Leon
Carol-fi
Commits
b3520f72
Commit
b3520f72
authored
Dec 11, 2020
by
German Leon
Browse files
Acceso pretty_print
parent
eb2e1fbf
Changes
1
Show whitespace changes
Inline
Side-by-side
fault_injector.py
View file @
b3520f72
...
@@ -565,9 +565,6 @@ def fault_injection_by_signal(**kwargs):
...
@@ -565,9 +565,6 @@ def fault_injection_by_signal(**kwargs):
# FI injection time
# FI injection time
injection_time
=
fi_toc
-
fi_tic
injection_time
=
fi_toc
-
fi_tic
if
fault_injected
:
output_str
=
"THREAD:{}, FAULT NUM:{}"
.
format
(
host_thread
,
num_rounds
)
if
len
(
crash
)
==
1
:
if
len
(
crash
)
==
1
:
tmp
=
"--"
tmp
=
"--"
else
:
else
:
...
@@ -577,11 +574,14 @@ def fault_injection_by_signal(**kwargs):
...
@@ -577,11 +574,14 @@ def fault_injection_by_signal(**kwargs):
block
,
old_val
,
new_val
,
injection_site
,
block
,
old_val
,
new_val
,
injection_site
,
fault_injected
,
hang
,
crash
[
0
],
sdc
,
masked
,
tmp
,
injection_time
,
fault_injected
,
hang
,
crash
[
0
],
sdc
,
masked
,
tmp
,
injection_time
,
signal_init_time
,
bits_to_flip
,
instruction
,
user_defined_val
]
signal_init_time
,
bits_to_flip
,
instruction
,
user_defined_val
]
for
name
,
value
in
zip
(
header
,
row
):
output_str
+=
" {}: {},"
.
format
(
name
,
value
)
if
fault_injected
:
# output_str = "THREAD:{}, FAULT NUM:{}".format(host_thread, num_rounds)
#output_str += " {}: {},".format(name, value)
#for name, value in zip(header, row):
# :-1 to remove the last comma
# :-1 to remove the last comma
cf
.
printf
(
output_str
[:
-
1
])
#
cf.printf(output_str[:-1])
with
lock
:
with
lock
:
summary_file
.
write_row
(
row
)
summary_file
.
write_row
(
row
)
num_rounds
+=
1
num_rounds
+=
1
...
...
Write
Preview
Supports
Markdown
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