Igalia / pflua

Packet filtering in Lua
Other
313 stars 39 forks source link

Add regression test for PR#250 #258

Closed dpino closed 8 years ago

dpino commented 8 years ago

Adds @mpeterv test case as regression test for #250.

The test case crashed BPF compilation pipeline before #250 fix.

luajit: ./pf/bpf.lua:65: attempt to compare string with number
stack traceback:
        ./pf/bpf.lua:65: in function 'runtime_u32'
        ./pf/bpf.lua:98: in function 'is_power_of_2'
        ./pf/bpf.lua:253: in function 'alu'
        ./pf/bpf.lua:327: in function 'compile_lua'
        ./pf/bpf.lua:444: in function 'compile_filter'
        ./pf.lua:92: in function 'test_attempt_to_compare_string_with_a_number'
        ./pf.lua:94: in function 'selftest'
        (command line):1: in main chunk
        [C]: at 0x004043b0