NICMx / Jool

SIIT and NAT64 for Linux
GNU General Public License v2.0
328 stars 66 forks source link

Several warnings when compiling unit tests on kernel 4.4. Tests will not run. #199

Closed crisdeleon closed 8 years ago

crisdeleon commented 8 years ago

There are three unit tests that will not compile on kernel 4.4:

sessiontable:

make[2]: Entering directory `/usr/src/linux-headers-4.4.0-040400-generic'
  LD      /home/jool/git/Jool/test/unit/sessiontable/built-in.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiontable/../../../mod/common/types.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiontable/../../../mod/common/address.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiontable/../framework/str_utils.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiontable/../framework/unit_test.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiontable/../impersonator/error_pool.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiontable/../impersonator/stats.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiontable/../impersonator/xlat.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiontable/../../../mod/common/config.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiontable/../../../mod/common/rbtree.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiontable/../../../mod/stateful/session/entry.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiontable/../../../mod/stateful/session/pkt_queue.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiontable/../impersonator/bib.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiontable/../impersonator/icmp_wrapper.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiontable/../impersonator/route.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiontable/sessiontable_test.o
  LD [M]  /home/jool/git/Jool/test/unit/sessiontable/sessiontable.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "joolns_get" [/home/jool/git/Jool/test/unit/sessiontable/sessiontable.ko] undefined!
  CC      /home/jool/git/Jool/test/unit/sessiontable/sessiontable.mod.o
  LD [M]  /home/jool/git/Jool/test/unit/sessiontable/sessiontable.ko

sessiondb:

make[2]: Entering directory `/usr/src/linux-headers-4.4.0-040400-generic'
  LD      /home/jool/git/Jool/test/unit/sessiondb/built-in.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiondb/../../../mod/common/types.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiondb/../../../mod/common/address.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiondb/../framework/str_utils.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiondb/../framework/unit_test.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiondb/../impersonator/error_pool.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiondb/../impersonator/stats.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiondb/../impersonator/xlat.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiondb/../../../mod/common/config.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiondb/../../../mod/common/rbtree.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiondb/../../../mod/stateful/session/entry.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiondb/../../../mod/stateful/session/table.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiondb/../../../mod/stateful/session/pkt_queue.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiondb/../impersonator/bib.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiondb/../impersonator/icmp_wrapper.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiondb/../impersonator/route.o
  CC [M]  /home/jool/git/Jool/test/unit/sessiondb/sessiondb_test.o
  LD [M]  /home/jool/git/Jool/test/unit/sessiondb/sessiondb.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "joolns_get" [/home/jool/git/Jool/test/unit/sessiondb/sessiondb.ko] undefined!
  CC      /home/jool/git/Jool/test/unit/sessiondb/sessiondb.mod.o
  LD [M]  /home/jool/git/Jool/test/unit/sessiondb/sessiondb.ko

filtering:

make[2]: Entering directory `/usr/src/linux-headers-4.4.0-040400-generic'
  LD      /home/jool/git/Jool/test/unit/filtering/built-in.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../../../mod/common/types.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../../../mod/common/address.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../framework/str_utils.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../framework/unit_test.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../impersonator/error_pool.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../impersonator/stats.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../impersonator/xlat.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../../../mod/common/config.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../../../mod/common/packet.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../../../mod/common/pool6.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../../../mod/common/rbtree.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../../../mod/common/rfc6052.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../../../mod/stateful/pool4/entry.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../../../mod/stateful/pool4/table.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../../../mod/stateful/pool4/db.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../../../mod/stateful/bib/entry.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../../../mod/stateful/bib/table.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../../../mod/stateful/bib/db.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../../../mod/stateful/bib/port_allocator.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../../../mod/stateful/session/entry.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../../../mod/stateful/session/table.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../../../mod/stateful/session/db.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../../../mod/stateful/session/pkt_queue.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../framework/bib.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../framework/skb_generator.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../framework/types.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../impersonator/icmp_wrapper.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../impersonator/pool4_empty.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/../impersonator/route.o
  CC [M]  /home/jool/git/Jool/test/unit/filtering/filtering_and_updating_test.o
  LD [M]  /home/jool/git/Jool/test/unit/filtering/filtering.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "joolns_get" [/home/jool/git/Jool/test/unit/filtering/filtering.ko] undefined!
  CC      /home/jool/git/Jool/test/unit/filtering/filtering.mod.o
  LD [M]  /home/jool/git/Jool/test/unit/filtering/filtering.ko

If you try to run the unit tests after these warnings, you will get the following messages:

sessiondb: Unknown symbol joolns_get (err 0)
sessiontable: Unknown symbol joolns_get (err 0)
filtering: Unknown symbol joolns_get (err 0)

and no test will be executed.

I'm working with this code.

ydahhrk commented 8 years ago

Ok, I had to hack the URL a bit tho. This seems to be the intended link.

This and #200 are expected since I only updated the core Jool code. Despite the test suite being broken, does translation seem stable?

ydahhrk commented 8 years ago

This should have been fixed in commit ce15a9667c4108e41a3f76c642153b490660b6d2.

crisdeleon commented 8 years ago

Working with this commit, Ubuntu 14.04 LTS with Kernel 4.4.1

Unit tests are compiling properly now, but when I run the tests, it is not running joolns_test. It just gets stuck there without showing anything until I hit Ctrl + C.

[...]
Running test 'logtime/logtime.ko'.
Module 'Log time test': Starting tests...
Test 'test_log_time substraction 1': Starting...
Translation time: 0.        1
Test 'test_log_time substraction 1': Success.

Finished. Runs: 1; Errors: 0
Running test 'joolns/joolns.ko'.
^C
Running test 'iterator/iterator.ko'.
Module 'IPv6 header iterator': Starting tests...
Test 'next function, no subheaders': Starting...
Test 'next function, no subheaders': Success.
[...]
ydahhrk commented 8 years ago

The tests were refactored in the 3.5 branch; switching milestone.