|
Ran
|
Jobs
1
|
Files
89
|
Run time
1min
|
Badge
README BADGES
|
push
github
test: add tests for the leb128 encode/decode This patch is a follow-up to the commit 7058e9215 ("utils: introduce leb128 reader and writer"). The leb128 encoding is used inside our profilers (memprof/sysprof). But there are no tests for this module, so its coverage is low, since only `lj_utils_write_uleb128()` is used. Also, there is no correctness check for this implementation. This patch adapts the LuaVela tests [1] to cover this module. Since the initial version of the module wasn't adapted as is, the guarded version of the reader functions has different behaviour for zero-sized requested reads. Hence, this case is removed for now. The readers with a requested size are unused in our code, so this is not crucial at the moment. Also, this patch fixes the UBSan warning in the `lj_utils_write_leb128()` on checking the remaining value to be written by fixing the cast to uint64_t. [1]: https://github.com/luavela/luavela/blob/288e8a952/tests/impl/uJIT-tests-C/suite/test_leb128.c
5738 of 6058 branches covered (94.72%)
Branch coverage included in aggregate %.
1 of 1 new or added line in 1 file covered. (100.0%)
1 existing line in 1 file now uncovered.21905 of 23556 relevant lines covered (92.99%)
3972305.11 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 1 |
99.04 |
1.44% | src/lj_str.c |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 29922282959.1 | 89 |
93.34 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
|---|