Skip to content
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

Avoid use of os.mknod() in Python testing for portability #2986

Open
samsrabin opened this issue Mar 5, 2025 · 0 comments
Open

Avoid use of os.mknod() in Python testing for portability #2986

samsrabin opened this issue Mar 5, 2025 · 0 comments
Labels
bfb bit-for-bit test: python Pass clm_pymods test suite plus Python sys/unit tests before merging testing additions or changes to tests

Comments

@samsrabin
Copy link
Collaborator

It doesn't work everywhere; e.g., on my Mac. Instead, use the safer os.makedirs() for making empty directories or pathlib.Path.touch() for empty files.

Unit tests failing on my Mac because of this:

  • test_append_user_nl_step2: PermissionError at os.mknod(ufile)
  • test_run_phase: PermissionError in SSPCaseFake.create_clone() at os.mknod(os.path.join(newcase, "user_nl_clm"))
@samsrabin samsrabin added bfb bit-for-bit test: python Pass clm_pymods test suite plus Python sys/unit tests before merging testing additions or changes to tests labels Mar 5, 2025
@samsrabin samsrabin added this to the ctsm6.0.0 (code freeze) milestone Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bfb bit-for-bit test: python Pass clm_pymods test suite plus Python sys/unit tests before merging testing additions or changes to tests
Projects
Development

No branches or pull requests

1 participant