Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: FAILED: fileops/generic.c:263: error: check failed #937

Open
PRESFIL opened this issue Sep 13, 2023 · 6 comments
Open

tests: FAILED: fileops/generic.c:263: error: check failed #937

PRESFIL opened this issue Sep 13, 2023 · 6 comments
Labels

Comments

@PRESFIL
Copy link
Contributor

PRESFIL commented Sep 13, 2023

Summary

make check failed with one FAILED test.

test log
===================================
   vifm 0.13: src/test-suite.log
===================================

# TOTAL: 1
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: runtests
==============

======================================================================
------------------------- fileops/generic.c --------------------------

merge_directories_creating_intermediate_parent_dirs_copy:
   (-) FAILED
       fileops/generic.c:263: error: check failed
       in perform_merge
       Should have been success (zero)

                     4 tests run  1 check failed                      


======================== stic v0.6 :: fileops ========================

                       1 CHECK IN 1 TEST FAILED                       
                       ------------------------                       
      2031 checks :: 128 run tests :: 0 skipped tests :: 833 ms       

======================================================================

If i move build from /tmp to hard drive some other tests can't be passed:

test log
-------------------- misc/vifminfo_merge_states.c --------------------

fields_of_root_import:
   (-) FAILED
       misc/vifminfo_merge_states.c:179: error: check failed
       in admixture_is_inserted
       Expected "{"active-gtab":0,"use-term-multiplexer":true,"color-scheme":"almost-default"}" but was "{}"

fields_of_gtab_import:
   (-) FAILED
       misc/vifminfo_merge_states.c:179: error: check failed
       in admixture_is_inserted
       Expected "{"gtabs":[{"name":"gtab-name","active-pane":0,"preview":false}]}" but was "{"gtabs":[{}]}"
   (-) FAILED
       misc/vifminfo_merge_states.c:179: error: check failed
       in admixture_is_inserted
       Expected "{"gtabs":[{"panes":[{}],"name":"gtab-name","active-pane":0,"preview":false}]}" but was "{"gtabs":[{"panes":[]}]}"
   (-) FAILED
       misc/vifminfo_merge_states.c:179: error: check failed
       in admixture_is_inserted
       Expected "{"gtabs":[{"panes":[{}],"name":"gtab-name","active-pane":0,"preview":false}]}" but was "{"gtabs":[{"panes":[{}]}]}"

                    18 tests run  4 checks failed


========================= stic v0.6 :: misc ==========================

                      4 CHECKS IN 2 TESTS FAILED
                      --------------------------
     14669 checks :: 1056 run tests :: 2 skipped tests :: 2417 ms

======================================================================

vifm-git version:

vifm --version
Version: 0.13
Git info: v0.13-218-g4a5b1e83f97a-dirty
Compiled at: Sep 13 2023 19:12:42

Support of extended keys is on
Parsing of .desktop files is enabled
With GLib2 library
With magic library
With X11 library
With dynamic loading of X11 library
With file program
With -n option for cp and mv
With remote command execution
@xaizek
Copy link
Member

xaizek commented Sep 13, 2023

merge_directories_creating_intermediate_parent_dirs_copy

This test can depend on mount options related to access time and also on file system. Not sure if there is a reliable runtime check to handle this.

fields_of_root_import
fields_of_gtab_import

0, must be the reason, you must be using a locale with comma for a decimal point. Running tests as LC_ALL=C make check should make this go away. These tests lack changing locale when parsing JSON as the main code does, so it's not an indication of a bug, but thanks for reporting the failures.

@xaizek xaizek added the tests label Sep 13, 2023
@PRESFIL
Copy link
Contributor Author

PRESFIL commented Sep 16, 2023

This test can depend on mount options related to access time and also on file system. Not sure if there is a reliable runtime check to handle this.

/tmp/ mounted without noatime, but / with:

Mount point Filesystem Options
/ ext4 rw,noatime
/tmp tmpfs rw,nosuid,nodev,nr_inodes=1048576,inode64

@PRESFIL
Copy link
Contributor Author

PRESFIL commented Sep 16, 2023

These tests lack changing locale when parsing JSON

IMO, JSON's float's representation isn't locale dependent.

@xaizek
Copy link
Member

xaizek commented Sep 16, 2023

/tmp/ mounted without noatime, but / with:

Maybe it's something about tpmfs version. I couldn't reproduce it.

IMO, JSON's float's representation isn't locale dependent.

But locales exist and JSON parser uses them, which is why tests fail.

@PRESFIL
Copy link
Contributor Author

PRESFIL commented Sep 18, 2023

0, must be the reason, you must be using a locale with comma for a decimal point. Running tests as LC_ALL=C make check should make this go away. These tests lack changing locale when parsing JSON as the main code does, so it's not an indication of a bug, but thanks for reporting the failures.

In all the expected examples there is no number with a fractional part,
maybe the reason is something else?

But I must admit that LC_ALL=C make check works.

{"active-gtab":0,"use-term-multiplexer":true,"color-scheme":"almost-default"}
{
  "active-gtab": 0,
  "use-term-multiplexer": true,
  "color-scheme": "almost-default"
}
{"gtabs":[{"name":"gtab-name","active-pane":0,"preview":false}]}
{
  "gtabs": [
    {
      "name": "gtab-name",
      "active-pane": 0,
      "preview": false
    }
  ]
}
{"gtabs":[{"panes":[{}],"name":"gtab-name","active-pane":0,"preview":false}]}
{
  "gtabs": [
    {
      "panes": [
        {}
      ],
      "name": "gtab-name",
      "active-pane": 0,
      "preview": false
    }
  ]
}
{"gtabs":[{"panes":[{}],"name":"gtab-name","active-pane":0,"preview":false}]}
{
  "gtabs": [
    {
      "panes": [
        {}
      ],
      "name": "gtab-name",
      "active-pane": 0,
      "preview": false
    }
  ]
}

xaizek added a commit to xaizek/vifm that referenced this issue Nov 19, 2023
Thanks to PRESFIL.

Part of vifm#937 on GitHub.
@xaizek
Copy link
Member

xaizek commented Nov 19, 2023

I forgot about this issue, now made those tests switch locale. tmpfs issue doesn't reproduce, maybe dependent on kernel version.

In all the expected examples there is no number with a fractional part,
maybe the reason is something else?

It doesn't matter that 0, isn't a floating point number according to JSON, implementation uses stdtod which treats it as a floating point in some locales.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants