Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Auditbeat] Failing x-pack/auditbeat tests on Windows #9748

Closed
cwurm opened this issue Dec 21, 2018 · 2 comments
Closed

[Auditbeat] Failing x-pack/auditbeat tests on Windows #9748

cwurm opened this issue Dec 21, 2018 · 2 comments
Labels
Auditbeat flaky-test Unstable or unreliable test cases.

Comments

@cwurm
Copy link
Contributor

cwurm commented Dec 21, 2018

Flaky Test

  • Test Name: process unit test, and system tests in general (both Windows only)
  • Link: Unit test and system tests.
  • Branch: master, 6.x, 6.6
  • Artifact Link: na
  • Notes: The unit test failure is caused by an error during process collection. [Auditbeat] Report process errors #9693 will fix the test failure by collecting the errors instead of stopping, but it will need more investigation into what is failing. The system test failure is an import error that is still a mystery to me.

Stack Trace

process unit test, e.g. here

10:29:11 >> go test: Unit Testing
10:29:18 FAILURES:
10:29:18 Error: go test failed: 1 test failures
10:29:18 Package: github.com/elastic/beats/x-pack/auditbeat/module/system/process
10:29:18 Test:    TestData
10:29:18 C:/Users/jenkins/workspace/elastic+beats+master+multijob-windows/beat/x-pack/auditbeat/label/windows/src/github.com/elastic/beats/x-pack/auditbeat/module/system/process/process.go:295
10:29:18 C:/Users/jenkins/workspace/elastic+beats+master+multijob-windows/beat/x-pack/auditbeat/label/windows/src/github.com/elastic/beats/x-pack/auditbeat/module/system/process/process.go:184
10:29:18 C:/Users/jenkins/workspace/elastic+beats+master+multijob-windows/beat/x-pack/auditbeat/label/windows/src/github.com/elastic/beats/x-pack/auditbeat/module/system/process/process.go:161
10:29:18 C:/Users/jenkins/workspace/elastic+beats+master+multijob-windows/beat/x-pack/auditbeat/label/windows/src/github.com/elastic/beats/metricbeat/mb/testing/modules.go:203
10:29:18 C:/Users/jenkins/workspace/elastic+beats+master+multijob-windows/beat/x-pack/auditbeat/label/windows/src/github.com/elastic/beats/x-pack/auditbeat/module/system/process/process_test.go:16
10:29:18 C:/Users/jenkins.BEATS-CI-WINDOW/.gvm/versions/go1.11.4.windows.amd64/src/testing/testing.go:827
10:29:18 C:/Users/jenkins.BEATS-CI-WINDOW/.gvm/versions/go1.11.4.windows.amd64/src/runtime/asm_amd64.s:1333
10:29:18 C:/Users/jenkins/workspace/elastic+beats+master+multijob-windows/beat/x-pack/auditbeat/label/windows/src/github.com/elastic/beats/x-pack/auditbeat/module/system/process/process.go:186
10:29:18 C:/Users/jenkins/workspace/elastic+beats+master+multijob-windows/beat/x-pack/auditbeat/label/windows/src/github.com/elastic/beats/x-pack/auditbeat/module/system/process/process.go:161
10:29:18 C:/Users/jenkins/workspace/elastic+beats+master+multijob-windows/beat/x-pack/auditbeat/label/windows/src/github.com/elastic/beats/metricbeat/mb/testing/modules.go:203
10:29:18 C:/Users/jenkins/workspace/elastic+beats+master+multijob-windows/beat/x-pack/auditbeat/label/windows/src/github.com/elastic/beats/x-pack/auditbeat/module/system/process/process_test.go:16
10:29:18 C:/Users/jenkins.BEATS-CI-WINDOW/.gvm/versions/go1.11.4.windows.amd64/src/testing/testing.go:827
10:29:18 C:/Users/jenkins.BEATS-CI-WINDOW/.gvm/versions/go1.11.4.windows.amd64/src/runtime/asm_amd64.s:1333
10:29:18 ----

System tests, e.g. here:

