The -D_FILE_OFFSET_BITS=64 option makes the tests fail on i686. Maybe the tests impose wrong assumptions:
FAIL: mtdlib_test ======================================= mtd-utils 2.1.2: ./test-suite.log ======================================= # TOTAL: 2 # PASS: 0 # SKIP: 0 # XFAIL: 0 # FAIL: 2 # XPASS: 0 # ERROR: 0 .. contents:: :depth: 2 FAIL: ubilib_test ================= [==========] Running 16 test(s). [ RUN ] test_libubi_open [ ERROR ] --- 0x3 != 0x4 tests/unittests/test_lib.h:37: error: Check of parameter fd, function __wrap_close failed tests/unittests/libubi_test.c:22: note: Expected parameter declared here [ LINE ] --- tests/unittests/test_lib.h:37: error: Failure! [ FAILED ] test_libubi_open [ RUN ] test_ubi_vol_block_create [ OK ] test_ubi_vol_block_create [ RUN ] test_ubi_vol_block_remove [ OK ] test_ubi_vol_block_remove [ RUN ] test_ubi_update_start [ OK ] test_ubi_update_start [ RUN ] test_ubi_dev_present [ ERROR ] --- 0x5 != 0x3 tests/unittests/test_lib.h:37: error: Check of parameter fd, function __wrap_close failed tests/unittests/libubi_test.c:92: note: Expected parameter declared here [ LINE ] --- tests/unittests/test_lib.h:37: error: Failure! [ FAILED ] test_ubi_dev_present [ RUN ] test_ubi_rsvol libubi: error!: cannot open "/foo" error 2 (No such file or directory) [ ERROR ] --- 0xffffffffffffffff != 0 [ LINE ] --- tests/unittests/libubi_test.c:121: error: Failure! [ FAILED ] test_ubi_rsvol [ RUN ] test_ubi_rmvol [ ERROR ] --- 0x6 != 0x4 tests/unittests/test_lib.h:37: error: Check of parameter fd, function __wrap_close failed tests/unittests/libubi_test.c:89: note: Expected parameter declared here [ LINE ] --- tests/unittests/test_lib.h:37: error: Failure! [ FAILED ] test_ubi_rmvol [ RUN ] test_ubi_rnvols [ ERROR ] --- 0x7 != 0x4 tests/unittests/test_lib.h:37: error: Check of parameter fd, function __wrap_close failed tests/unittests/libubi_test.c:89: note: Expected parameter declared here [ LINE ] --- tests/unittests/test_lib.h:37: error: Failure! [ FAILED ] test_ubi_rnvols [ RUN ] test_ubi_leb_change_start [ ERROR ] --- 0x8 != 0x4 tests/unittests/test_lib.h:37: error: Check of parameter fd, function __wrap_close failed tests/unittests/libubi_test.c:89: note: Expected parameter declared here [ LINE ] --- tests/unittests/test_lib.h:37: error: Failure! [ FAILED ] test_ubi_leb_change_start [ RUN ] test_ubi_get_info [ ERROR ] --- 0x9 != 0x4 tests/unittests/test_lib.h:37: error: Check of parameter fd, function __wrap_close failed tests/unittests/libubi_test.c:89: note: Expected parameter declared here [ LINE ] --- tests/unittests/test_lib.h:37: error: Failure! [ FAILED ] test_ubi_get_info [ RUN ] test_ubi_mkvol [ ERROR ] --- 0xa != 0x4 tests/unittests/test_lib.h:37: error: Check of parameter fd, function __wrap_close failed tests/unittests/libubi_test.c:89: note: Expected parameter declared here [ LINE ] --- tests/unittests/test_lib.h:37: error: Failure! [ FAILED ] test_ubi_mkvol [ RUN ] test_ubi_leb_unmap [ OK ] test_ubi_leb_unmap [ RUN ] test_ubi_is_mapped [ OK ] test_ubi_is_mapped [ RUN ] test_ubi_remove_dev [ ERROR ] --- 0xb != 0x4 tests/unittests/test_lib.h:37: error: Check of parameter fd, function __wrap_close failed tests/unittests/libubi_test.c:89: note: Expected parameter declared here [ LINE ] --- tests/unittests/test_lib.h:37: error: Failure! [ FAILED ] test_ubi_remove_dev [ RUN ] test_ubi_attach [ ERROR ] --- 0xc != 0x4 tests/unittests/test_lib.h:37: error: Check of parameter fd, function __wrap_close failed tests/unittests/libubi_test.c:89: note: Expected parameter declared here [ LINE ] --- tests/unittests/test_lib.h:37: error: Failure! [ FAILED ] test_ubi_attach [ RUN ] test_ubi_set_property [ OK ] test_ubi_set_property [==========] 16 test(s) run. [ PASSED ] 6 test(s). [ FAILED ] 10 test(s), listed below: [ FAILED ] test_libubi_open [ FAILED ] test_ubi_dev_present [ FAILED ] test_ubi_rsvol [ FAILED ] test_ubi_rmvol [ FAILED ] test_ubi_rnvols [ FAILED ] test_ubi_leb_change_start [ FAILED ] test_ubi_get_info [ FAILED ] test_ubi_mkvol [ FAILED ] test_ubi_remove_dev [ FAILED ] test_ubi_attach 10 FAILED TEST(S) FAIL ubilib_test (exit status: 10) FAIL: mtdlib_test ================= [==========] Running 17 test(s). [ RUN ] test_libmtd_open [ ERROR ] --- 0x3 != 0x4 tests/unittests/test_lib.h:37: error: Check of parameter fd, function __wrap_close failed tests/unittests/libmtd_test.c:33: note: Expected parameter declared here [ LINE ] --- tests/unittests/test_lib.h:37: error: Failure! [ FAILED ] test_libmtd_open [ RUN ] test_mtd_is_bad [ OK ] test_mtd_is_bad [ RUN ] test_mtd_mark_bad [ OK ] test_mtd_mark_bad [ RUN ] test_mtd_lock [ OK ] test_mtd_lock [ RUN ] test_mtd_unlock [ OK ] test_mtd_unlock [ RUN ] test_mtd_is_locked [ OK ] test_mtd_is_locked [ RUN ] test_mtd_regioninfo [ OK ] test_mtd_regioninfo [ RUN ] test_mtd_erase_multi [ ERROR ] --- %s() has remaining non-returned values. tests/unittests/libmtd_test.c:23: note: remaining item was declared here tests/unittests/libmtd_test.c:23: note: remaining item was declared here __wrap_open: '%s' parameter still has values that haven't been checked. tests/unittests/libmtd_test.c:23: note: remaining item was declared here [ FAILED ] test_mtd_erase_multi [ RUN ] test_mtd_erase [ ERROR ] --- 0x5 != 0x4 tests/unittests/test_lib.h:37: error: Check of parameter fd, function __wrap_close failed tests/unittests/libmtd_test.c:24: note: Expected parameter declared here [ LINE ] --- tests/unittests/test_lib.h:37: error: Failure! [ FAILED ] test_mtd_erase [ RUN ] test_mtd_read [ ERROR ] --- %s() has remaining non-returned values. tests/unittests/libmtd_test.c:256: note: remaining item was declared here __wrap_lseek: '%s' parameter still has values that haven't been checked. tests/unittests/libmtd_test.c:256: note: remaining item was declared here '%s' parameter still has values that haven't been checked. tests/unittests/libmtd_test.c:256: note: remaining item was declared here [ FAILED ] test_mtd_read [ RUN ] test_mtd_write_nooob [ ERROR ] --- 0x6 != 0x4 tests/unittests/test_lib.h:37: error: Check of parameter fd, function __wrap_close failed tests/unittests/libmtd_test.c:24: note: Expected parameter declared here [ LINE ] --- tests/unittests/test_lib.h:37: error: Failure! [ FAILED ] test_mtd_write_nooob [ RUN ] test_mtd_write_withoob [ ERROR ] --- 0x7 != 0x4 tests/unittests/test_lib.h:37: error: Check of parameter fd, function __wrap_close failed tests/unittests/libmtd_test.c:24: note: Expected parameter declared here [ LINE ] --- tests/unittests/test_lib.h:37: error: Failure! [ FAILED ] test_mtd_write_withoob [ RUN ] test_mtd_read_oob [ ERROR ] --- 0x8 != 0x4 tests/unittests/test_lib.h:37: error: Check of parameter fd, function __wrap_close failed tests/unittests/libmtd_test.c:24: note: Expected parameter declared here [ LINE ] --- tests/unittests/test_lib.h:37: error: Failure! [ FAILED ] test_mtd_read_oob [ RUN ] test_mtd_write_oob [ ERROR ] --- 0x9 != 0x4 tests/unittests/test_lib.h:37: error: Check of parameter fd, function __wrap_close failed tests/unittests/libmtd_test.c:24: note: Expected parameter declared here [ LINE ] --- tests/unittests/test_lib.h:37: error: Failure! [ FAILED ] test_mtd_write_oob [ RUN ] test_mtd_dev_present [ ERROR ] --- 0xa != 0x4 tests/unittests/test_lib.h:37: error: Check of parameter fd, function __wrap_close failed tests/unittests/libmtd_test.c:24: note: Expected parameter declared here [ LINE ] --- tests/unittests/test_lib.h:37: error: Failure! [ FAILED ] test_mtd_dev_present [ RUN ] test_mtd_get_info [ ERROR ] --- 0xb != 0x4 tests/unittests/test_lib.h:37: error: Check of parameter fd, function __wrap_close failed tests/unittests/libmtd_test.c:24: note: Expected parameter declared here [ LINE ] --- tests/unittests/test_lib.h:37: error: Failure! [ FAILED ] test_mtd_get_info [ RUN ] test_mtd_get_dev_info1 [ ERROR ] --- 0xc != 0x4 tests/unittests/test_lib.h:37: error: Check of parameter fd, function __wrap_close failed tests/unittests/libmtd_test.c:24: note: Expected parameter declared here [ LINE ] --- tests/unittests/test_lib.h:37: error: Failure! [ FAILED ] test_mtd_get_dev_info1 [==========] 17 test(s) run. [ PASSED ] 6 test(s). [ FAILED ] 11 test(s), listed below: [ FAILED ] test_libmtd_open [ FAILED ] test_mtd_erase_multi [ FAILED ] test_mtd_erase [ FAILED ] test_mtd_read [ FAILED ] test_mtd_write_nooob [ FAILED ] test_mtd_write_withoob [ FAILED ] test_mtd_read_oob [ FAILED ] test_mtd_write_oob [ FAILED ] test_mtd_dev_present [ FAILED ] test_mtd_get_info [ FAILED ] test_mtd_get_dev_info1 11 FAILED TEST(S) FAIL mtdlib_test (exit status: 11) ============================================================================ Testsuite summary for mtd-utils 2.1.2 ============================================================================ # TOTAL: 2 # PASS: 0 # SKIP: 0 # XFAIL: 0 # FAIL: 2 # XPASS: 0 # ERROR: 0