Commit Graph

118 Commits

Author SHA1 Message Date
Evgeny Vereshchagin e87e6962fd travis: turn on UBSan on Fuzzit 2019-06-15 00:09:15 +02:00
Evgeny Vereshchagin 356f607aa3 travis: add 5 more fuzz targets 2019-06-14 22:06:08 +02:00
Jeka Pats 53a42e6268 Continuous Fuzzing Integration with Fuzzit
includes two travis ci steps:

1) Every pull-request/push all fuzzing targets will do a quick
sanity run on the generated corpus and crashes (via Fuzzit)
2) On a daily basis the fuzzing targets will be compiled (from
master) and will and their respectible fuzzing job on Fuzzit
will be updated to the new binary.
2019-06-14 21:09:40 +03:00
Evgeny Vereshchagin 0813a5efb2
Merge pull request #12617 from mbiebl/skip-test-bpf-containers
test-bpf: skip test when run inside containers
2019-05-29 23:11:01 +03:00
Yu Watanabe d7c5b3ec3e
Merge pull request #12510 from keszybz/test-directives
test: run check-directives.sh as part of the test suite
2019-05-21 08:35:10 +09:00
Yu Watanabe 3041250a9f
Merge pull request #12519 from keszybz/man-on-demand
Build man pages on demand only
2019-05-21 08:25:26 +09:00
Zbigniew Jędrzejewski-Szmek f7ebc1e298 travis: use variable to avoid one call 2019-05-20 15:48:05 +02:00
Zbigniew Jędrzejewski-Szmek 9fd1a0babd tests: install perl for CI
It is useful for various tests (test-directives, test-udev, …).
2019-05-20 15:47:28 +02:00
Zbigniew Jędrzejewski-Szmek c6448ee39e test: run check-directives.sh as part of the test suite 2019-05-20 15:44:31 +02:00
Frantisek Sumsal 75acb946cc travis: set the `container` env variable explicitly
As we build a custom Docker image, we need to ensure that systemd
correctly detects it's running in a container. One can simply do this
directly in a Dockerfile (ENV container docker) or when starting the
container (-e container=docker). For the sake of readability, let's
pick the latter approach here.
2019-05-19 23:37:07 +02:00
Evgeny Vereshchagin f572f79e18 tests: catch broken fuzz targets as early as possible
See https://github.com/google/oss-fuzz/pull/2419.
2019-05-19 12:48:12 +03:00
Zbigniew Jędrzejewski-Szmek 5cef20c80a
Merge pull request #12515 from evverx/fix-fuzzers-in-local-mode
travis: make sure the fuzzers can be built in "local" mode
2019-05-16 23:04:45 +02:00
Evgeny Vereshchagin 63dc544b6f tests: make docker-run and helper.py happy by not using colons in filenames
This should address https://github.com/google/oss-fuzz/issues/2428
2019-05-16 20:08:00 +03:00
Evgeny Vereshchagin a0603f8c28 tests: make fuzzbuzz.sh compatible with Azure Pipelines again
Now that https://github.com/systemd/systemd/pull/12542 is merged,
fuzzbuzz.sh should be changed a little bit to make it work
on Azure Pipelines. We can no longer assume that source repositories
are added "automagically" by Travis CI or that PATH is set properly.
2019-05-14 13:58:05 +02:00
Evgeny Vereshchagin 8c6637bab2 travis: make sure the fuzzers can be built in "local" mode 2019-05-14 13:42:17 +02:00
Evgeny Vereshchagin e67d88e74b tests: turn on the QEMU part in the Xenial job
The test has been flaky since varlink was merged.
Let's not annoy people with the test that fails more often than not.

It should be OK because the same test is run on Arch.
2019-05-14 13:13:04 +02:00
Evgeny Vereshchagin bedae21ec5 tests: set NSPAWN_TIMEOUT and QEMU_TIMEOUT explicitly
These were never set explictily because we relied on Travis CI
canceling a job if it's been stuck for 10 minutes. Now that
the script is run on Azure Pipelines (where the default timeout
is 60 minutes) we should limit the script manually to avoid waiting
for an hour for broken jobs to finish.
2019-05-14 13:04:42 +02:00
Evgeny Vereshchagin fa8ac5eb77 tests: make fuzzbuzz.sh compatible with Azure Piplines 2019-05-14 12:22:03 +02:00
Evgeny Vereshchagin 8a243a04d7 travis: make the ASan+UBSan stage compatible with Azure Pipelines 2019-05-12 03:45:29 +02:00
Zbigniew Jędrzejewski-Szmek 0b0673b61a meson: default to -Dman=false to make development quicker
This makes the default build much quicker. If people are building systemd for
packaging or actual installation, they probably need to set some more options
anyway (-Ddns-servers=, -Dntp-servers=), so adding -Dman=true is not a big
burden.

