scripts/silenant.py: Fix error message if ant not found

If Apache Ant is not found, the build fails with a cryptic error
message:

  [penberg@localhost osv]$ make
    ANT tests/bench
  Traceback (most recent call last):
    File "scripts/silentant.py", line 14, in <module>
      stderr = subprocess.PIPE)
    File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
      errread, errwrite)
    File "/usr/lib64/python2.7/subprocess.py", line 1308, in _execute_child
      raise child_exception
  OSError: [Errno 2] No such file or directory
  make: *** [all] Error 1

Make it more human friendly:

  [penberg@localhost osv]$ make
    ANT tests/bench
  Apache Ant not found. Please install the 'ant' package.
  make: *** [all] Error 1

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Test: Add a DNS resolver test

This regression test trigger issue #8
"Make Java InetAddress.getHostName() work" by exercising the DNS
resolver on localhost and a dns root server.

The test takes care of specifying NI_NOFQDN to resolve only the
hostname part of localhost ip.

It appears that the DNS ip is not communicated to the libc by
core/dhcp.cci: /etc/resolv.conf is not filled.

Test contributed while waiting for an fix idea to implement.

Signed-off-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
cli: kill old js console

Having that implementation in the tree even though it was superceded is
confusing and really unnecessary.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
run.py: open up port 22 on user mode networking

Port 22 is usually taken on the host, so use port 2222 instead.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Management update

Update to latest mgmt.git:

* mgmt 76f0e7e...97be48e (5):
  > md5sum: fix ugly spew when file doesn't exist
  > ls: handle non-existing files correctly
  > mgmt/crash: Fix printf format string in test.groovy
  > mgmt: Kill obsolete Rhino-based CLI code
  > mgmt/perf: Fix "perf callstack" usability gitch if there are no traces

The important part is Rhino-based CLI removal which seem to cause lot of
problems for people building OSv on other distributions. The usability
fixes to perf, ls, and md5sum commands are also worth the update.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
virtio-blk: Fix dead assignment in virtio_blk::make_virtio_request()

The 'offset' variable is first assigned to "bio->bio_offset" and then
immediately overwritten with "bio->bio_data & 0xfff". Fix that up.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
virtio-blk: Use mmu::page_size constant

Switch to the mmu::page_size constant instead of inventing our own.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Tests: add trivial sleep test

Add a trivial sleep() test, which sleep()s for 2 seconds, and verifies
that this finishes and has slept for roughly 2 seconds.

I used this for debugging issue #26 - the attempts there ruined timers,
and in particular this trivial test hangs, as sleep() never returns.

(A note to our future automatic testing implementor: We need to allow
for the possibility that a test doesn't cleanly fail, but rather hangs,
and consider this a failure too).

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Fix comments in lfmutex.cc

Trivial fixes to comments in lock-free mutex implementation.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Comment cleanup in queue-mpsc.hh

Some trivial comment cleanup and line-breaks in queue-mpsc.hh.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Management update to finally remove Rhino dependency

Update to latest mgmt.git:

* mgmt 97be48e...7a4db4e (1):
  > crash: Remove Rhono imports that are not used

It removes the last dependency to the old Rhino-based CLI...

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
pcpu: register cpu id in our glue code

All the other fields of the pcpu structure BSD expects are initialized by
the event channel. Except for the cpu id, which the code expects to be already
initialized.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
dhcp: store all IP address fields in host order

Some IP fields are stored in host order and some other in network order.
It makes discovery of the code difficult.
Convert all IP fields to host order and propagate to callers.

Signed-off-by: Benoit Canet <benoit@irqsave.net>