[tor-bugs] #31625 [Core Tor/Tor]: config refactoring: fix hierarchy of configuration variable flags
Tor Bug Tracker & Wiki
blackhole at torproject.org
Thu Sep 5 15:53:33 UTC 2019
#31625: config refactoring: fix hierarchy of configuration variable flags
-----------------------------------------+---------------------------------
Reporter: nickm | Owner: nickm
Type: defect | Status: accepted
Priority: Medium | Milestone: Tor:
| 0.4.2.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: network-team-roadmap-august | Actual Points:
Parent ID: #29211 | Points: .5
Reviewer: teor | Sponsor:
-----------------------------------------+---------------------------------
Comment (by nickm):
I'm afraid this one is a larger branch than I thought it would be, but the
individual commits should be very simple. (The overall diff is not too
small either). Please let me know if you would like me to split it up.
The branch is currently divided into these parts:
1. Change the accessor functions in confparse.c so that they correspond to
the low-level properties that we want to check.
{{{
config: replace config_var_is_cumulative with is_replaced_on_set()
config: Invert sense of _is_invisible, and rename to is_listable()
Document config_var_is_dumpable and config_var_is_settable.
config: Introduce the concept of an "ungettable" variable.
config: rename "contained" to "derived", and explain it better.
config: make config_var_is_dumpable static.
}}}
2. Change the booleans in var_type_def_t into bit flags:
{{{
struct_var: refactor struct_var_is*() functions to delegate
typed_var: Make flags into an unsigned OR of bits.
Move VTFLAG_* declarations to conftypes.h
Re-number VTFLAG_* values so they don't conflict with CVFLAG_*
}}}
3. Replace the old flags with the new ones:
{{{
Replace low-level {var_type,struct_var}_is_*() with flag inspection
confparse, conftypes: Replace flags with their new names.
Remove all VTFLAG_* usage.
Remove all CVFLAG_* usage.
Revise documentation on CFLG_* flags
Changes file for 31625 (config flag refactor)
}}}
Right now I am running it on CI to see what the coverage looks like.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/31625#comment:8>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list