Bug 8767 - Fix systemd ptest support
Summary: Fix systemd ptest support
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.8.2
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.1 M3
Assignee: Jussi Kukkonen
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-12-04 09:27 UTC by dawei
Modified: 2016-03-21 09:57 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dawei 2015-12-04 09:27:44 UTC
Now sysmted has run-ptest and related files but it doesn't output the expected logs when running

# ./run-ptest
make: *** No rule to make target 'test/rules-test.sh.log'.  Stop.
make: 'test/udev-test.pl.log' is up to date.
Comment 1 Jussi Kukkonen 2015-12-11 13:16:23 UTC
the systemd ptests are broken, but also badly incomplete:
* systemd v225 has ~130 separate test binaries (at least 116 of them non-manual).
* We install _one_ of the binaries and one python script

I'll see if it's possible to get better coverage. Just fixing what we now have does not seem worth the trouble.
Comment 2 Ross Burton 2015-12-11 14:11:28 UTC
If it's fundamentally broken and fixing isn't simple lets at least delete the broken support until it can be re-added properly.
Comment 3 Jussi Kukkonen 2016-03-15 18:56:18 UTC
I have a branch that gets us to this state:

      PASS: 108
      SKIP:   6
      FAIL:   2

This seems worthwhile as the tests look useful and not horribly slow. The failures are:

* test-acl-util:
fails because it tries to use ACLs on /tmp which at least with systemd is a tmpfs and does not support ACLs (maybe we don't enable the kernel option?)

* test-execute:
tries to check that "PrivateNetwork=yes" works by running this:
     i=$(ip link | grep ": " | grep -v ": lo:"); test -z "$i"
this fails because poky seems to have a sit-interface (a 6to4 tunnel) running nowadays and that is still there with PrivateNetwork=yes


I'll send a patch after sorting these out somehow.
Comment 4 Ross Burton 2016-03-15 20:55:57 UTC
Nice!

I've just filed bug 9269 for the ACL on tmpfs thing.

The sit0 interface I've never seen before.  Presumably this is systemd+connman, on what MACHINE?
Comment 5 Jussi Kukkonen 2016-03-16 07:40:22 UTC
(In reply to comment #4)
> Nice!
> 
> I've just filed bug 9269 for the ACL on tmpfs thing.

Thanks.

> The sit0 interface I've never seen before.  Presumably this is
> systemd+connman, on what MACHINE?

It does not show up on ifconfig at all but:

--- 
root@qemux86-64:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
3: sit0@NONE: <NOARP> mtu 1480 qdisc noop 
    link/sit 0.0.0.0 brd 0.0.0.0
root@qemux86-64:~# 
root@qemux86-64:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
    inet 192.168.7.6/24 brd 192.168.7.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fe12:3456/64 scope link 
       valid_lft forever preferred_lft forever
3: sit0@NONE: <NOARP> mtu 1480 qdisc noop 
    link/sit 0.0.0.0 brd 0.0.0.0
---

This is core-image-sato on qemux86-64 with very few changes apart from setting systemd as init manager.
Comment 6 Jussi Kukkonen 2016-03-21 09:57:34 UTC
This should be now fixed, with two expected failures (see below). Testing requires systemd as init:
  DISTRO_FEATURES_append = " systemd"
  VIRTUAL-RUNTIME_init_manager = "systemd"

--

commit 8c0148f7b9d8532bbefbef7cc0495f879f4d12c4
Author: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date:   Wed Mar 16 14:13:45 2016 +0200

    systemd: Fix and expand ptests
    
    systemd-ptest only runs a couple of tests currently.
    * Install all test binaries and required data files
    * Add missing runtime dependencies for -ptest
    * Fix paths required for on-target testing in do_configure_prepend()
    * cleanup do_install_ptest()
    
    For reference, results on current core-image-sato:
      PASS: 109
      SKIP:   5
      FAIL:   2
    
    test-execute failure:
    https://github.com/systemd/systemd/issues/2852
    
    test-acl-util failure:
    https://bugzilla.yoctoproject.org/show_bug.cgi?id=9269
    
    Fixes [YOCTO #8767].
    
    (From OE-Core rev: 753daf14da4017cd5d245f1587ca44faa39784f5)