For CIs configured locally, -Dman=true is added to restore status quo ante.
2019-05-09 18:17:28 +02:00
Evgeny Vereshchagin fcbabd0f90 travis: make sure that the fuzz targets can be built on OSS-Fuzz 2019-05-07 21:39:01 +00:00
Evgeny Vereshchagin 9337418565 travis: make sure the fuzz targets can be built on FuzzBuzz 2019-05-07 21:39:01 +00:00
Ben Boeckel 5238e95759 codespell: fix spelling errors 2019-04-29 16:47:18 +02:00
Zbigniew Jędrzejewski-Szmek cc5549ca12 scripts: use 4 space indentation
We had all kinds of indentation: 2 sp, 3 sp, 4 sp, 8 sp, and mixed.
4 sp was the most common, in particular the majority of scripts under test/
used that. Let's standarize on 4 sp, because many commandlines are long and
there's a lot of nesting, and with 8sp indentation less stuff fits. 4 sp
also seems to be the default indentation, so this will make it less likely
that people will mess up if they don't load the editor config. (I think people
often use vi, and vi has no support to load project-wide configuration
automatically. We distribute a .vimrc file, but it is not loaded by default,
and even the instructions in it seem to discourage its use for security
reasons.)

Also remove the few vim config lines that were left. We should either have them
on all files, or none.

Also remove some strange stuff like '#!/bin/env bash', yikes.
2019-04-12 08:30:31 +02:00
Evgeny Vereshchagin c5b4b18e7d travis: use /bin/systemd instead of /usr/bin/systemd
Apparently systemd is in /bin now.
2019-03-05 08:00:22 +03:00
Evgeny Vereshchagin e298df69a2 travis: stop using the official upstream-systemd-ci repository
Turns out the key for the repository hasn't been propagated properly
so let's restore the kludge that was removed in https://github.com/systemd/systemd/pull/11582.
Of course it's ugly but at least it works.

