{"id":20974036,"url":"https://github.com/jgroman/mkdir_tester","last_synced_at":"2025-03-13T08:44:52.213Z","repository":{"id":175532004,"uuid":"409477065","full_name":"jgroman/mkdir_tester","owner":"jgroman","description":null,"archived":false,"fork":false,"pushed_at":"2021-09-26T19:11:07.000Z","size":458,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-20T05:37:24.669Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jgroman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-23T06:37:45.000Z","updated_at":"2023-06-15T08:13:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"2db850ae-636f-4e84-a731-226eeac4bd5f","html_url":"https://github.com/jgroman/mkdir_tester","commit_stats":null,"previous_names":["jgroman/mkdir_tester"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgroman%2Fmkdir_tester","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgroman%2Fmkdir_tester/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgroman%2Fmkdir_tester/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgroman%2Fmkdir_tester/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jgroman","download_url":"https://codeload.github.com/jgroman/mkdir_tester/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243374210,"owners_count":20280657,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T04:26:16.457Z","updated_at":"2025-03-13T08:44:52.185Z","avatar_url":"https://github.com/jgroman.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mkdir command testing suite\n\n## Introduction\n\nThis testing suite aims to test some parts of `mkdir` shell command functionality.\n\n## Quick start\n\n### Prerequisities\n\nThis testing suite requires [Python 3.6](https://www.python.org/) or newer. Test scripts are based on [pytest](https://docs.pytest.org/en/latest/) testing framework and for correct function also [sh](https://amoffat.github.io/sh/) package is required.\n\nInstalling Python3\n\n```bash\nsudo yum install python3\n```\n\nInstalling packages\n\n```bash\npip3 install pytest sh\n```\n\nFor detailed information regarding using Python on Oracle Linux please refer to [Oracle® Linux 8 Installing and Managing Python](https://docs.oracle.com/en/operating-systems/oracle-linux/8/python/)\n\n### Running tests\n\nRunning complete test suite with customized result output\n\n```bash\npytest\n```\n\nRunning test suite with standard pytest result output\n\n```bash\npytest -p no:pytest_custom_output\n```\n\n## Test approach\n\nTested tool `mkdir` will be run from within Python script using `sh` package which will allow control of input parameters, STDOUT and STDERR outputs and application exit codes. Testing will be automated using `pytest` framework. Output from `pytest` framework will be customized into required format using `pytest` plugin.\n\nTesting will focus on most common `mkdir` usage patterns and user errors. Selected testcases will also cover invalid input values.\n\n## Documentation\n\nMan pages\n\n- [mkdir(1) man page](docs/mkdir-1.txt)\n- [mkdir(2) man page](docs/mkdir-2.txt)\n- [umask(1) man page](docs/umask-1.txt)\n- [chmod(1) man page](docs/chmod-1.txt)\n- [environ(7) man page](docs/environ-7.txt)\n\nUTF-8\n\n- [UTF-8 test file](docs/UTF-8-test.txt)\n\n## Misc Notes\n\n### Files and filename restrictions\n\n#### Allowed characters in Linux path\n\nIn Unix-like systems, file names are composed of bytes, not characters. At least from the perspective of the kernel and its APIs.\n\nA Unix-like kernel is normally neutral about any byte value but \\000 (ASCII: NUL) and \\057 (ASCII: slash). In Linux, there are no other restrictions at the filesystem layer, but certain FS drivers and their modes lead to the rejection of some names, usually due to the impossibility of translation. For example, one can’t create a filename with invalid UTF-8 on anything mounted with -o iocharset=utf8 (e. g. types cifs or vfat). None of DOS/Windows-compatible FSes will allow you to make \\134 (ASCII: backslash) a part of a name. Or the msdos type will apply DOS restrictions concerning 8.3 names.\n\nExt3/ext4 isn’t known to have restrictions but aforementioned \\000 and \\057.\n\nAlthough it's highly recommend to avoid newlines, tabs, control characters, and the like, and to make sure the filename is valid UTF-8.\n\n#### Path length\n\nOn Linux: The maximum length for a file name is 255 bytes (NAME_MAX).\n\nThe maximum combined length of both the file name and path name is 4096 bytes. This length matches the PATH_MAX that is supported by the operating system as some syscalls allocate PATH_MAX bytes for certain operations. It is possible to have longer file paths but it is only possible to open such files using shorter relative paths since the full (canonical) path will error out.\n\n#### Directory limit\n\nOn ext3, there is technically a limit of 32,000 subdirectories but each directory always includes two links – one to reference itself and another to reference the parent directory – that leaves us with 31,998 to work with.\n\nThe default limit on ext4 is 64000 and it can be set by enabling file system feature flag `dir_nlink`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgroman%2Fmkdir_tester","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjgroman%2Fmkdir_tester","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgroman%2Fmkdir_tester/lists"}