Tuka Martin [Sun, 1 May 2011 02:33:51 +0000 (04:33 +0200)]
fwp_mngr: Splitted forb_executor into 2 instances & threads
Added forb instance for contract broker. (For ability
of calling redistribute_spare_capacity function, which is
called after change of rate / new station addition)
TODO: optimalize function calling interval
Tuka Martin [Wed, 27 Apr 2011 22:43:58 +0000 (00:43 +0200)]
Added type conversion because of difference in behavior
Test had unpredictable behavior with hard estimated dependency
(It wasn't able to find some contracts, which was correctly
added to scenario.)
Called frsh_destroy function for corrected end of the test
Michal Sojka [Wed, 27 Apr 2011 05:41:50 +0000 (07:41 +0200)]
Fix linker complains about missing libraries
After an upgrade, I got errors like this:
/usr/bin/ld: fwp-timing.o: undefined reference to symbol 'clock_nanosleep@@GLIBC_2.2.5'
/usr/bin/ld: note: 'clock_nanosleep@@GLIBC_2.2.5' is defined in DSO /lib64/librt.so.1 so try adding it to the linker command line
/lib64/librt.so.1: could not read symbols: Invalid operation
It was sufficient to fix them by adding mentioned libraries explicitely in
Makefile.omk.
Michal Sojka [Wed, 27 Apr 2011 05:25:13 +0000 (07:25 +0200)]
Fix linker complains about missing libraries
After an upgrade, I got errors like this:
/usr/bin/ld: fwp-timing.o: undefined reference to symbol 'clock_nanosleep@@GLIBC_2.2.5'
/usr/bin/ld: note: 'clock_nanosleep@@GLIBC_2.2.5' is defined in DSO /lib64/librt.so.1 so try adding it to the linker command line
/lib64/librt.so.1: could not read symbols: Invalid operation
It was sufficient to fix them by adding mentioned libraries explicitely in
Makefile.omk.
Michal Sojka [Mon, 18 Apr 2011 22:27:25 +0000 (00:27 +0200)]
Prepare for compiling FORB "components" for RTEMS
On Linux, FORB modules are normal shared libraries. The RTEMS support
for shared libraries does not seem to be mature so we use static libraries
for the components. These will have to be linked manually to the final
application.
The FORB components should use FORB_MAIN macro to define their main
function (previously called forb_main).
In this commit I only convert dummy resource to this new syntax. The rest
is leaved for Petr :-)
It will be necessary to implement an equivalent of forbrun for RTEMS. My
idea is to introduce a special ELF section with pointers to FORB_MAIN
functions and these functions will be called at the end of forb_init().
Tuka Martin [Tue, 12 Apr 2011 21:41:49 +0000 (23:41 +0200)]
fwp: Added test for checking list of stations
Adjusted mac address 'to number' converter.
Added test for checking right of handling with list of
stations.
Added function for printing list of stations.
Michal Sojka [Sat, 12 Mar 2011 14:40:43 +0000 (15:40 +0100)]
wvtestrun produces nicer and more readable output
Now, when stdout is a TTY, the results are aligned to the same column
and are preceeded by colorized leaders ("........") to easily find the
text matching to the result.
Tuka Martin [Fri, 11 Mar 2011 02:41:28 +0000 (03:41 +0100)]
implemented sending of transmission parameters from all stations to resource manager
Wifi_agent is a program which finds out trasmission parameters. (using nl80211 library)
Sending is done with FORB, which was implemented on both sides of communication.
On manager side transmission parameters of all stations are saved in dynamically created linked list (using ulut library). Saved parameters are mac address of station and its transmission bitrate.
Michal Sojka [Thu, 24 Feb 2011 15:24:16 +0000 (16:24 +0100)]
forb: Add forb_executor_synchronize()
This is used to wait for executors to finish processing ongoing requests
during FORB termination. This ensures that all peer sockets are closed
and wvtest does not complain about open file descriptors at the end of
tests.
Michal Sojka [Thu, 24 Feb 2011 11:36:14 +0000 (12:36 +0100)]
wvtest/sh: Do not exit shell script unless $WVTEST_DIE_FAST is set
If the shell script performs setup and cleanup for the test, it is
important to cleanup even when the test fails. So by default, we do not
exit, but only return the exit code of failed command.
Michal Sojka [Thu, 24 Feb 2011 11:31:54 +0000 (12:31 +0100)]
frsh: Do not include test functions
The output of test is easier to read when the name of the test script is
displayed in the test output. Therefore, we copy the setup/exit code
that is common to the all tests to the tests themselves.
Michal Sojka [Sun, 20 Feb 2011 09:42:58 +0000 (10:42 +0100)]
forb: Fix synchronization error in forbrun
forbrun starts servers synchronously, i.e. the next server is started
only after the previous one is fully initialized (see
forb_signal_server_ready()). This synchronization was broken because
forb_signal_server_ready() was incorrectly called in
forb_execute_object() called from forb_execution_thread() called from
forb_init(). This caused that the semaphore for the synchronization had
the value of one (instead of zero) when forb_init() finished.
Therefore, the first waiting for the semaphore returned immediately
without actually waiting for the server.
This is now fixed by introduction of default_executor which is declared
in struct forb. This executor is initialized "manually", without
forb_execute_object(), so that the forb_signal_server_ready() is not
called.
In future, we might want use the default executor for executing requests
to other objects, which do not require a separate thread.
Michal Sojka [Sun, 20 Feb 2011 08:31:58 +0000 (09:31 +0100)]
wvtest: WVFAIL(cond) returns cond
Previously WVFAIL returned !cond. In my optinion it was confusing
because the statements
if (cond) print_error();
and
if (WVFAIL(cond)) print_error();
behaved differently. Now, they are functionally equivalent. In the
implementation we use C extensions typeof() and "statement expression"
to avoid duplication of side-effects caused by cond evaluation.