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

mount: use 'random.randbytes' in _generate_random_bytes #29

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

synarete
Copy link
Collaborator

Now that we may assume Python-version>=3.9, use standard 'random.randbytes' function to generate semi-random I/O testing data. Improve function's doc string; emphasize that this function is defined to avoid random-pool exhaustion on host machine.

Copy link
Collaborator

@spuiuk spuiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@spuiuk
Copy link
Collaborator

spuiuk commented Sep 20, 2023

From what I understand, PR #27 will need to be re-based to use this new code. Is this correct?

@synarete
Copy link
Collaborator Author

From what I understand, PR #27 will need to be re-based to use this new code. Is this correct?

Yes, but I just realized the CI is still using CentOS8 (with Python 3.6) so we will need also to wait for the transition to CentOS9-stream.

Copy link
Collaborator

@phlogistonjohn phlogistonjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK to me.

@spuiuk
Copy link
Collaborator

spuiuk commented Sep 25, 2023

This particular PR is blocked because we do not use CentOS 9 which contains a newer version of python. This blocks the required test we run against xfs.

Error while executing test_io_consistency: %s module 'random' has no attribute 'randbytes'
=========================== short test summary info ============================
FAILED testcases/mount/test_mount.py::test_mount[192.168.123.10-xfs-share] - ...
=================== 1 failed, 25 passed in 75.14s (0:01:15) ====================
ERROR: InvocationError for command '/root/sit-test-cases/.tox/pytest/bin/pytest -v testcases/mount testcases/consistency testcases/smbtorture' (exited with code 1)

Now that we may assume Python-version>=3.9, use standard
'random.randbytes' function to generate semi-random I/O testing data.
Improve function's doc string; emphasize that this function is defined
to avoid random-pool exhaustion on host machine.

Tested with CentOS9-stream.

Signed-off-by: Shachar Sharon <ssharon@ibm.com>
@anoopcs9 anoopcs9 merged commit 54813f1 into samba-in-kubernetes:main Oct 17, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants