Skip to content

Conversation

@ariel-anieli
Copy link

Hello committers,

Thanks for maintaining this project. I would like to bring back to the community, and also to improve my Erlang skills.

Here is the first of few PRs on clearing out compilation warnings. For this one, random is deprecated since Erlang/OTP 19.

Thank you,

@prefiks prefiks merged commit 4b4e1e8 into processone:develop Nov 19, 2024
3 checks passed
@prefiks
Copy link
Member

prefiks commented Nov 19, 2024

Look good.

@ariel-anieli
Copy link
Author

Look good.

Thanks, @prefiks; I'll push other PRs in coming days; for clearing out warnings in OTP 23.

@ariel-anieli ariel-anieli deleted the deprecation-random branch November 19, 2024 13:45
@ariel-anieli
Copy link
Author

@prefiks, #416 clears all the warnings in OTP 23; which is the minimal version of the GitHub actions.

@VlkrS
Copy link

VlkrS commented May 22, 2025

The calls to rand:seed seem wrong, see https://www.erlang.org/doc/apps/stdlib/rand.html#seed/2

There's no seed/3 accepting a state without an algorithm, as implied by the merged code, which results in runtime failures.

At a first glance, when using the rand module instead of random, some seed calls appear gratuitous.

{timeout,Ref2,end_thinktime} -> ok
end,
random:seed(), % reinit seed for others tests
rand:seed(), % reinit seed for others tests
Copy link

Choose a reason for hiding this comment

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

Is that even needed? The rand module is autoseeded...

%%%===================================================================
gen_accept_key() ->
random:seed(erlang:now()),
rand:seed(erlang:now()),
Copy link

Choose a reason for hiding this comment

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

What's the point of trying to seed here? crypto:strong_rand_bytes/1 takes care of that, no?

VlkrS added a commit to VlkrS/tsung that referenced this pull request May 23, 2025
PR processone#414 fixed compilation warnings but broke tsung at runtime.

See https://www.erlang.org/docs/25/man/rand#seed-2
VlkrS added a commit to VlkrS/tsung that referenced this pull request May 23, 2025
PR processone#414 fixed compilation warnings but broke tsung at runtime.

See https://www.erlang.org/docs/25/man/rand#seed-2
@ariel-anieli
Copy link
Author

I am just reading your feedback, @VlkrS; it is much appreciated.
Could we sync up? I see you already opened some PRs. I would like to know:

  1. Which issues have you already addressed?
  2. Which ones would like me to look into?

I will then push the fixes.

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.

3 participants