Commit 56cd68a4 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Make it easier to run all the tests that don't require dejagnu. Add

scheduling of clients, so that one client cannot starve other clients
for resources.  (Bug 102).  Run the database save, garb, and check for
killed clients from three separate liboop timer callbacks.  Use liboop
for signal dispatching.  Use liboop.  (Bug 106).  Code cleanup.
Renamed a few constants that have nothing to do with ISC.  Make it
possible to read an unsigned int from the config file.  Add SA_RESTART
support to liboop.  (This has been sent to the liboop maintainer.)
(Fixes bug 845).  Add a few utility string functions.
parent 14141e35
2003-07-12 Per Cederqvist <ceder@ceder.dyndns.org>
Make it easier to run all the tests that don't require dejagnu.
* src/server/testsuite/Makefile.am (check-nondejagnu): New target.
(check-dejagnu): New target.
(check): Depend on check-dejagnu and check-nondejagnu, and move
all dependencies to one of those targets.
Add scheduling of clients, so that one client cannot starve other
clients for resources. (Bug 102).
* src/server/server-config.c (parameters): Added "Penalty per
call", "Penalty per read", "Max penalty" and "Low penalty".
* src/server/testsuite/lyskomd.0/conf-file-cov.exp: Check the
parameter "Garb timeout" instead of "Idle timeout", since the
latter no longer exists.
* src/server/param.h (struct kom_par): Removed timeout. Added
garb_busy_postponement, penalty_per_call, penalty_per_read,
max_penalty and low_penalty.
* src/server/internal-connections.c (init_connection):
Initialize penalty, penalty_generation, queue_next, queue_prev,
on_queue.
(kill_client): Assert that on_queue is false.
* src/server/connections.h (Connection): New fields: penalty,
penalty_generation, queue_prev, queue_next, on_queue.
(handle_accept_event): New function.
* src/server/connections.c (penalty_generation): New static variable.
(work_done): Ditto.
(is_idle): Ditto.
(queue_first): Ditto.
(queue_last): Ditto.
(queue_add): New static function.
(queue_remove): Ditto.
(logout_client): Remove the client from the queue of pending
clients.
(parse_unparsed): Add penalty points for finished calls and
protocol errors. Don't delete the parsed part of unparsed.
(adjust_penalty): New static function.
(enable_idle_check): Ditto.
(check_idle_callback): Ditto.
Run the database save, garb, and check for killed clients from
three separate liboop timer callbacks.
* src/server/connections.c (kill_pending): New static variable.
(add_to_kill_list): Add an oop timer event callback to
check_kill_flg when a client is added to the kill list.
(check_kill_flg): Changed API: this is now an oop timer callback
function.
(garb_callback): New static function.
(saver_callback): Ditto.
* src/server/text-garb.c (last_start): Static variable removed.
(garb_text): Expect the caller to wait long enough when the garb
shouldn't be running. Return true when the garb is completed,
instead of when the garb shouldn't be running.
* src/server/cache.h (sync_part): Return the number of seconds to
wait instead of a Bool.
* src/server/simple-cache.c (sync_part): Return the number of
seconds to wait instead of a Bool. All callers updated.
* src/server/server-config.c (parameters): Removed "Idle timeout".
Added "Garb busy postponement"
* src/server/end-of-atomic.h (end_of_atomic): Removed the
idle argument.
* src/server/disk-end-of-atomic.c (end_of_atomic): Removed the
idle argument. Don't call the garb. Adjusted to the new API of
sync_part().
Use liboop for signal dispatching.
* src/server/ramkomd.c (sighandler_usr1): Now an liboop signal
callback, not a real signal handler. Do the real work here.
(sighandler_winch): Ditto.
(sighandler_hup): Now an liboop signal callback, not a real signal
handler.
(sighandler_quit): Ditto.
(sighandler_usr2): Ditto.
(setup_sighandlers): Removed.
(restart_syscalls_on_intr): Removed.
(intr_syscalls_on_intr): Removed.
* src/server/param.h (reread_param): Variable removed.
* src/server/server-config.c (reread_param): Removed.
* src/server/connections.c (do_statistics): Variable removed.
Use liboop. (Bug 106).
* src/server/Makefile.am (AM_CPPFLAGS): Added an -I flag for
liboop.
(lyskomd_SOURCES): Added oop-malloc.h and oop-malloc.c.
(lyskomd_LDADD): Link against liboop.a.
* src/server/oop-malloc.c, src/server/oop-malloc.h
(oop_malloc_wrapper): New function.
(oop_free_wrapper): New function.
(oop_realloc_wrapper): New function.
(dump_oop_alloc_counts): New function.
* src/server/ramkomd.c (listen_client): Static variable removed.
(server_init): Initialize liboop. Adjusted to the new isc API:s.
(main): Clean up liboop structures on shutdown.
* src/server/rfc931.h: Adjusted to new libisc API.
* src/server/rfc931.c: Include liboop.h.
* src/server/prot-a.c: Include oop.h.
* src/server/prot-a-send-async.c: Include oop.h.
* src/server/prot-a-parse.c: Include oop.h.
* src/server/prot-a-parse-arg-c.awk: Include oop.h.
* src/server/prot-a-output.c: Include oop.h.
* src/server/isc-interface.h (kom_server_oop_src): New global
variable.
* src/server/connections.c (kom_server_oop_src): New variable.
(set_time): New static function.
(parse_message): Function removed.
(logout_request): Function removed.
(parse_forgotten): Ditto.
(message_request): Ditto.
(write_err_cb): New static function.
(read_from_connection): Ditto.
(setup_timer): Ditto.
(data_available_callback): Ditto.
(handle_accept_event): New function.
(login_request): Take an isc_scb as argument instead of an isc
event. Add read and write error callback functions for the new
client.
(toploop): Rewritten to use liboop.
Code cleanup.
* src/server/internal-connections.c (init_connection): Added
static const qualifiers to the default_want_async variable.
Renamed a few constants that have nothing to do with ISC.
* src/server/isc-parse.h (KOM_PROTOCOL_ERR): New name for former
ISC_PROTOCOL_ERR. All users updated.
(KOM_MSG_INCOMPLETE): New name for former ISC_MSG_INCOMPLETE. All
users updated.
(KOM_LOGOUT): New name for former ISC_LOGOUT. All users updated.
* src/server/isc-parse.c (parse_char): Use KOM_MSG_INCOMPLETE
instead of ISC_MSG_INCOMPLETE.
Make it possible to read an unsigned int from the config file.
* src/server/conf-file.h (assign_uint): New function.
(union param_value): Unused union removed.
* src/server/conf-file.c (assign_uint): New function.
Add SA_RESTART support to liboop. (This has been sent to the
liboop maintainer.) (Fixes bug 845).
* src/libraries/liboop/oop.h (oop_sys_use_sa_restart): New
function.
* src/libraries/liboop/sys.c (sys_sig_owner): Added static
qualifier.
(use_sa_restart): New static variable.
(sys_on_fd): Require the callback to be non-NULL.
(sys_on_time): Ditto.
(sys_on_signal): Ditto.
(sys_on_signal): Use SA_RESTART if use_sa_restart is true.
(oop_sys_use_sa_restart): New function.
Add a few utility string functions.
* src/libraries/libmisc/s-string.h,
src/libraries/libmisc/s-string.c (s_trim_left): New function.
(s_reserve): New function.
(s_reserve_done): New function.
2003-07-10 Per Cederqvist <ceder@ceder.dyndns.org>
Solaris stores ar in /usr/ccs/bin.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment