summaryrefslogtreecommitdiff
path: root/ubi-utils/tests/mkvol_bad.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-06-18 16:35:23 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-06-18 16:35:23 +0300
commit47812a77cf2d0eaab9daf066ef86c5b4fc0f9347 (patch)
treeacaf10dbd4849a74e8480475c4507f6be3b892aa /ubi-utils/tests/mkvol_bad.c
parent80cecea79cf13075d136e73067aa40439539bb0f (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_bad.c')
-rw-r--r--ubi-utils/tests/mkvol_bad.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/ubi-utils/tests/mkvol_bad.c b/ubi-utils/tests/mkvol_bad.c
index 58ac4e1..023b06b 100644
--- a/ubi-utils/tests/mkvol_bad.c
+++ b/ubi-utils/tests/mkvol_bad.c
@@ -148,7 +148,7 @@ static int test_mkvol(void)
/* Bad vol_type */
req.alignment = 1;
- req.bytes = dev_info.avail_bytes;
+ req.bytes = dev_info.eb_size;
req.vol_type = UBI_DYNAMIC_VOLUME + UBI_STATIC_VOLUME;
ret = ubi_mkvol(libubi, node, &req);
if (check_failed(ret, EINVAL, "ubi_mkvol", "vol_type = %d",
@@ -229,25 +229,18 @@ static int test_mkvol(void)
req.name = &nm[0];
if (ubi_mkvol(libubi, node, &req)) {
+ /*
+ * Note, because of gluebi we may be unable to create
+ * dev_info.max_vol_count devices (MTD restrictions).
+ */
+ if (errno == ENFILE)
+ break;
failed("ubi_mkvol");
err_msg("vol_id %d", i);
goto remove;
}
}
- req.vol_id = UBI_VOL_NUM_AUTO;
- req.name = TESTNAME ":impossible";
- ret = ubi_mkvol(libubi, node, &req);
- if (check_failed(ret, ENOSPC, "ubi_mkvol", "volume %d created",
- req.vol_id))
- goto remove;
-
- req.vol_id = dev_info.max_vol_count;
- ret = ubi_mkvol(libubi, node, &req);
- if (check_failed(ret, EINVAL, "ubi_mkvol", "volume %d created",
- req.vol_id))
- goto remove;
-
for (i = 0; i < dev_info.max_vol_count + 1; i++)
ubi_rmvol(libubi, node, i);