The issue was kind of reported to the maintainers of the repository
in https://github.com/systemd/systemd/pull/11531#issuecomment-460023474.
2019-02-03 08:51:21 +03:00
Evgeny Vereshchagin 8605a4b9eb travis: switch to the "official" systemd-ci repository
Now that add-apt-repository hasn't failed for almost two days on Semaphore
it should be safe to assume that the key has been propagated properly
and the repository is ready to be used on Travis CI.
2019-01-29 11:51:20 +01:00
Evgeny Vereshchagin 71cf890bcc travis: also run TEST-01-BASIC with QEMU to cover udevd and so on 2018-12-29 19:14:35 +01:00
Evgeny Vereshchagin c47bfb198a travis: pass $TRAVIS when running the tests so that they can be skipped properly 2018-12-29 19:14:35 +01:00
Evgeny Vereshchagin 8934737154 travis: merge RUN_CLANG into RUN
They are basically the same except that a couple of environment variables
have to be passed for building systemd with clang.
2018-12-29 19:14:35 +01:00
Evgeny Vereshchagin 9103671d7c test: don't run TEST-01-BASIC in unprivileged containers on Travis CI 2018-12-24 08:52:33 +01:00
Evgeny Vereshchagin 1766204279 travis: add another stage to really run everything under ASan+UBsan
This should help to catch issues like https://github.com/systemd/systemd/issues/11253
and https://github.com/systemd/systemd/issues/11251.
2018-12-24 08:52:33 +01:00
Evgeny Vereshchagin b635e4ef6b travis: use xenial instead of trusty
This should also fix an issue mentioned in
https://github.com/systemd/systemd/pull/11196#issuecomment-448123946.
2018-12-23 11:14:20 +01:00
Evgeny Vereshchagin f413cd0a6a travis: mount tmpfs on /tmp before running the tests
To judge from https://api.travis-ci.org/v3/job/465547774/log.txt,
overlayfs on Travis CI is having trouble delivering inotify events,
which is why `test-path` and `test-event` are failing there.
2018-12-09 11:46:23 +01:00
Evgeny Vereshchagin ee6776b41a travis: use systemd as PID1 in debian containers
Turns out some tests like `test-execute` are tightly coupled with
systemd as PID1 (which should be fixed of course). In the meantime,
let's see how it goes.
2018-12-09 11:31:01 +01:00
Evgeny Vereshchagin 1478aa4eb5 travis: also compile systemd on Debian Testing
This should help to catch issues like https://github.com/systemd/systemd/issues/11075
2018-12-07 17:12:58 +01:00
Evgeny Vereshchagin 05b36f1f65 travis: install llvm to get llvm-symbolizer
See https://clang.llvm.org/docs/AddressSanitizer.html#symbolizing-the-reports
2018-12-04 04:56:02 +01:00
Evgeny Vereshchagin b8366c5497 travis: also run the tests built with clang under ASan+UBsan 2018-12-04 01:10:13 +01:00
Evgeny Vereshchagin 37cbcd4642 travis: also build systemd with clang 2018-12-01 04:53:11 +01:00
Evgeny Vereshchagin a2ab58da1a travis: make sure that *.perf and directives.* files are in sync
New features are constantly added to networkd. Apparently, not everybody
knows that the "directives" files should be updated too to make
the fuzzers aware of them.
2018-11-28 05:12:58 +01:00
Evgeny Vereshchagin f5f9a580dd tests: skip test_exec_ambientcapabilities on Travis CI under ASan
Let's not bother contributors with spurious failures nobody can't
seem to reproduce. There is an issue about that where we're trying
to figure out what's going on: https://github.com/systemd/systemd/issues/10696.
2018-11-20 20:23:19 +01:00
Evgeny Vereshchagin b6b35f0e0b travis: make the ASan & UBsan job a little bit stricter 2018-11-17 14:20:49 +03:00
Evgeny Vereshchagin d419b75ce9 travis: use double the normal timeout in the ASan & UBSan stage
This should somewhat address https://github.com/systemd/systemd/issues/10696.
2018-11-14 16:17:04 +01:00
Evgeny Vereshchagin 7970a52509 travis: also compile and run unsafe unit tests 2018-11-14 09:55:23 +01:00
Evgeny Vereshchagin b0395ac5cd travis: treat warnings as errors while building systemd 2018-11-10 03:27:19 +03:00
Frantisek Sumsal 7a30256588 tests: keep SYS_PTRACE when running under ASan 2018-11-09 16:26:19 +01:00
Evgeny Vereshchagin cdd116b4e1 travis: use 3 times the normal timeout when the tests are run under ASan+UBSan 2018-11-08 13:49:46 +01:00
Evgeny Vereshchagin 993476841a travis.yml: replace test-capability with a script exiting with 77
The test is currently failing when run under ASan in a docker container:
```
--- command ---
SYSTEMD_KBD_MODEL_MAP='/build/src/locale/kbd-model-map' PATH='/build/build:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' SYSTEMD_LANGUAGE_FALLBACK_MAP='/build/src/locale/language-fallback-map' /build/build/test-capability
--- stderr ---
have ambient caps: yes
Capabilities:= cap_chown,cap_dac_override,cap_dac_read_search,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_linux_immutable,cap_net_bind_service,cap_net_broadcast,cap_net_admin,cap_net_raw,cap_ipc_lock,cap_ipc_owner,cap_sys_module,cap_sys_rawio,cap_sys_chroot,cap_sys_ptrace,cap_sys_pacct,cap_sys_admin,cap_sys_boot,cap_sys_nice,cap_sys_resource,cap_sys_time,cap_sys_tty_config,cap_mknod,cap_lease,cap_audit_write,cap_audit_control,cap_setfcap,cap_mac_override,cap_mac_admin,cap_syslog,cap_wake_alarm,cap_block_suspend,cap_audit_read+eip
Capabilities:= cap_dac_override,cap_net_raw+ep
==7021==LeakSanitizer has encountered a fatal error.
==7021==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
==7021==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)
Assertion 'WIFEXITED(status) && WEXITSTATUS(status) == 0' failed at ../src/test/test-capability.c:71, function fork_test(). Aborting.
-------
```

