diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2007-06-18 16:35:23 +0300 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2007-06-18 16:35:23 +0300 |
commit | 47812a77cf2d0eaab9daf066ef86c5b4fc0f9347 (patch) | |
tree | acaf10dbd4849a74e8480475c4507f6be3b892aa /ubi-utils/tests/mkvol_basic.c | |
parent | 80cecea79cf13075d136e73067aa40439539bb0f (diff) |
UBI: fix tests
This patch fixes UBI tests and adds udev problems solution description.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'ubi-utils/tests/mkvol_basic.c')
-rw-r--r-- | ubi-utils/tests/mkvol_basic.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ubi-utils/tests/mkvol_basic.c b/ubi-utils/tests/mkvol_basic.c index 2c6a512..e2120e9 100644 --- a/ubi-utils/tests/mkvol_basic.c +++ b/ubi-utils/tests/mkvol_basic.c @@ -197,11 +197,11 @@ remove: static int mkvol_multiple(void) { struct ubi_mkvol_request req; - int i, ret; + int i, ret, max = dev_info.max_vol_count; const char *name = TESTNAME ":mkvol_multiple()"; /* Create maximum number of volumes */ - for (i = 0; i < dev_info.max_vol_count; i++) { + for (i = 0; i < max; i++) { char nm[strlen(name) + 50]; req.vol_id = UBI_VOL_NUM_AUTO; @@ -213,6 +213,10 @@ static int mkvol_multiple(void) req.name = &nm[0]; if (ubi_mkvol(libubi, node, &req)) { + if (errno == ENFILE) { + max = i; + break; + } failed("ubi_mkvol"); err_msg("vol_id %d", i); goto remove; @@ -224,7 +228,7 @@ static int mkvol_multiple(void) } } - for (i = 0; i < dev_info.max_vol_count; i++) { + for (i = 0; i < max; i++) { struct ubi_vol_info vol_info; if (ubi_rmvol(libubi, node, i)) { |