mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 08:42:40 +01:00 
			
		
		
		
	Added tests for resizable entries and custom attributes
Also found some bugs. Should now have a good amount of confidence in these features.
This commit is contained in:
		| @@ -123,5 +123,23 @@ tests/test.py << TEST | ||||
|     lfs_unmount(&lfs) => 0; | ||||
| TEST | ||||
|  | ||||
| echo "--- Max path test ---" | ||||
| tests/test.py << TEST | ||||
|     lfs_mount(&lfs, &cfg) => 0; | ||||
|     memset(buffer, 'w', LFS_NAME_MAX+1); | ||||
|     buffer[LFS_NAME_MAX+2] = '\0'; | ||||
|     lfs_mkdir(&lfs, (char*)buffer) => LFS_ERR_NAMETOOLONG; | ||||
|     lfs_file_open(&lfs, &file[0], (char*)buffer, | ||||
|             LFS_O_WRONLY | LFS_O_CREAT) => LFS_ERR_NAMETOOLONG; | ||||
|  | ||||
|     memcpy(buffer, "coffee/", strlen("coffee/")); | ||||
|     memset(buffer+strlen("coffee/"), 'w', LFS_NAME_MAX+1); | ||||
|     buffer[strlen("coffee/")+LFS_NAME_MAX+2] = '\0'; | ||||
|     lfs_mkdir(&lfs, (char*)buffer) => LFS_ERR_NAMETOOLONG; | ||||
|     lfs_file_open(&lfs, &file[0], (char*)buffer, | ||||
|             LFS_O_WRONLY | LFS_O_CREAT) => LFS_ERR_NAMETOOLONG; | ||||
|     lfs_unmount(&lfs) => 0; | ||||
| TEST | ||||
|  | ||||
| echo "--- Results ---" | ||||
| tests/stats.py | ||||
|   | ||||
		Reference in New Issue
	
	Block a user