Sync test example is not working
richtja opened this issue · 2 comments
richtja commented
Describe the bug
The SyncTest.test from avocado examples is not working.
Steps to reproduce
$ avocado run examples/tests/synctest.py
JOB ID : f470c222489f022364bc29d0addc9158e8d18673
JOB LOG : /home/janrichter/avocado/job-results/job-2023-09-08T15.18-f470c22/job.log
(1/1) examples/tests/synctest.py:SyncTest.test: STARTED
(1/1) examples/tests/synctest.py:SyncTest.test: ERROR: Command '/home/janrichter/avocado/job-results/job-2023-09-08T15.18-f470c22/test-results/1-examples_tests_synctest.py_SyncTest.test/tmp_dirra8n4vzr/1-examples_tests_synctest.py_SyncTest.test/synctest/synctest 100 10' failed.\nstdout: b'CHLD : start sync \nP... (1.27 s)
RESULTS : PASS 0 | ERROR 1 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML : /home/janrichter/avocado/job-results/job-2023-09-08T15.18-f470c22/results.html
JOB TIME : 3.11 s
Expected behavior
$ avocado run examples/tests/synctest.py
JOB ID : f470c222489f022364bc29d0addc9158e8d18673
JOB LOG : /home/janrichter/avocado/job-results/job-2023-09-08T15.18-f470c22/job.log
(1/1) examples/tests/synctest.py:SyncTest.test: STARTED
(1/1) examples/tests/synctest.py:SyncTest.test: PASS (1.27 s)
RESULTS : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML : /home/janrichter/avocado/job-results/job-2023-09-08T15.18-f470c22/results.html
JOB TIME : 3.11 s
clebergnu commented
So, I was able to confirm that the error is really caused by the synctest
binary failing to achieve the expected result in modern distros. On Fedora 38:
$ ./synctest 100 10
CHLD : start sync
PAR : waiting
FAIL : sync not interrupted
This example test is really about using the data dir, and building software. IMO, the same thing is achieved both in the examples/tests/datadir.py
and examples/tests/assets.py
tests.
My suggestion is to remove this example.
richtja commented
Hi @clebergnu, I don't have problem with removing this example, but we need to take care about our documentation where this example is used.