Opened 4 months ago
Last modified 7 days ago
#35740 assigned Bug
file_storage.tests.FileFieldStorageTests.test_extended_length_storage fails when bcachefs is in use
Reported by: | Alyssa Ross | Owned by: | YashRaj1506 |
---|---|---|---|
Component: | File uploads/storage | Version: | 4.2 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
This test constructs a file name of the maximum permissible length reported by the filesystem, then checks that round-tripping it through a FileField with a max_length of 300. If the filesystem reports a maximum permissible length longer than 300, this won't work, because the name will have been truncated by the FileField.
Change History (7)
comment:1 by , 4 months ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:2 by , 4 months ago
Owner: | removed |
---|---|
Status: | assigned → new |
comment:3 by , 3 months ago
Summary: | test_extended_length_storage fails on bcachefs → file_storage.tests.FileFieldStorageTests.test_extended_length_storage fails when bcachefs is in use |
---|
comment:4 by , 3 months ago
Resolution: | → needsinfo |
---|---|
Status: | new → closed |
Increasing the max_length
for extended_length
might work but I can't find what this number should be for bcachefs.
-
tests/file_storage/models.py
a b class Storage(models.Model): 80 80 storage=temp_storage, upload_to="tests", max_length=20 81 81 ) 82 82 extended_length = models.FileField( 83 storage=temp_storage, upload_to="tests", max_length= 30083 storage=temp_storage, upload_to="tests", max_length=2000 84 84 )
Can you share what _storage_max_filename_length
returns for you?
comment:5 by , 2 months ago
Resolution: | needsinfo |
---|---|
Status: | closed → new |
Hi! Sorry, I missed the notification.
PC_NAME_MAX on bcachefs is 512.
comment:6 by , 2 months ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:7 by , 7 days ago
Owner: | set to |
---|---|
Status: | new → assigned |
Refs #24826
Do you have a suggested patch?