[linux-lvm] It looks wrong for the timeout when lvm test running
Heming Zhao
heming.zhao at suse.com
Mon Dec 9 09:20:22 UTC 2019
Hello List,
The lvm test default timeout (--timeout) default value is 180.
But I met below condition when running testcase (in virtual machine):
```
make check_local T=shell/snapshot-merge.sh
... ...
### passed: [ndev-vanilla] shell/snapshot-merge.sh 665
... ...
```
Obviously, the timeout doesn't work normally.
If I change below code, the timeout work as expected. (in lib/brick-shelltest.h)
```
if ( select( nfds, &set, NULL, NULL, &wait ) > 0 ) {
silent_start = end; /* something happened */
io.sync( false );
}
```
And after change the code, some testcase will become timeout, which may pass before.
The whole patch as below:
```
From bdbd569c2b9ab49d4a4246f203b1cd9f7049db97 Mon Sep 17 00:00:00 2001
From: Zhao Heming <heming.zhao at suse.com>
Date: Mon, 9 Dec 2019 17:09:17 +0800
Subject: [PATCH] test: fix timeout abnormal issue
---
test/lib/brick-shelltest.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/lib/brick-shelltest.h b/test/lib/brick-shelltest.h
index b58f3d6843..12e08249f3 100644
--- a/test/lib/brick-shelltest.h
+++ b/test/lib/brick-shelltest.h
@@ -822,7 +822,7 @@ struct TestCase {
}
}
if ( select( nfds, &set, NULL, NULL, &wait ) > 0 ) {
- silent_start = end; /* something happened */
+ //silent_start = end; /* something happened */
io.sync( false );
}
--
2.24.0
```
Thanks.
More information about the linux-lvm
mailing list