Bug 262887 - check-for-duplicated-platform-test-results can remove files that aren't expectations
Summary: check-for-duplicated-platform-test-results can remove files that aren't expec...
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: Sam Sneddon [:gsnedders]
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-10-09 07:22 PDT by Sam Sneddon [:gsnedders]
Modified: 2023-10-09 15:04 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Sneddon [:gsnedders] 2023-10-09 07:22:42 PDT
Ignoring the fact that this shows we expect the tree to be clean before running check-for-duplicated-platform-test-results, this shows we're deleting a file that isn't a "test result" as the script is named.

gsnedders@gsnedders-marsha WebKit % cp LayoutTests/media/video-test.js LayoutTests/platform/mac/media/video-test.js
gsnedders@gsnedders-marsha WebKit % ./Tools/Scripts/check-for-duplicated-platform-test-results 
Checking search paths [platform/mac-ventura-wk1, platform/mac-ventura, platform/mac-wk1, platform/mac]
Traceback (most recent call last):
  File "/Volumes/gsnedders/projects/Safari/WebKit/./Tools/Scripts/check-for-duplicated-platform-test-results", line 203, in <module>
    sys.exit(main())
  File "/Volumes/gsnedders/projects/Safari/WebKit/./Tools/Scripts/check-for-duplicated-platform-test-results", line 188, in main
    total += check_platform(options, baseline_search_paths_checked)
  File "/Volumes/gsnedders/projects/Safari/WebKit/./Tools/Scripts/check-for-duplicated-platform-test-results", line 160, in check_platform
    host.scm().delete_list(duplicates)
  File "/Volumes/gsnedders/projects/Safari/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/git.py", line 187, in delete_list
    return self._run_git(["rm", "-f"] + paths)
  File "/Volumes/gsnedders/projects/Safari/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/git.py", line 111, in _run_git
    return self.run(full_command_args, **full_kwargs)
  File "/Volumes/gsnedders/projects/Safari/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm.py", line 73, in run
    return self._executive.run_command(args,
  File "/Volumes/gsnedders/projects/Safari/WebKit/Tools/Scripts/webkitpy/common/system/executive.py", line 445, in run_command
    (error_handler or self.default_error_handler)(script_error)
  File "/Volumes/gsnedders/projects/Safari/WebKit/Tools/Scripts/webkitpy/common/system/abstractexecutive.py", line 98, in default_error_handler
    raise error
webkitpy.common.system.executive.ScriptError: Failed to run "['git', 'rm', '-f', '/Volumes/gsnedders/projects/Safari/WebKit/LayoutTests/platform/mac/media/video-test.js']" exit_code: 128 cwd: /Volumes/gsnedders/projects/Safari/WebKit
Comment 1 Radar WebKit Bug Importer 2023-10-09 07:22:51 PDT
<rdar://problem/116676951>
Comment 2 Sam Sneddon [:gsnedders] 2023-10-09 07:31:16 PDT
Pull request: https://github.com/WebKit/WebKit/pull/18837
Comment 3 EWS 2023-10-09 15:04:04 PDT
Committed 269113@main (fc7d2c4aac46): <https://commits.webkit.org/269113@main>

Reviewed commits have been landed. Closing PR #18837 and removing active labels.