From e947258f9795dbc3f4fee02de28913465675b693 Mon Sep 17 00:00:00 2001 From: Daniel Walter Date: Wed, 31 Aug 2016 10:09:37 +0200 Subject: Add sysfs tree for unittests add mocked sysfs used by libmtd and libubi unittests Signed-off-by: Daniel Walter --- tests/unittests/sysfs_mock/class/misc/ubi_ctrl/dev | 1 + tests/unittests/sysfs_mock/class/mtd/mtd0/dev | 1 + tests/unittests/sysfs_mock/class/mtd/mtd0/erasesize | 2 ++ tests/unittests/sysfs_mock/class/mtd/mtd0/flags | 1 + tests/unittests/sysfs_mock/class/mtd/mtd0/name | 1 + tests/unittests/sysfs_mock/class/mtd/mtd0/numeraseregions | 1 + tests/unittests/sysfs_mock/class/mtd/mtd0/oobsize | 1 + tests/unittests/sysfs_mock/class/mtd/mtd0/size | 1 + tests/unittests/sysfs_mock/class/mtd/mtd0/subpagesize | 1 + tests/unittests/sysfs_mock/class/mtd/mtd0/writesize | 1 + tests/unittests/sysfs_mock/class/ubi/ubi0 | 0 tests/unittests/sysfs_mock/class/ubi/version | 1 + 12 files changed, 12 insertions(+) create mode 100644 tests/unittests/sysfs_mock/class/misc/ubi_ctrl/dev create mode 100644 tests/unittests/sysfs_mock/class/mtd/mtd0/dev create mode 100644 tests/unittests/sysfs_mock/class/mtd/mtd0/erasesize create mode 100644 tests/unittests/sysfs_mock/class/mtd/mtd0/flags create mode 100644 tests/unittests/sysfs_mock/class/mtd/mtd0/name create mode 100644 tests/unittests/sysfs_mock/class/mtd/mtd0/numeraseregions create mode 100644 tests/unittests/sysfs_mock/class/mtd/mtd0/oobsize create mode 100644 tests/unittests/sysfs_mock/class/mtd/mtd0/size create mode 100644 tests/unittests/sysfs_mock/class/mtd/mtd0/subpagesize create mode 100644 tests/unittests/sysfs_mock/class/mtd/mtd0/writesize create mode 100644 tests/unittests/sysfs_mock/class/ubi/ubi0 create mode 100644 tests/unittests/sysfs_mock/class/ubi/version (limited to 'tests/unittests') diff --git a/tests/unittests/sysfs_mock/class/misc/ubi_ctrl/dev b/tests/unittests/sysfs_mock/class/misc/ubi_ctrl/dev new file mode 100644 index 0000000..b736a31 --- /dev/null +++ b/tests/unittests/sysfs_mock/class/misc/ubi_ctrl/dev @@ -0,0 +1 @@ +12:12 diff --git a/tests/unittests/sysfs_mock/class/mtd/mtd0/dev b/tests/unittests/sysfs_mock/class/mtd/mtd0/dev new file mode 100644 index 0000000..05bd230 --- /dev/null +++ b/tests/unittests/sysfs_mock/class/mtd/mtd0/dev @@ -0,0 +1 @@ +12:1 diff --git a/tests/unittests/sysfs_mock/class/mtd/mtd0/erasesize b/tests/unittests/sysfs_mock/class/mtd/mtd0/erasesize new file mode 100644 index 0000000..8b5a50a --- /dev/null +++ b/tests/unittests/sysfs_mock/class/mtd/mtd0/erasesize @@ -0,0 +1,2 @@ +128 + diff --git a/tests/unittests/sysfs_mock/class/mtd/mtd0/flags b/tests/unittests/sysfs_mock/class/mtd/mtd0/flags new file mode 100644 index 0000000..27b7671 --- /dev/null +++ b/tests/unittests/sysfs_mock/class/mtd/mtd0/flags @@ -0,0 +1 @@ +0x0000001 diff --git a/tests/unittests/sysfs_mock/class/mtd/mtd0/name b/tests/unittests/sysfs_mock/class/mtd/mtd0/name new file mode 100644 index 0000000..0695219 --- /dev/null +++ b/tests/unittests/sysfs_mock/class/mtd/mtd0/name @@ -0,0 +1 @@ +mtd0 diff --git a/tests/unittests/sysfs_mock/class/mtd/mtd0/numeraseregions b/tests/unittests/sysfs_mock/class/mtd/mtd0/numeraseregions new file mode 100644 index 0000000..48082f7 --- /dev/null +++ b/tests/unittests/sysfs_mock/class/mtd/mtd0/numeraseregions @@ -0,0 +1 @@ +12 diff --git a/tests/unittests/sysfs_mock/class/mtd/mtd0/oobsize b/tests/unittests/sysfs_mock/class/mtd/mtd0/oobsize new file mode 100644 index 0000000..a949a93 --- /dev/null +++ b/tests/unittests/sysfs_mock/class/mtd/mtd0/oobsize @@ -0,0 +1 @@ +128 diff --git a/tests/unittests/sysfs_mock/class/mtd/mtd0/size b/tests/unittests/sysfs_mock/class/mtd/mtd0/size new file mode 100644 index 0000000..27f897b --- /dev/null +++ b/tests/unittests/sysfs_mock/class/mtd/mtd0/size @@ -0,0 +1 @@ +16777216 diff --git a/tests/unittests/sysfs_mock/class/mtd/mtd0/subpagesize b/tests/unittests/sysfs_mock/class/mtd/mtd0/subpagesize new file mode 100644 index 0000000..900731f --- /dev/null +++ b/tests/unittests/sysfs_mock/class/mtd/mtd0/subpagesize @@ -0,0 +1 @@ +64 diff --git a/tests/unittests/sysfs_mock/class/mtd/mtd0/writesize b/tests/unittests/sysfs_mock/class/mtd/mtd0/writesize new file mode 100644 index 0000000..a949a93 --- /dev/null +++ b/tests/unittests/sysfs_mock/class/mtd/mtd0/writesize @@ -0,0 +1 @@ +128 diff --git a/tests/unittests/sysfs_mock/class/ubi/ubi0 b/tests/unittests/sysfs_mock/class/ubi/ubi0 new file mode 100644 index 0000000..e69de29 diff --git a/tests/unittests/sysfs_mock/class/ubi/version b/tests/unittests/sysfs_mock/class/ubi/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/unittests/sysfs_mock/class/ubi/version @@ -0,0 +1 @@ +1 -- cgit v1.2.3