Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
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
MacroFake
Tor
Commits
2eff709e
Commit
2eff709e
authored
6 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Plain Diff
Merge branch 'maint-0.3.3'
parents
1eede00a
f64fa6b1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/test_dir.c
+20
-0
20 additions, 0 deletions
src/test/test_dir.c
with
20 additions
and
0 deletions
src/test/test_dir.c
+
20
−
0
View file @
2eff709e
...
...
@@ -1562,6 +1562,25 @@ test_dir_measured_bw_kb(void *arg)
return
;
}
/* Test dirserv_read_measured_bandwidths */
static
void
test_dir_dirserv_read_measured_bandwidths
(
void
*
arg
)
{
char
*
fname
=
NULL
;
(
void
)
arg
;
fname
=
tor_strdup
(
get_fname
(
"V3BandwidthsFile"
));
/* Test an empty file */
write_str_to_file
(
fname
,
""
,
0
);
setup_capture_of_logs
(
LOG_WARN
);
tt_int_op
(
-
1
,
OP_EQ
,
dirserv_read_measured_bandwidths
(
fname
,
NULL
));
expect_log_msg
(
"Empty bandwidth file
\n
"
);
done:
tor_free
(
fname
);
teardown_capture_of_logs
();
}
#define MBWC_INIT_TIME 1000
/** Do the measured bandwidth cache unit test */
...
...
@@ -5830,6 +5849,7 @@ struct testcase_t dir_tests[] = {
DIR_LEGACY
(
versions
),
DIR_LEGACY
(
fp_pairs
),
DIR
(
split_fps
,
0
),
DIR_LEGACY
(
dirserv_read_measured_bandwidths
),
DIR_LEGACY
(
measured_bw_kb
),
DIR_LEGACY
(
measured_bw_kb_cache
),
DIR_LEGACY
(
param_voting
),
...
...
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