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 fail depending on the location in the filesystem #3013

Open
ntnn opened this Issue Oct 3, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@ntnn

ntnn commented Oct 3, 2017

Output of i3 --moreversion 2>&- || i3 --version: l

21:02:16 ~ 80%>i3 --moreversion
Binary i3 version:  4.14.1 (2017-09-24) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.14 (2017-09-04) (pid 2328)o abort…)
Loaded i3 config: /home/ntnn/.i3/config (Last modified: Mon 21 Aug 2017 15:30:28 CEST, 3735116 seconds ago)

The i3 binary you just called: /usr/bin/i3
RUNNING BINARY DIFFERENT FROM BINARY ON DISK!
The i3 binary you are running: i3

URL to a logfile as per https://i3wm.org/docs/debugging.html:

In /var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu:
test-suite.log

In /tmp/ntnn/i3/build:
test-suite.log

What I did:

Ran tests outside of $HOME:

cd $referring_location_to_log_files_above
git clone https://github.com/i3/i3
cd i3
autoreconf -fi
mkdir build && cd build
../configure --enable-debug
make -j$(nproc)
make check

What I saw:

N/A

What I expected instead:

Working tests.

The tests work if run below $HOME without root, outside of $HOME root is required.

Additionally, if tests are run from the tarball with root outside of $HOME the following test fails:

#   Failed test 'human readable version contains branch name'
#   at /var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu/../../i3-4.14.1/testcases/t/193-ipc-version.t line 35.
#                   '4.14.1 (2017-09-24)'
#     doesn't match '(?^:branch)'


Test Summary Report
-------------------
Use of uninitialized value in subtraction (-) at /usr/lib64/perl5/5.24.3/TAP/Formatter/Base.pm line 386.
Negative repeat count does nothing at /usr/lib64/perl5/5.24.3/TAP/Formatter/Base.pm line 386.
/var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu/../../i3-4.14.1/testcases/t/193-ipc-version.t (Wstat: 0 Tests: 5 Failed: 1)
  Failed test:  5
Files=225, Tests=2782, 19 wallclock secs ( 1.21 usr +  0.13 sys =  1.34 CPU)
Result: FAIL
@ntnn

This comment has been minimized.

Show comment
Hide comment
@ntnn

ntnn Oct 3, 2017

Running a specific testcase yields the following:

Starting 1 Xephyr instances, starting at :10...
fatal: Not a git repository (or any parent up to mount point /var/tmp)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

Rough time estimate for this run: 0.05 seconds

Writing logfile to 'testsuite-2017-10-03-21-21-52-/complete-run.log'...


# BEGIN failed--compilation aborted at /var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu/../../i3-4.14.1/testcases/t/179-regress-multiple-ws.t line 19.
# 


Test Summary Report
-------------------
Use of uninitialized value in subtraction (-) at /usr/lib64/perl5/5.24.3/TAP/Formatter/Base.pm line 386.
Negative repeat count does nothing at /usr/lib64/perl5/5.24.3/TAP/Formatter/Base.pm line 386.
/var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu/../../i3-4.14.1/testcases/t/179-regress-multiple-ws.t (Wstat: 0 Tests: 1 Failed: 1)
  Failed test:  1
  Parse errors: No plan found in TAP output
Files=1, Tests=1,  0 wallclock secs ( 0.01 usr +  0.00 sys =  0.01 CPU)
Result: FAIL

The slowest tests are:
	/var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu/../../i3-4.14.1/testcases/t/179-regress-multiple-ws.t with 0.04 seconds

Test output:
[:10] /var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu/../../i3-4.14.1/testcases/t/179-regress-multiple-ws.t: starting
[:10] /var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu/../../i3-4.14.1/testcases/t/179-regress-multiple-ws.t: finished
output for /var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu/../../i3-4.14.1/testcases/t/179-regress-multiple-ws.t:
not ok 1 - Can't call method "close" on an undefined value at /var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu/../../i3-4.14.1/testcases/lib/SocketActivation.pm line 171.
# BEGIN failed--compilation aborted at /var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu/../../i3-4.14.1/testcases/t/179-regress-multiple-ws.t line 19.
# 

#   Failed test 'Can't call method "close" on an undefined value at /var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu/../../i3-4.14.1/testcases/lib/SocketActivation.pm line 171.
# BEGIN failed--compilation aborted at /var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu/../../i3-4.14.1/testcases/t/179-regress-multiple-ws.t line 19.
# '
#   at /var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu/../../i3-4.14.1/testcases/lib/TestWorker.pm line 53.

However, stracing it shows, that a socket actually has been successfully opened:

