diff options
author | Federico Giovanardi <federico.giovanardi@cnhind.com> | 2024-11-15 16:55:24 +0100 |
---|---|---|
committer | Federico Giovanardi <federico.giovanardi@cnhind.com> | 2024-11-15 17:12:42 +0100 |
commit | 55980446c3a1e684bab04ce82ca5f209adbd813e (patch) | |
tree | 2fbd880c3f0f3f76febbfafd8ef1e0b95d30b6e7 /src/test | |
parent | boot: make .hwids PE section more flexible to cover more than DT one day (diff) | |
download | systemd-55980446c3a1e684bab04ce82ca5f209adbd813e.tar.xz systemd-55980446c3a1e684bab04ce82ca5f209adbd813e.zip |
test: fix generate-sym-test using the wrong array
The second check was searching the symbols into the same array, but
using the size of the other. This generated a SIGSEV when they
occassionally mismatched.
Diffstat (limited to 'src/test')
-rwxr-xr-x | src/test/generate-sym-test.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/generate-sym-test.py b/src/test/generate-sym-test.py index 028d108bb5..914120b0bc 100755 --- a/src/test/generate-sym-test.py +++ b/src/test/generate-sym-test.py @@ -105,9 +105,9 @@ int main(void) { } for (j = 0; symbols_from_source[j].name; j++) { - struct symbol*n = bsearch(symbols_from_source+j, symbols_from_source, sizeof(symbols_from_sym)/sizeof(symbols_from_sym[0])-1, sizeof(symbols_from_sym[0]), sort_callback); + struct symbol*n = bsearch(symbols_from_source+j, symbols_from_sym, sizeof(symbols_from_sym)/sizeof(symbols_from_sym[0])-1, sizeof(symbols_from_sym[0]), sort_callback); if (!n) - printf("Found in sources, but not in symbol file: %s\\n", symbols_from_source[i].name); + printf("Found in sources, but not in symbol file: %s\\n", symbols_from_source[j].name); } return i == j ? EXIT_SUCCESS : EXIT_FAILURE; |