Igalia / pflua

Packet filtering in Lua
Other
313 stars 39 forks source link

"tests" makefile allows too much parallelism #244

Closed curiousleo closed 9 years ago

curiousleo commented 9 years ago

After a clean new clone of 5e2c56baa0 and a successful make, make check failed the first time I executed it.

make -C src check
make[1]: Entering directory '/home/leo/Lib/pflua/src'
[ ... all OK ... ]
make[1]: Leaving directory '/home/leo/Lib/pflua/src'
make -C tools check
make[1]: Entering directory '/home/leo/Lib/pflua/tools'
[ ... all OK ... ]
make[1]: Leaving directory '/home/leo/Lib/pflua/tools'
make -C doc
make[1]: Entering directory '/home/leo/Lib/pflua/doc'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/leo/Lib/pflua/doc'
make -C tests check
make[1]: Entering directory '/home/leo/Lib/pflua/tests'
wget --output-document data/wingolog.pcap 'https://github.com/Igalia/pflua-test/blob/mast
er/savefiles/wingolog.org.pcap?raw=true'
./pflang-reg/pl-bug171-arpindexing_or_tcp
./pflang-reg/pl-bug139-multioctet.sh
./pflang-reg/pl-bug132-not_icmp6
--2015-07-24 18:39:41--  https://github.com/Igalia/pflua-test/blob/master/savefiles/wingo
log.org.pcap?raw=true
luajit: /home/leo/Lib/pflua/src/pf/savefile.lua:25: Error mmapping
stack traceback:
        [C]: in function 'error'
        /home/leo/Lib/pflua/src/pf/savefile.lua:25: in function 'mmap'
        /home/leo/Lib/pflua/src/pf/savefile.lua:45: in function 'open_and_mmap'
        /home/leo/Lib/pflua/src/pf/savefile.lua:65: in function 'load_packets'
        /home/leo/Lib/pflua/tools/pflua-pipelines-match:76: in function 'main_pflang'
        /home/leo/Lib/pflua/tools/pflua-pipelines-match:170: in function 'run_filters'
        /home/leo/Lib/pflua/tools/pflua-pipelines-match:174: in main chunk
        [C]: at 0x00404390
Makefile:43: recipe for target 'pflang-reg/pl-bug132-not_icmp6' failed
make[1]: *** [pflang-reg/pl-bug132-not_icmp6] Error 1
make[1]: *** Waiting for unfinished jobs....
luajit: /home/leo/Lib/pflua/src/pf/savefile.lua:25: Error mmapping
stack traceback:
        [C]: in function 'error'
        /home/leo/Lib/pflua/src/pf/savefile.lua:25: in function 'mmap'
        /home/leo/Lib/pflua/src/pf/savefile.lua:45: in function 'open_and_mmap'
        /home/leo/Lib/pflua/src/pf/savefile.lua:65: in function 'load_packets'
        /home/leo/Lib/pflua/tools/pflua-pipelines-match:76: in function 'main_pflang'
        /home/leo/Lib/pflua/tools/pflua-pipelines-match:170: in function 'run_filters'
        /home/leo/Lib/pflua/tools/pflua-pipelines-match:174: in main chunk
        [C]: at 0x00404390

luajit: /home/leo/Lib/pflua/src/pf/savefile.lua:25: Error mmapping
stack traceback:
        [C]: in function 'error'
        /home/leo/Lib/pflua/src/pf/savefile.lua:25: in function 'mmap'
        /home/leo/Lib/pflua/src/pf/savefile.lua:45: in function 'open_and_mmap'
        /home/leo/Lib/pflua/src/pf/savefile.lua:65: in function 'load_packets'
        /home/leo/Lib/pflua/tools/pflua-pipelines-match:76: in function 'main_pflang'
        /home/leo/Lib/pflua/tools/pflua-pipelines-match:170: in function 'run_filters'
        /home/leo/Lib/pflua/tools/pflua-pipelines-match:174: in main chunk
        [C]: at 0x00404390
Makefile:43: recipe for target 'pflang-reg/pl-bug139-multioctet.sh' failed
make[1]: *** [pflang-reg/pl-bug139-multioctet.sh] Error 1
Makefile:43: recipe for target 'pflang-reg/pl-bug171-arpindexing_or_tcp' failed
make[1]: *** [pflang-reg/pl-bug171-arpindexing_or_tcp] Error 1
Resolving github.com (github.com)... 192.30.252.129
Connecting to github.com (github.com)|192.30.252.129|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github.com/Igalia/pflua-test/raw/master/savefiles/wingolog.org.pcap [fo
llowing]
--2015-07-24 18:39:42--  https://github.com/Igalia/pflua-test/raw/master/savefiles/wingol
og.org.pcap
Reusing existing connection to github.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/Igalia/pflua-test/master/savefiles/wingolog.o
rg.pcap [following]
--2015-07-24 18:39:42--  https://raw.githubusercontent.com/Igalia/pflua-test/master/savef
iles/wingolog.org.pcap
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.31.19.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.31.19.133|:443...
 connected.
HTTP request sent, awaiting response... 200 OK
Length: 37020306 (35M) [application/octet-stream]
Saving to: ‘data/wingolog.pcap’

data/wingolog.pcap     100%[===========================>]  35.30M  1.47MB/s   in 24s    

2015-07-24 18:40:11 (1.45 MB/s) - ‘data/wingolog.pcap’ saved [37020306/37020306]

make[1]: Leaving directory '/home/leo/Lib/pflua/tests'
Makefile:24: recipe for target 'check' failed
make: *** [check] Error 2

However, the second time round make check executes successfully. The reason seems to be too much parallelism: instead of waiting for the download to finish, make executes the tests in parallel with the download. This should be easy to fix -- working on it.