...
read(5, "package Socket;\n\nuse strict;\n{ u"..., 8192) = 8192
stat("/usr/lib64/perl5/5.24.3/x86_64-linux/auto/Socket/Socket.bs", 0x7f4a4d8d6a80) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/perl5/5.24.3/x86_64-linux/auto/Socket/Socket.so", {st_mode=S_IFREG|0555, st_size=43256, ...}) = 0
open("/usr/lib64/perl5/5.24.3/x86_64-linux/auto/Socket/Socket.so", O_RDONLY|O_CLOEXEC) = 5
socket(AF_INET6, SOCK_DGRAM, IPPROTO_IP) = 5
...

ntnn commented Oct 3, 2017

Running a specific testcase yields the following:

Starting 1 Xephyr instances, starting at :10...
fatal: Not a git repository (or any parent up to mount point /var/tmp)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

Rough time estimate for this run: 0.05 seconds

Writing logfile to 'testsuite-2017-10-03-21-21-52-/complete-run.log'...


# BEGIN failed--compilation aborted at /var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu/../../i3-4.14.1/testcases/t/179-regress-multiple-ws.t line 19.
# 


Test Summary Report
-------------------
Use of uninitialized value in subtraction (-) at /usr/lib64/perl5/5.24.3/TAP/Formatter/Base.pm line 386.
Negative repeat count does nothing at /usr/lib64/perl5/5.24.3/TAP/Formatter/Base.pm line 386.
/var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu/../../i3-4.14.1/testcases/t/179-regress-multiple-ws.t (Wstat: 0 Tests: 1 Failed: 1)
  Failed test:  1
  Parse errors: No plan found in TAP output
Files=1, Tests=1,  0 wallclock secs ( 0.01 usr +  0.00 sys =  0.01 CPU)
Result: FAIL

The slowest tests are:
	/var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu/../../i3-4.14.1/testcases/t/179-regress-multiple-ws.t with 0.04 seconds

Test output:
[:10] /var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu/../../i3-4.14.1/testcases/t/179-regress-multiple-ws.t: starting
[:10] /var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu/../../i3-4.14.1/testcases/t/179-regress-multiple-ws.t: finished
output for /var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu/../../i3-4.14.1/testcases/t/179-regress-multiple-ws.t:
not ok 1 - Can't call method "close" on an undefined value at /var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu/../../i3-4.14.1/testcases/lib/SocketActivation.pm line 171.
# BEGIN failed--compilation aborted at /var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu/../../i3-4.14.1/testcases/t/179-regress-multiple-ws.t line 19.
# 

#   Failed test 'Can't call method "close" on an undefined value at /var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu/../../i3-4.14.1/testcases/lib/SocketActivation.pm line 171.
# BEGIN failed--compilation aborted at /var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu/../../i3-4.14.1/testcases/t/179-regress-multiple-ws.t line 19.
# '
#   at /var/tmp/portage/x11-wm/i3-4.14.1/work/i3-4.14.1/x86_64-pc-linux-gnu/../../i3-4.14.1/testcases/lib/TestWorker.pm line 53.

However, stracing it shows, that a socket actually has been successfully opened:

...
read(5, "package Socket;\n\nuse strict;\n{ u"..., 8192) = 8192
stat("/usr/lib64/perl5/5.24.3/x86_64-linux/auto/Socket/Socket.bs", 0x7f4a4d8d6a80) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/perl5/5.24.3/x86_64-linux/auto/Socket/Socket.so", {st_mode=S_IFREG|0555, st_size=43256, ...}) = 0
open("/usr/lib64/perl5/5.24.3/x86_64-linux/auto/Socket/Socket.so", O_RDONLY|O_CLOEXEC) = 5
socket(AF_INET6, SOCK_DGRAM, IPPROTO_IP) = 5
...
@ntnn

This comment has been minimized.

Show comment
Hide comment
@ntnn

ntnn Oct 3, 2017

Additional info: both /var/tmp/portage and /tmp are tmpfs, I've tested running the tests in /mnt/temp/i3 on ext4 - that also fails with the same error as my last comment.

ntnn commented Oct 3, 2017

Additional info: both /var/tmp/portage and /tmp are tmpfs, I've tested running the tests in /mnt/temp/i3 on ext4 - that also fails with the same error as my last comment.

@stapelberg

This comment has been minimized.

Show comment
Hide comment
@stapelberg

stapelberg Mar 5, 2018

Member

Sorry for the late reply, and thanks for taking care of i3 in Gentoo.

Unfortunately, I cannot reproduce the issue. When following the steps you provided in /tmp/repro (on tmpfs), make check works just fine for me.

Could you provide the full strace output of a failing make check run on your machine please? Thank you.

Member

stapelberg commented Mar 5, 2018

Sorry for the late reply, and thanks for taking care of i3 in Gentoo.

Unfortunately, I cannot reproduce the issue. When following the steps you provided in /tmp/repro (on tmpfs), make check works just fine for me.

Could you provide the full strace output of a failing make check run on your machine please? Thank you.

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