• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

facebookincubator / TTPForge / 24945124965
56%
main: 67%

Build:
Build:
LAST BUILD BRANCH: export-D106692973
DEFAULT BRANCH: main
Ran 26 Apr 2026 01:21AM UTC
Jobs 1
Files 79
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

26 Apr 2026 01:20AM UTC coverage: 55.646%. First build
24945124965

Pull #616

github

facebook-github-bot
Fix flaky TestKillProcessExecute by using a truly non-existent PID

Summary:
The `Kill_non-existent_process_with_id_-_throw_error` subtest in `pkg/blocks/killprocess_test.go` was failing because it used PID `123` to represent a "non-existent" process. On some hosts, PID 123 is a live kernel thread, so `processutils.VerifyPIDExists` succeeded and the test then attempted to kill it. The kill failed with "operation not permitted", but `ErrorOnKillFailure` defaults to `false`, so the error was logged and swallowed and `Execute` returned `nil`, causing the `require.Error` assertion to fail.

Switching the test PID to `123456789` makes `VerifyPIDExists` actually fail (no such process).

Before this diff, the test fails:

```
$ buck2 test fbcode//security/redteam/purple_team/ttpforge/pkg/blocks:blocks
...
✗ Fail: fbcode//security/redteam/purple_team/ttpforge/pkg/blocks:blocks_test - TestKillProcessExecute (2.1s)
=== RUN   TestKillProcessExecute
=== RUN   TestKillProcessExecute/Kill_non-existent_process_with_id_-_throw_error
INFOUsing Process ID: 123
INFOKilling the following processes: [123]
INFOGot process handle with PID: 123
ERRORFailed to kill process with ID: 123; operation not permitted
    killprocess_test.go:215:
        Error Trace:fbcode/security/redteam/purple_team/ttpforge/pkg/blocks/killprocess_test.go:215
        Error:      An error is expected but got nil.
        Test:       TestKillProcessExecute/Kill_non-existent_process_with_id_-_throw_error
--- FAIL: TestKillProcessExecute (1.79s)
    --- FAIL: TestKillProcessExecute/Kill_non-existent_process_with_id_-_throw_error (0.23s)
1 TESTS FAILED
  ✗ fbcode//security/redteam/purple_team/ttpforge/pkg/blocks:blocks_test - TestKillProcessExecute
```

Now, the test passes

Differential Revision: D102369915
Pull Request #616: Fix flaky TestKillProcessExecute by using a truly non-existent PID

3154 of 5668 relevant lines covered (55.65%)

14.63 hits per line

Jobs
ID Job ID Ran Files Coverage
1 24945124965.1 26 Apr 2026 01:21AM UTC 79
55.65
GitHub Action Run
Source Files on build 24945124965
  • Tree
  • List 79
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #616
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc