Tomas Gavenciak [Sat, 11 Sep 2010 15:59:38 +0000 (17:59 +0200)]
Timeline change, multiple changes in Eval
I am sorry for this giga-commit, but it would be too much
work to split it
Update (some) docs, small timeline change
(move loading tasktype from init to pipeline)
Eval.stat -> Eval.status (cosmetic)
Add basic (builtins) and testing configuration
Eval.init fills mainline with basic hooks
Eval.init loads and initializes extensions
Increase indentation (2 by gavento -> 4 by MJ)
Write all main hooks in Eval
Eval.hook_init_tasktype loads tasktype module
It may not seem so, but most of the important
code is reused :-)
Tomas Gavenciak [Sat, 11 Sep 2010 15:55:09 +0000 (17:55 +0200)]
Moved module loading, use __import__() now
General util.load_module returns module by name.
Hook adding in pipeline removed (and distributed to
tasktype module loading and extension module loading, both in Eval)
Hooks had some problems - the hook modules have to insert self
into the pipeline, but cannot decide into which (only main) and
cannot see Eval during init() (or use the logs)
Having HOOKS with explicit timing:
HOOKS="m:8:my_main_pipeline_hook t:79:cleanup_in_test_pipeline"
would be a possibility, but a little too complex.
Extension is almost the same thing as hook (sugary name change),
but can do anything during init, can insert multiple hooks
(to both main and test pipelines), read/change configuration
and use logs.
Good extension example is fetching tasks via RSYNC or GIT.
Tomas Gavenciak [Fri, 10 Sep 2010 19:14:40 +0000 (21:14 +0200)]
Rewriting eval.py with new log, config and timeline
Moving initializaton together, remaining init_* will be called from main pipeline
Most changes are moves and rewrites - the meaning did not change much
The actions are as listed in doc/timeline
Tomas Gavenciak [Tue, 25 May 2010 01:55:07 +0000 (21:55 -0400)]
Changes to config operations structure.
Changed config operaiton from triplets to a helper class,
added operation level (as priority) instead of index and
optional source. Changed dump format.
Removal now by operation instead of index.
Test updated and passed, but still not full coverage. WIP parser test.
Tomas Gavenciak [Sun, 9 May 2010 00:31:51 +0000 (20:31 -0400)]
Imporoved and shortened conf.py code
Removed subtrees, now only one namespace
Transparent variable creation upon lookup
Implemented general condition clauses (AND, OR, NOT, ==, !=)
Conditions now have 'parent' condition (containing condition block)
Variables refer to only one condition (and indirectly its parents)
Renamed get_value -> evaluate and evaluate -> value
Improved max-depth checking
Updated the test/example (still no conditions)
pprint replaced with dump (for consistency, but still returns an iterator)
Some dovumentation (with TODO's)
Tomas Gavenciak [Fri, 7 May 2010 00:15:19 +0000 (20:15 -0400)]
New module for config evaluation. Basic testing.
Implemented:
* Configuration tree,
* Variables,
* Variable-setting operations ('SET' and 'APPEND')
* Equality conditions (WIP, not tested yet),
* Substitution expressions with text and variables,
* Pretty-printing,
* Caching for variables and conditions with invalidation along reverse-dependencies,
* Add and remove operations from variables with correct reverse-dependency handling (add and remove)
TODO: smarter conditions, variable lookup (and maybe transparent creation),
possibly cleanup of unused variables and conditions
Martin Mares [Wed, 29 Apr 2009 10:22:01 +0000 (12:22 +0200)]
Hopefully fixed the occasional "UGH" error.
When the machine creaks under high load, SIGALRM can arrive during the
final wait4() in box_exit(), causing it to return EINTR. Restart waiting
in such cases.
Martin Mares [Sun, 5 Apr 2009 16:35:07 +0000 (18:35 +0200)]
Syscall handling reform
The previous code did not work with syscalls that do not return a value -- e.g.,
sysreturn(). In such cases, the kernel reports the exit from the syscall with
orig_eax == -1, which cannot be easily distinguished from a breakpoint.
I have rewritten the syscall checker to use the PTRACE_O_TRACESYSGOOD switch,
which causes the kernel to report syscalls in a slightly different way. Also,
the code now tests whether the syscall number on exit matched the one recorded
on entry (purely as a guard against possible silly bugs in synchronization
of syscall enter/exit reports with the kernel) and it also avoids suppresses
the meaningless return value of the sysreturn-like syscalls.