https://api.travis-ci.org/v3/job/452349948/log.txt
2018-11-08 13:49:46 +01:00
Evgeny Vereshchagin 6dfe7f43d0 travis: UBSan should be every C programmer's friend so let's build systemd with it too 2018-11-08 13:49:45 +01:00
Evgeny Vereshchagin 79f6178ee1 travis: move the ASan part into a separate stage 2018-11-08 13:49:45 +01:00
Evgeny Vereshchagin 1667d63acc travis: also rebuild everything with ASan
It should help to catch issues like https://github.com/systemd/systemd/issues/10677.
2018-11-08 13:49:45 +01:00
Evgeny Vereshchagin e4f8f99c6f travis: install dependencies necessary for running parse-hwdb.py 2018-11-08 13:49:45 +01:00
Frantisek Sumsal 731555601c travis: drop the workaround for test-capability 2018-11-08 11:07:27 +01:00
Evgeny Vereshchagin eeec5f2a69 travis: show all commands when building systemd
This should prevent Travis CI from terminating build jobs
that don't print anything for more than 10 minutes.

See https://travis-ci.org/systemd/systemd/builds/451737177.
2018-11-07 07:49:50 +01:00
Evgeny Vereshchagin b9abc93558 travis: build and run fuzzers against crash reproducers 2018-11-07 07:47:22 +01:00
Evgeny Vereshchagin 9608a59449 travis: overwrite test-capability with a simple script that is just skipped
so that it will be possible to work on the test failure and try to make
Travis CI work at the same time.
2018-11-07 02:55:07 +01:00
Frantisek Sumsal 532a92fbdf travis: workaround for dnf upgrade
dnf upgrade on Fedora Rawhide pulls in unwanted selinux-policy
packages which breaks the system in several ways (and usually
ends up with crashed systemd)
2018-11-06 21:09:45 +01:00
Frantisek Sumsal 0d589dfcee travis: drop the unnecessary /etc/machine-id magic 2018-11-06 17:16:45 +01:00
Frantisek Sumsal 059f31920e travis: run Coverity on a more stable Fedora release 2018-11-06 16:27:34 +01:00
Frantisek Sumsal a9145fc488 travis: move Docker setup to a separate script
This should make debugging somewhat easier
2018-11-06 15:56:52 +01:00
Frantisek Sumsal 3bbdc2f9d5 travis: rewrite .travis.yml and re-enable Travis CI for Fedora 2018-11-06 00:17:08 +01:00
Evegeny Vereshchagin d5a650d2c3 travis: use Fedora 27 as a base image
It was confirmed experimentally that Fedora 27 is more suitable
for running cov-build than Fedora 28:
https://github.com/systemd/systemd/issues/9186#issuecomment-394577877.
2018-06-05 12:03:18 +03:00
Evegeny Vereshchagin 707fe958b7 travis: get python installed while building a docker image
coverity.sh tries to run python, so it should be installed
to make everything work.

According to https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3#Current_status,
python seems to be the right name of the package.

Closes https://github.com/systemd/systemd/issues/9186.
2018-06-05 02:03:05 +03:00
Michal Sekletar 2777cf4848 travis: drop ccache requirement 2018-06-04 19:44:07 +02:00
Michal Sekletar f0b19a0376 travis: DOCKER_REPOSITORY is no longer set. Don't require it. 2018-06-04 19:40:34 +02:00
Michal Sekletar 3f4b547a55 travis: use Travis CI only for running scheduled Coverity scans
Building and testing of systemd on Fedora Rawhide is now handled by
dedicated Fedora CI. We don't need to duplicate this in Travis CI.
2018-06-04 20:14:37 +03:00
Omer Katz 94153a7fd9
Install ccache in container. 2018-05-22 17:48:14 +03:00
Marek Čermák 99127d20ce Integration of Travis CI and Coverity Scan Analysis (#7691)
- Coverity scan analysis tasks run as scheduled cron jobs

- Stage separation for Build, Test and Coverity scan phase
- Travis CI now uses Fedora container to build and run tests

- Containers are accessible from Docker Hub and failed builds
  can be reproduced and examined

- coverity.sh: separate build and upload
2018-01-11 11:41:35 +01:00