wolfcw / libfaketime

libfaketime modifies the system time for a single application
https://github.com/wolfcw/libfaketime
GNU General Public License v2.0
2.74k stars 327 forks source link

`make test` error on Rockchip ARM-64 w/ commit 13748ddb22c6e20d6e43d3726e57fd64d082c5e2 #201

Closed afsheenb closed 5 years ago

afsheenb commented 5 years ago

Freshly cloning commit 13748ddb22c6e20d6e43d3726e57fd64d082c5e2 and running make test returns an error for me, running Ubuntu 18.04 on a Rockchip RK3328 Quad-Core ARM Cortex A53 64-Bit box, 4GB RAM.

root@rockchip:/opt/tmp/libfaketime# make test
make  -C test all
make[1]: Entering directory '/opt/tmp/libfaketime/test'
gcc -c -std=gnu99 -Wall -DFAKE_STAT -Werror -Wextra timetest.c
gcc -o timetest timetest.o -lrt -lpthread
./testframe.sh functests
# Begin Test Suites in functests

# Begin functests/test_exclude_mono.sh
# PLATFORM=linuxlike
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=288318.514350411 When not faking monotonic time, timestamps should be different ref=288319.572917275 - ok
# functests/test_exclude_mono.sh summary: 1 succeeded, 0 failed
# End functests/test_exclude_mono.sh - OK

# Begin functests/test_null.sh
out=0 () ref=1566526903 - ok
# functests/test_null.sh summary: 1 succeeded, 0 failed
# End functests/test_null.sh - OK

# Begin functests/test_true.sh
# functests/test_true.sh summary: 1 succeeded, 0 failed
# End functests/test_true.sh - OK

# Begin functests/test_walkone.sh
# PLATFORM=linuxlike
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=1 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=2 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=4 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=8 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=16 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=32 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=64 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=128 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=256 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=512 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=1024 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=2048 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=4096 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=8192 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=16384 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=32768 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=65536 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=131072 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=262144 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=524288 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=1048576 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=2097152 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=4194304 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=8388608 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=16777216 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=33554432 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=67108864 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=134217728 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=268435456 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=536870912 - bad
ERROR: ld.so: object '../src/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
out=1566526903 (secs since Epoch) expected=1073741824 - bad
# functests/test_walkone.sh summary: 0 succeeded, 31 failed
testframe.sh: error: functests/test_walkone.sh run exit_status=1!
# End functests/test_walkone.sh - BAD

# Test Suites summary: 3 succeeded, 1 failed
# End Test Suites - BAD
Makefile:23: recipe for target 'functest' failed
make[1]: *** [functest] Error 1
make[1]: Leaving directory '/opt/tmp/libfaketime/test'
Makefile:10: recipe for target 'test' failed
make: *** [test] Error 2
wtogami commented 5 years ago

I have some hunches. Can you DM me on freenode IRC username warren? You would need a nickserv registered account.

MrHash commented 5 years ago

just need to run make first no?

wtogami commented 5 years ago

There are test failures and hangs with older Linux userspace. I'm filing a separate report with my findings.

wtogami commented 5 years ago

See #202 and #203, there are multiple new issues since v0.9.7 on multiple archs if your userspace is a little older.

wolfcw commented 5 years ago

Besides the platform-specific problems we handle in #202 and #203, the primary reason for the errors above were that make test was run before building the library with make. 30ba0b852af5b4afde83f4106def5dc26d74d5ac fixes this by building the library also when make test is run directly - sorry for the confusion.

wolfcw commented 5 years ago

I assume this is fixed by running "make" before "make test", which the new Makefile does not. Please re-open if the problem persists.