Bug 229464 - [kill-old-processes] Hardcode directory for stale simulator files
Summary: [kill-old-processes] Hardcode directory for stale simulator files
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-08-24 12:52 PDT by Jonathan Bedard
Modified: 2021-08-24 14:04 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.73 KB, patch)
2021-08-24 12:55 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (1.84 KB, patch)
2021-08-24 13:07 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Bedard 2021-08-24 12:52:11 PDT
When run under sudo, kill-old-prosess has an incorrect temporary directory path. We need to hard-code /var/folders and use maxdepth 4 to find the right set of files to delete.
Comment 1 Jonathan Bedard 2021-08-24 12:52:36 PDT
<rdar://problem/82148711>
Comment 2 Jonathan Bedard 2021-08-24 12:55:11 PDT
Created attachment 436321 [details]
Patch
Comment 3 Stephanie Lewis 2021-08-24 12:57:55 PDT
Comment on attachment 436321 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=436321&action=review

> Tools/ChangeLog:9
> +        * CISupport/kill-old-processes:

should probably add a comment explaining why hardcoding is necessary
Comment 4 Stephanie Lewis 2021-08-24 12:58:19 PDT
I r+ed but did you try sudo -u? I think that would be a more correct solution
Comment 5 Jonathan Bedard 2021-08-24 13:04:49 PDT
(In reply to Stephanie Lewis from comment #4)
> I r+ed but did you try sudo -u? I think that would be a more correct solution

I didn't, but also, `sudo -u` is a more difficult solution to this particular problem, because it's Buildbot that's invoking this script with sudo, so we would need a Buildbot restart.
Comment 6 Jonathan Bedard 2021-08-24 13:07:14 PDT
Created attachment 436323 [details]
Patch
Comment 7 EWS 2021-08-24 14:04:15 PDT
Committed r281515 (240888@main): <https://commits.webkit.org/240888@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 436323 [details].