Commit Graph

31 Commits

Author SHA1 Message Date
Norman Feske
6154d9067e libports: avoid using deprecated APIs
Issue #1987
Issue #3125
2019-01-30 13:49:55 +01:00
Josef Söntgen
bb8e532361 http_srv: use libc print API
Thereby one can set 'stdout' to /dev/null.
2018-08-08 13:33:37 +02:00
Josef Söntgen
a7eb347ce2 libports: remove obsolete pingpong client 2018-08-02 14:36:50 +02:00
Martin Stein
9b31aac1de LwIP tests: use VFS LwIP plugin
Issue #2335
2018-08-02 14:36:48 +02:00
e36ddaf659 Rename lwip library to lwip_legacy
Rename LwIP library in preparation for removal of LwIP libc plugin. The
current LwIP library will be replaced with a new version stripped of its
synchronous socket support. The next version will be incompatible with
the current, so removing 'lwip.lib.so' completely for a period makes it
easy to identify legacy users.

Fix #2797
2018-05-30 13:36:22 +02:00
Martin Stein
375a7c701a test/lwip clients: exit with error code
Issue #2751
2018-05-03 15:31:56 +02:00
Martin Stein
6ec8824d75 test/lwip/udp/client: handle missing attributes
Print a useful message if a manadatory config attribute is
missing and exit.

Issue #2751
2018-05-03 15:31:55 +02:00
Martin Stein
95005a0ae3 test/lwip/udp/client: deal with packet loss
Try it 10 times and expect 5 of them to succeed.

Ref #2670
2018-03-29 15:16:35 +02:00
Martin Stein
72036d3f88 test/lwip/http_clnt: don't succeed falsely
Ref #2670
2018-03-29 15:09:47 +02:00
Christian Helmuth
30b0bd641f Remove obsolete config_args library dependency 2018-02-09 13:34:21 +01:00
Norman Feske
c2590995c0 posix ABI: require 'main' symbol
Issue #2648
2018-02-09 13:34:20 +01:00
Norman Feske
366bba0227 Exclude higher-level repos from strict warnings
This is a follow-up commit to "Increase default warning level", which
overrides Genode's new default warning level for targets contained in
higher-level repositories. By explicitly whitelisting all those targets,
we can selectively adjust them to the new strictness over time - by
looking out for 'CC_CXX_WARN_STRICT' in the target description files.

Issue #465
2018-01-17 12:14:36 +01:00
Martin Stein
d37f32fb21 nic_router.run: raise timeouts for sel4+qemu 2017-11-30 11:23:11 +01:00
Martin Stein
657fa16f8c nic_router: use LwIP- instead of LxIP UDP-tests
Currently, LxIP peers need a lot of RAM (the simple test-client/server for the
nic_router test need at least 28 MB per component). As the nic_router test
previously used 6 instances of such components and a lot of other components,
it had issues with insufficient RAM on some platforms. By using two new
LwIP-based UDP tests instead, we save more than 100 MB.

Ref #2543
2017-11-30 11:23:03 +01:00
Stefan Kalkowski
632ef28463 os: removal of deprecated os/config.h (fix #2431) 2017-05-31 13:16:22 +02:00
Christian Helmuth
88db3c0df7 Fix some deprecated warnings
Issue #1987
2017-03-24 16:20:03 +01:00
Norman Feske
29b8d609c9 Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
Martin Stein
d2832c3e4d lwip/http_clnt: remove unused variable
Ref #2193
2017-02-28 12:59:22 +01:00
Martin Stein
959b80bab1 lxip/lwip tests: non-libc attributes to config tag
The 'server_ip' and 'server_port' attributes for 'lxip/udp_client' and
'lwip/http_clnt' as well as the 'port' attribute for 'lxip/udp_echo' and
'lwip/http_srv_static' are not directly libc-related so they should not
live in the libc tag but in the config tag of the component.

Ref #2193
2017-02-28 12:59:21 +01:00
Martin Stein
b57834f26b lwip/http_clnt: circumvent LWIP cleanup exceptions
Cleaning up LWIP when returning from the main function sporadically
leads to endless errors "Error: sys_arch_mbox_fetch: unknown exception
occured!". We let the client sleep forever at the end of its main function
to prevent tests from failing due to a flooded log.

Reg #2193
2017-01-31 12:01:12 +01:00
Emery Hemingway
18504b4801 merge lib/config_args with lib/posix
Merging the config_args library with the POSIX library supplies
'argc' and 'argv' arguments to components using a 'main' entry.

Fix #2218
Ref #1987
2017-01-20 16:46:55 +01:00
Norman Feske
4da52517c1 Simpify startup of dynamically linked binaries
This patch removes the component_entry_point library, which used to
proved a hook for the libc to intercept the call of the
'Component::construct' function. The mechansim has several shortcomings
(see the discussion in the associated issue) and was complex. So we
eventually discarded the approach in favor of the explicit handling of
the startup.

A regular Genode component provides a 'Component::construct' function,
which is determined by the dynamic linker via a symbol lookup.
For the time being, the dynamic linker falls back to looking up a 'main'
function if no 'Component::construct' function could be found.

The libc provides an implementation of 'Component::construct', which
sets up the libc's task handling and finally call the function
'Libc::Component::construct' from the context of the appllication task.
This function is expected to be provided by the libc-using application.
Consequently, Genode components that use the libc have to implement the
'Libc::Component::construct' function.

The new 'posix' library provides an implementation of
'Libc::Component::construct' that calls a main function. Hence, POSIX
programs that merely use the POSIX API merely have to add 'posix' to the
'LIBS' declaration in their 'target.mk' file. Their execution starts at
'main'.

Issue #2199
2017-01-13 13:06:52 +01:00
Martin Stein
28153ad8ef LWIP HTTP client: do not require FOC
We don't know why this component requires FOC anymore and it seems to be fine with other
platforms at well.

Ref #2193
2016-12-23 16:52:09 +01:00
Martin Stein
f90964fdcc udp_client/http_clnt: print success message
Ref #2139
2016-11-30 13:38:05 +01:00
Martin Stein
9dddc905e2 lwip/http_clnt: fix ambiguous size_t
Ref #2139
2016-11-30 13:38:04 +01:00
Josef Söntgen
9013ca5364 libports: remove old lwIP foc_panda tracing tests
These tests were used for examine lwIP on foc_panda a few years back
but serve no particular purpose as of now.

Issue #2121.
2016-10-21 12:39:34 +02:00
Norman Feske
e370e08e01 Define Genode::size_t as unsigned long
Fixes #2105
2016-10-21 12:39:29 +02:00
Martin Stein
dbbda9839b lwip: enhance http_srv_static and http_clnt
Both, client and server now read their IP config from their Genode config.
Furthermore, the client now waits 4 instead of 2 seconds before sending the
first request to prevent connection fails in tests with a slow startup. The
client truncates its packet dump for better readability.

Ref #114
2016-08-29 17:29:37 +02:00
Norman Feske
17c79a9e23 base: avoid use of deprecated base/printf.h
Besides adapting the components to the use of base/log.h, the patch
cleans up a few base headers, i.e., it removes unused includes from
root/component.h, specifically base/heap.h and
ram_session/ram_session.h. Hence, components that relied on the implicit
inclusion of those headers have to manually include those headers now.

While adjusting the log messages, I repeatedly stumbled over the problem
that printing char * arguments is ambiguous. It is unclear whether to
print the argument as pointer or null-terminated string. To overcome
this problem, the patch introduces a new type 'Cstring' that allows the
caller to express that the argument should be handled as null-terminated
string. As a nice side effect, with this type in place, the optional len
argument of the 'String' class could be removed. Instead of supplying a
pair of (char const *, size_t), the constructor accepts a 'Cstring'.
This, in turn, clears the way let the 'String' constructor use the new
output mechanism to assemble a string from multiple arguments (and
thereby getting rid of snprintf within Genode in the near future).

To enforce the explicit resolution of the char * ambiguity, the 'char *'
overload of the 'print' function is marked as deleted.

Issue #1987
2016-08-29 17:27:10 +02:00
Norman Feske
fd401bdf53 Thread API cleanup
This patch cleans up the thread API and comes with the following
noteworthy changes:

- Introduced Cpu_session::Weight type that replaces a formerly used
  plain integer value to prevent the accidental mix-up of
  arguments.
- The enum definition of Cpu_session::DEFAULT_WEIGHT moved to
  Cpu_session::Weight::DEFAULT_WEIGHT
- New Thread constructor that takes a 'Env &' as first argument.
  The original constructors are now marked as deprecated. For the
  common use case where the default 'Weight' and 'Affinity' are
  used, a shortcut is provided. In the long term, those two
  constructors should be the only ones to remain.
- The former 'Thread<>' class template has been renamed to
  'Thread_deprecated'.
- The former 'Thread_base' class is now called 'Thread'.
- The new 'name()' accessor returns the thread's name as 'Name'
  object as centrally defined via 'Cpu_session::Name'. It is meant to
  replace the old-fashioned 'name' method that takes a buffer and size
  as arguments.
- Adaptation of the thread test to the new API

Issue #1954
2016-05-23 15:49:55 +02:00
Norman Feske
ca971bbfd8 Move repositories to 'repos/' subdirectory
This patch changes the top-level directory layout as a preparatory
step for improving the tools for managing 3rd-party source codes.
The rationale is described in the issue referenced below.

Issue #1082
2014-05-14 16:08:00 +02:00