11:31:48 >> go test: Unit Test Passed
11:31:48 System testing x-pack/auditbeat
11:31:59 E
11:31:59 ======================================================================
11:31:59 ERROR: Failure: ImportError (No module named metricbeat)
11:31:59 ----------------------------------------------------------------------
11:31:59 Traceback (most recent call last):
11:31:59   File "c:\python27\lib\site-packages\nose\loader.py", line 418, in loadTestsFromName
11:31:59     addr.filename, addr.module)
11:31:59   File "c:\python27\lib\site-packages\nose\importer.py", line 47, in importFromPath
11:31:59     return self.importFromDir(dir_path, fqname)
11:31:59   File "c:\python27\lib\site-packages\nose\importer.py", line 94, in importFromDir
11:31:59     mod = load_module(part_fqname, fh, filename, desc)
11:31:59   File "C:\Users\jenkins\workspace\elastic+beats+pull-request+multijob-windows\beat\x-pack\auditbeat\label\windows\src\github.com\elastic\beats\x-pack\auditbeat\tests\system\test_metricsets.py", line 9, in <module>
11:31:59     from auditbeat_xpack import *
11:31:59   File "C:\Users\jenkins\workspace\elastic+beats+pull-request+multijob-windows\beat\x-pack\auditbeat\label\windows\src\github.com\elastic\beats\x-pack\auditbeat\tests\system\auditbeat_xpack.py", line 5, in <module>
11:31:59     from auditbeat import BaseTest as AuditbeatTest
11:31:59   File "C:\Users\jenkins\workspace\elastic+beats+pull-request+multijob-windows\beat\x-pack\auditbeat\label\windows\src\github.com\elastic\beats\x-pack\auditbeat\tests\system\../../../../auditbeat/tests/system\auditbeat.py", line 11, in <module>
11:31:59     from metricbeat import BaseTest as MetricbeatTest
11:31:59 ImportError: No module named metricbeat
@cwurm cwurm added Auditbeat flaky-test Unstable or unreliable test cases. SecOps labels Dec 21, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/secops

cwurm pushed a commit that referenced this issue Dec 21, 2018
Addresses #9748 by skipping the `process` unit and system test on Windows, and changing the inheritance of `AuditbeatXPackTest` for system tests.
cwurm pushed a commit to cwurm/beats that referenced this issue Dec 21, 2018
Addresses elastic#9748 by skipping the `process` unit and system test on Windows, and changing the inheritance of `AuditbeatXPackTest` for system tests.

(cherry picked from commit ba2fc3b)
cwurm pushed a commit to cwurm/beats that referenced this issue Dec 21, 2018
Addresses elastic#9748 by skipping the `process` unit and system test on Windows, and changing the inheritance of `AuditbeatXPackTest` for system tests.

(cherry picked from commit ba2fc3b)
@cwurm
Copy link
Contributor Author

cwurm commented Dec 21, 2018

The ImportError in the system test is fixed with #9750.

Both unit and system test for the process metricset are skipped on Windows for now because of problems in the data collection.

cwurm pushed a commit that referenced this issue Dec 21, 2018
…at tests (#9754)

Cherry-pick of PR #9750 to 6.6 branch. Original message: 

Addresses #9748 by skipping the `process` unit test on Windows, and changing the inheritance of `AuditbeatXPackTest` for system tests.
cwurm pushed a commit that referenced this issue Dec 21, 2018
…at tests (#9755)

Cherry-pick of PR #9750 to 6.x branch. Original message: 

Addresses #9748 by skipping the `process` unit test on Windows, and changing the inheritance of `AuditbeatXPackTest` for system tests.
cwurm pushed a commit that referenced this issue Jan 4, 2019
Changes the process metricset to skip the System Process (PID: 0) as well as any process access has been denied to on Windows. Adds Windows to the documentation.

Fixes #9748.
cwurm pushed a commit to cwurm/beats that referenced this issue Jan 4, 2019
…stic#9863)

Changes the process metricset to skip the System Process (PID: 0) as well as any process access has been denied to on Windows. Adds Windows to the documentation.

Fixes elastic#9748.

(cherry picked from commit 72b96a7)
cwurm pushed a commit to cwurm/beats that referenced this issue Jan 4, 2019
…stic#9863)

Changes the process metricset to skip the System Process (PID: 0) as well as any process access has been denied to on Windows. Adds Windows to the documentation.

Fixes elastic#9748.

(cherry picked from commit 72b96a7)
cwurm pushed a commit that referenced this issue Jan 4, 2019
…) (#9886)

Changes the process metricset to skip the System Process (PID: 0) as well as any process access has been denied to on Windows. Adds Windows to the documentation.

Fixes #9748.

(cherry picked from commit 72b96a7)
cwurm pushed a commit that referenced this issue Jan 4, 2019
…) (#9887)

Changes the process metricset to skip the System Process (PID: 0) as well as any process access has been denied to on Windows. Adds Windows to the documentation.

Fixes #9748.

(cherry picked from commit 72b96a7)
leweafan pushed a commit to leweafan/beats that referenced this issue Apr 28, 2023
…auditbeat tests (elastic#9754)

Cherry-pick of PR elastic#9750 to 6.6 branch. Original message: 

Addresses elastic#9748 by skipping the `process` unit test on Windows, and changing the inheritance of `AuditbeatXPackTest` for system tests.
leweafan pushed a commit to leweafan/beats that referenced this issue Apr 28, 2023
…stic#9863) (elastic#9887)

Changes the process metricset to skip the System Process (PID: 0) as well as any process access has been denied to on Windows. Adds Windows to the documentation.

Fixes elastic#9748.

(cherry picked from commit e42ffec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auditbeat flaky-test Unstable or unreliable test cases.
Projects
None yet
Development

No branches or pull requests

2 participants