-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[LIT] replace lit.util.mkdir
with pathlib.Path.mkdir
#163948
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
## Tests glob pattern handling in the mkdir command. | ||
|
||
## This mkdir should fail because the `example_file*.input`s are regular files. | ||
# RUN: not mkdir %S/example_file*.input | ||
|
||
# RUN: mkdir %S/example_dir1.new | ||
# RUN: mkdir %S/example_dir2.new | ||
|
||
## This mkdir should succeed (so RUN should fail) because the `example_dir*.new`s are directories already exist. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: remove `are' There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for the review. |
||
# RUN: not mkdir %S/example_dir*.new |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
## Tests glob pattern handling in echo command. | ||
|
||
# RUN: not %{lit} -a -v %{inputs}/shtest-glob \ | ||
# RUN: | FileCheck -dump-input=fail -match-full-lines %s | ||
# | ||
# RUN: | FileCheck -dump-input=fail -match-full-lines --implicit-check-not=Error: %s | ||
# END. | ||
|
||
# CHECK: UNRESOLVED: shtest-glob :: glob-echo.txt ({{[^)]*}}) | ||
# CHECK: TypeError: string argument expected, got 'GlobItem' | ||
|
||
# CHECK: FAIL: shtest-glob :: glob-mkdir.txt ({{[^)]*}}) | ||
# CHECK: # error: command failed with exit status: 1 | ||
# CHECK: FAIL: shtest-glob :: glob-mkdir.txt ({{[^)]*}}) | ||
# CHECK: # | Error: 'mkdir' command failed, {{.*}}example_file1.input' | ||
# CHECK-NEXT: # | Error: 'mkdir' command failed, {{.*}}example_file2.input' | ||
# CHECK: # error: command failed with exit status: 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, all EEXIST errors were ignored.
We should indeed ignore races between concurrent
mkdir target
s, but I don't see any reason to allow races betweentouch target
andmkdir target
.Since
pathlib
'sexist_ok=True
behaves this way, the testshtest-glob.py
has been updated to reflect the new behavior.