Opened 14 months ago
Closed 10 months ago
#35740 closed Bug (fixed)
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: | Ready for checkin | |
| Has patch: | yes | 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 (10)
comment:1 by , 14 months ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:2 by , 14 months ago
| Owner: | removed |
|---|---|
| Status: | assigned → new |
comment:3 by , 14 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 , 14 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 , 13 months ago
| Resolution: | needsinfo |
|---|---|
| Status: | closed → new |
Hi! Sorry, I missed the notification.
PC_NAME_MAX on bcachefs is 512.
comment:6 by , 13 months ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:7 by , 11 months ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:8 by , 11 months ago
| Has patch: | set |
|---|
comment:9 by , 10 months ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
Refs #24826
Do you have a suggested patch?