Skip to contentSkip to conversation

Test failures on NixOS unstable (gcc10?)

DISCUSSION Rouven Czerwinski 2 participants 2 messages Jan 19, 2021 – Jan 20, 2021 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hello,

mtd-utils within NixOS automatically executes the tests, and those have been failing since middle of 2020 [1]. I tried locally and can reproduce on current nixpkgs master (latest available packages), I am attaching the test-log as instructed by the test output. I think those failures are due to NixOS using gcc-10 since then.

[1]: https://hydra.nixos.org/build/123615601

Regards,
Rouven Czerwinski

=======================================
mtd-utils 2.1.1: ./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 ] --- 0x5 != 0x3
tests/unittests/test_lib.h:37: error: Check of parameter fd, function __wrap_close failed tests/unittests/libubi_test.c:25: 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 ] --- 0x6 != 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

[ OK ] test_ubi_rsvol
[ RUN ] test_ubi_rmvol
[ ERROR ] --- 0x7 != 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_rmvol
[ RUN      ] test_ubi_rnvols
[  ERROR   ] --- 0x8 != 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_rnvols
[ RUN      ] test_ubi_leb_change_start
[  ERROR   ] --- 0x9 != 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_leb_change_start
[ RUN      ] test_ubi_get_info
[  ERROR   ] --- 0xa != 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_get_info
[ RUN      ] test_ubi_mkvol
[  ERROR   ] --- 0xb != 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_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 ] --- 0xc != 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_remove_dev
[ RUN      ] test_ubi_attach
[  ERROR   ] --- 0xd != 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_attach
[ RUN      ] test_ubi_set_property
[       OK ] test_ubi_set_property
[==========] 16 test(s) run.
[  PASSED  ] 7 test(s).
[  FAILED  ] 9 test(s), listed below:
[  FAILED  ] test_libubi_open
[  FAILED  ] test_ubi_dev_present
[  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

9 FAILED TEST(S)
FAIL ubilib_test (exit status: 9)

FAIL: mtdlib_test
=================

[==========] Running 17 test(s).
[ RUN ] test_libmtd_open
[ OK ] 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
[ OK ] test_mtd_erase_multi
[ RUN ] test_mtd_erase
[ OK ] test_mtd_erase
[ RUN ] test_mtd_read
[ OK ] test_mtd_read
[ RUN ] test_mtd_write_nooob
[ OK ] test_mtd_write_nooob
[ RUN ] test_mtd_write_withoob
[ OK ] test_mtd_write_withoob
[ RUN ] test_mtd_read_oob
[ OK ] test_mtd_read_oob
[ RUN ] test_mtd_write_oob
[ OK ] test_mtd_write_oob
[ RUN ] test_mtd_dev_present
[ OK ] test_mtd_dev_present
[ RUN ] test_mtd_get_info
[ OK ] test_mtd_get_info
[ RUN ] test_mtd_get_dev_info1
[ ERROR ] --- 0x5 != 0x3
tests/unittests/test_lib.h:37: error: Check of parameter fd, function __wrap_close failed tests/unittests/libmtd_test.c:430: 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  ] 16 test(s).
[  FAILED  ] 1 test(s), listed below:
[  FAILED  ] test_mtd_get_dev_info1

1 FAILED TEST(S)
FAIL mtdlib_test (exit status: 1)

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

#1 lore raw

Hi,

Quoted 6 lines · Rouven Czerwinski

mtd-utils within NixOS automatically executes the tests, and those have been failing since middle of 2020 [1]. I tried locally and can reproduce on current nixpkgs master (latest available packages), I am attaching the test-log as instructed by the test output. I think those failures are due to NixOS using gcc-10 since then.

Unfortunately, I have not yet been able to reproduce this.

The unit tests seem to work fine on my Fedora system with gcc-10.2.1, so this might be related to some other change at the time?

I remember cmocka being a bit fragile from the time the unit tests where added. The "--enable-unit-tests" configure option tries to manipulate the CFLAGS from within the configure script to make it work. Is your build system perhaps attempting to set the CFLAGS externally at make time?

Regards,

David

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/