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

Fix tests for serial number check and add tests for temperature/psutil stuff? #507

Open
robputt opened this issue Mar 13, 2023 · 3 comments
Assignees

Comments

@robputt
Copy link
Contributor

robputt commented Mar 13, 2023

@robputt we should add test cases for:

Case 1:
/proc/cpuinfo - All zero serial - 0000000000000000
/proc/device-tree/serial-number - valid serial RockPi - d18dbe5c2a58cc61

Should return the second one

Case 2:
/proc/cpuinfo - All zero serial - 0000000000000000
/proc/device-tree/serial-number - All zero serial - 0000000000000000
Should return all 0s

Case 3:
/proc/cpuinfo - valid serial RasPi - 000000009e3cb787
/proc/device-tree/serial-number - valid serial RasPi - 000000009e3cb787
Should return the serial

Case 4:
/proc/cpuinfo - valid serial RockPi - d18dbe5c2a58cc61
/proc/device-tree/serial-number - valid serial RasPi - 000000009e3cb787
Should return the RockPi serial

I'm not sure there's any good way to test for an invalid serial? Unless those RockPi ones have a specific format @KevinWassermann94 or a fixed value?

@robputt robputt self-assigned this Mar 13, 2023
@shawaj
Copy link
Member

shawaj commented Mar 13, 2023

This was some invalid serials from /proc/device-tree/serial-number when it was running on RockPi...

W1EP3DN9PU
0UQMAKIBII
PN06893W5V
KLOFHWLY95
3IT1I4E9TG
CKHZ4CHI1P
I4YE1UGF5N
PERTSKMCT0
S63QCF54CJ
YYMSYLJWG8

@shawaj shawaj mentioned this issue Mar 28, 2023
4 tasks
@shawaj shawaj changed the title Fix tests for serial number check. Fix tests for serial number check and add tests for temperature/psutil stuff? Apr 8, 2023
@shawaj
Copy link
Member

shawaj commented Apr 8, 2023

Add tests for #522 #485 as well

shawaj added a commit that referenced this issue Jun 30, 2023
- check for known incorrect rockpi serials
- add more tests for serial number determination

Relates-to: #507 
Relates-to: #632 
Relates-to: #630
@shawaj
Copy link
Member

shawaj commented Jul 2, 2023

Several new serial number tests added in #633

Still need to add psutil test stuff

shawaj added a commit that referenced this issue Jul 2, 2023
- check for known incorrect rockpi serials
- check for known incorrect bobcat serials
- check for missing or too-short serials
- add more tests for serial number determination

Relates-to: #507
Relates-to: #632
Relates-to: #630
shawaj added a commit that referenced this issue Jul 2, 2023
- check for known incorrect rockpi serials (and similar 10 char non hex serials)
- check for known incorrect bobcat serials
- check for missing or too-short serials
- add more tests for serial number determination
- bump hm-pyhelper

Relates-to: #507
Relates-to: #632
Relates-to: #630
shawaj added a commit that referenced this issue Jul 2, 2023
- check for known incorrect rockpi serials (and similar 10 char non hex serials)
- check for known incorrect bobcat serials
- check for missing or too-short serials
- add more tests for serial number determination
- bump hm-pyhelper

Relates-to: #507
Relates-to: #632
Relates-to: #630
shawaj added a commit that referenced this issue Jul 2, 2023
- check for known incorrect rockpi serials (and similar 10 char non hex serials)
- check for known incorrect bobcat serials
- check for missing or too-short serials
- add more tests for serial number determination
- bump hm-pyhelper

Relates-to: #507
Relates-to: #632
Relates-to: #630
shawaj added a commit that referenced this issue Jul 2, 2023
- check for known incorrect rockpi serials (and similar 10 char non hex serials)
- check for known incorrect bobcat serials
- check for missing or too-short serials
- add more tests for serial number determination
- bump hm-pyhelper

Relates-to: #507
Relates-to: #632
Relates-to: #630
shawaj added a commit that referenced this issue Jul 2, 2023
- check for known incorrect rockpi serials (and similar 10 char non hex serials)
- check for known incorrect bobcat serials
- check for missing or too-short serials
- add more tests for serial number determination
- bump hm-pyhelper

Relates-to: #507
Relates-to: #632
Relates-to: #630
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

No branches or pull requests

2 participants