Comments (3)
@naveedus Can you please check this one ?
from avocado-misc-tests.
One could check for hard disks with sudo lshw -class disk
which gives in case of a single ATA disk an output containing description: ATA Disk
. Even if eMMC
devices are present in the system they will not be contained in the output.
from avocado-misc-tests.
Improvement
If the system uses an eMMC the use of mmc-utils
could be suitable to implement a health check (superuser - Check health of eMMC). badblocks
(in package e2fsprogs
) could possibly be used as well. In comparison with SMART badblocks
it writes simple patterns to every block of a device and then reads and checks them searching for damaged areas instead of passively waiting for errors archlinux - badblocks.
Executing a non-destructive eMMC test could be executed with badblocks -nsv /dev/mmcblk0
. Remotely executing a badblocks
based eMMC check could be done as follows:
#!/usr/bin/env python
# execute with: python check_mmc.py
from pexpect import pxssh
import re
try:
s = pxssh.pxssh()
hostname = "<IP-ADDRESS>"
username = "rc"
password = "<PASSWORD>"
s.login(hostname, username, password)
rootprompt = re.compile('.*[$#]')
s.sendline('sudo -s')
i = s.expect([rootprompt,'assword.*: '])
if i==0:
print "didnt need password!"
pass
elif i==1:
print "sending password"
s.sendline(password)
j = s.expect([rootprompt,'Sorry, try again'])
if j == 0:
print("password accepted")
pass
elif j == 1:
raise Exception("bad password")
else:
raise Exception("unexpected output")
s.set_unique_prompt()
s.sendline('badblocks -nsv /dev/mmcblk0')
s.prompt()
print(s.before)
s.logout()
except pxssh.ExceptionPxssh as e:
print("pxssh failed on login.")
print(e)
However this will only work for eMMC devices which are not in use. For devices in use you get an output like this:
$ python check_mmc.py
sending password
password accepted
badblocks -nsv /dev/mmcblk0
/dev/mmcblk0 is apparently in use by the system; it's not safe to run badblocks!
from avocado-misc-tests.
Related Issues (20)
- When using rdma_tests.py of Avocado (version: 90.0) to test MLNX Network-Card in Rhel8.4, it shows “FAIL: Client cmd: ib_atomic_bw -F”. HOT 1
- After running perf_fuzzer.py in Rhel8.4 with Avocado (version: 93.0), it shows “RuntimeError: Test interrupted by SIGTERM”. HOT 3
- While running ndctl.py with Avocado 92.0, traceback messages are seen [(most recent call last):File "/usr/lib64/python3.6/multiprocessing/process.py"..] HOT 1
- After running avago9361_vd.py in Rhel8.4 with Avocado (version: 93.0), it shows “FAIL: Failed to set drive to online state”. HOT 1
- After running xfstests.py in Rhel8.4 OS with Avocado (version: 93.0), Rhel8.4 OS will automatically reboot and can't complete the test of xfstests.py. HOT 3
- When using disk_info.py to test NVMe-SSD in Rhel8.2 with Avocado (version: 94.0), it shows "\nGiven disk nvme11n1 is not present in lshw -c disk | grep -i nvme11n1\nGiven disk nvme11n1 not having uuid". HOT 1
- When using module_unload_load.py to test NVMe-SSD in Rhel8.3 with Avocado (version: 94.0), it shows "FAIL: Failed Modules: ['nvme']". HOT 1
- When using nvme_cli_selftests.py to test NVMe-SSD in Rhel8.3 with Avocado (version: 94.0), nvme_compare_test and nvme_smart_log_test are FAIL, but Manual-Test are PASS. HOT 1
- When using nvmetest.py to test NVMe-SSD in Rhel8.3 with Avocado (version: 94.0), it shows "ERROR: Command 'make' failed" and "CANCEL: /dev/nvme11n1 does not exist". HOT 1
- bonding.py : bonding tests fails for active-backup tests HOT 1
- multipath_test.py: Need proper clean up of paths after each tests run HOT 1
- After running nvme_cli_selftests.py in Rhel8.4, “run-test-nvme_compare_test-1521” & “run-test-nvme_get_features_test-0994” are FAIL HOT 1
- After running nvmetest.py in Rhel8.4, it shows “No such file or directory: './NVME-VERSION-GEN'” HOT 1
- pread fail case in random test code while running in multiple threads HOT 7
- perf_uprobe error handling HOT 1
- Stress-ng Failing HOT 5
- fio-pmem test failing HOT 2
- Run failed: xfstests - iommu (cba565f) HOT 6
- fio: Move pmem create code out of fio test HOT 3
- Need for Basic sanity check for yaml files in Travis CI HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from avocado-misc-tests.