correct the path of offcputime.lua
authorliuchao173 <55137861+liuchao173@users.noreply.github.com>
Sat, 30 Jan 2021 07:05:00 +0000 (15:05 +0800)
committeryonghong-song <ys114321@gmail.com>
Tue, 2 Feb 2021 03:54:17 +0000 (19:54 -0800)
[root@openEuler bcc]# cd src/lua/
[root@openEuler lua]# ./bcc-lua ../../../examples/lua/offcputime.lua -d 1 >/dev/null 2>/dev/null
[root@openEuler lua]# ./bcc-lua ../../../examples/lua/offcputime.lua -d 1
./bcc-lua: cannot open ../../../examples/lua/offcputime.lua: No such file or directory
stack traceback:
        [C]: in function 'dofile'
        bcc.lua:6338: in function <bcc.lua:6288>
        [C]: at 0x557532f676b0
[root@openEuler lua]#

tests/lua/test_standalone.sh

index bea35c37e17abe60e22d80c17ce0ffa9da198d39..ba5d60fc783059acb1045771260d2621b0d2d35c 100755 (executable)
@@ -23,7 +23,7 @@ fi
 rm -f probe.lua
 echo "return function(BPF) print(\"Hello world\") end" > probe.lua
 
-PROBE="../../../examples/lua/offcputime.lua"
+PROBE="../../examples/lua/offcputime.lua"
 
 if ! sudo ./bcc-lua "$PROBE" -d 1 >/dev/null 2>/dev/null; then
     fail "bcc-lua cannot run complex probes"