falco: Unable to run Regression test on host after build from source.
What happened:
Tried running Regression test using command ./test/run_regression_tests.sh $PWD/build.
The test case execution gave following error.
JOB LOG : /root/falco/test/job-results/job-2019-08-27T10.37-c4333bd/job.log
Error running method "initialize" of plugin "yaml_to_mux": 'Namespace' object has no attribute 'get'
(1/1) /root/falco/test/falco_test.py:FalcoTest.test: ERROR: [Errno 2] No such file or directory (/build/release/userspace/falco/falco -r /root/falco/test/../rules/falco_rules.yaml -c /root/falco/test/../falco.yaml -o json_output=False -o json_include_output_property=True -o priority=debug -v) (0.04 s)
RESULTS : PASS 0 | ERROR 1 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB TIME : 0.16 s
What you expected to happen: Successful execution of tests.
How to reproduce it (as minimally and precisely as possible): After Complete build. Follow steps from falco documentation to run test cases.( https://falco.org/docs/source/#run-the-tests )
Anything else we need to know?: Looks like it is searching for specific folder structure (build/release/<some files>). Observed that release directory did not get created after building falco.
Environment:
-
Falco version (use
falco --version):0.17.0 -
OS (e.g:
cat /etc/os-release):
VERSION="18.04.2 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
-
Kernel (e.g.
uname -a):Linux ************** 4.15.0-52-generic #56-Ubuntu SMP Tue Jun 4 22:49:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux -
Install tools (e.g. in kubernetes, rpm, deb, from source):
Build from Source.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 20 (8 by maintainers)
I think I made this easier in https://github.com/falcosecurity/falco/commit/6e11e75c1522e99bbbad1967f7031538e1a9c0bf#diff-e7e5a4947037bfbf38f675b1e40611a2. Try setting BUILD_DIR to the directory on the host where your build directory is before running the regression tests.
Also, you’ll want to make sure you have the python package https://github.com/avocado-framework/avocado installed (our tester image uses 0.69.0) and also has the yaml-to-mux plugin installed. https://github.com/falcosecurity/falco/blob/dev/docker/tester/Dockerfile shows the installation steps to install it, from a fedora base image.
I confirm that the bug exists. Would you like to try to submit a first PR to fix it?
This sounds like a good first issue to approach the project. 😃