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

rng-tools: Fix for rngd daemon failing to start #110

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rajashreer7
Copy link
Contributor

Updated wrapper-script to check if the tpm device is available in
the machine, since rng service works on this device. If the device
is not available, the test is skipped else the service is started
and test excutes.

Signed-off-by: Rajashree Rajendran [email protected]

Updated wrapper-script to check if the tpm device is available in
the machine, since rng service works on this device. If the device
is not available, the test is skipped else the service is started
and test excutes.

Signed-off-by: Rajashree Rajendran <[email protected]>
@@ -43,14 +44,10 @@ rng_service=rngd
#
function tc_local_setup()
{
tc_register "Setting up machine to run the tests"
tc_root_or_break || return
Copy link
Contributor

Choose a reason for hiding this comment

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

tc_register will register "Setting up machine to run the tests" as one test and increment TST_TOTAL , but I dont see corresponding tc_pass*/tc_fail* associated to this. If intention is put info in logs, you can use tc_info "Setting up machine to run the tests"


tc_register "checking TPM device"
tc_exists /dev/random /dev/urandom /dev/tpm*
if [ $? -ne 0 ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Few doubts here:

Evenif /dev/tpm is not present , random number generator works with /dev/urandom or with /dev/hwrng.
I could verify in system which doesnt have /dev/tpm and successfully start rngd using "rngd -f"

Can you please verify again if /dev/tpm is must here.

fi
fi
systemctl is-active rngd 2>&1 >/dev/null
[ $? -eq 0 ] && \
Copy link
Contributor

Choose a reason for hiding this comment

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

tc_service* can be used here

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.

2 participants