aboutsummaryrefslogtreecommitdiff
path: root/tests/ubi-tests/README.udev
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-12-20 17:34:55 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-12-20 17:34:55 +0200
commit1ba6959299cb386faf178317b21ffd61689246b5 (patch)
treeb98d5f6d9aeadeb30e2d614aa174346529ae3b27 /tests/ubi-tests/README.udev
parentb722adcdb1eb8d0321eb5c4112db925c815450fc (diff)
ubi-utils: move UBI tests to tests/ubi-tests/
Clean-up ubi-utils a little by moving tests to a proper place. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'tests/ubi-tests/README.udev')
-rw-r--r--tests/ubi-tests/README.udev25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/ubi-tests/README.udev b/tests/ubi-tests/README.udev
new file mode 100644
index 0000000..06e71d3
--- /dev/null
+++ b/tests/ubi-tests/README.udev
@@ -0,0 +1,25 @@
+There is a problem with udev: when a volume is created, there is a delay
+before corresponding /dev/ubiX_Y device node is created by udev, so some
+tests fail because of this. The symptom is error messages like
+"cannot open /dev/ubi0_0".
+
+One possible solution of this problem is to pre-create UBI device and volume
+nodes. There is even a script which may be used for this in ubi-utils/scripts/.
+But this is not enough because udev will still remove and re-create the nodes
+and tests will still fail. So you need to stop removing device nodes using
+the following udev rule:
+
+ KERNEL=="ubi*_*", ACTION=="remove", OPTIONS+="ignore_device"
+
+In our Ubuntu distribution we put that to new file:
+/etc/udev/rules.d/50-local.rules
+
+Another possibility is to call udevsettle utility in libubi after the volume
+has been created See src/libubi.c - the call is compiled in only if
+UDEV_SETTLE_HACK is defined. This is anyway an ugly hack, but works, although
+makes the tests slower. Suggestions are welcome.
+
+So, if you have udevsettel unility in your system, you do not have to do
+anyting, and the tests should work, because we compile libubi with
+UDEV_SETTLE_HACK. Otherwise, you should remove -D UDEV_SETTLE_HACK
+from the makefile and pre-create UBI device nodes.