Created attachment 114421 [details] glibc2-27 & gdbserver problem In version 2.27 of glibc is added file sysdeps/unix/sysv/linux/select.c, which contains wrapper for select sys-call, so some tests (mcinfcallWSRU, nlcontrolc, nlvgdbsigqueue; all from gdb_server group of tests) have different output from excepted. Also, output of glibc is different among architectures. I suggest following patch, which introduce more restrictive filter.
I can confirm that we have 4 failurs in gdbserver_tests on x86 with 2.27 glibc. == 26 tests, 1 stderr failure, 0 stdout failures, 1 stderrB failure, 2 stdoutB failures, 0 post failures == gdbserver_tests/mcinfcallWSRU (stderrB) gdbserver_tests/mcmain_pic (stderr) gdbserver_tests/nlcontrolc (stdoutB) gdbserver_tests/nlvgdbsigqueue (stdoutB) After appling the patch, we have issue remaining. -- Finished tests in gdbserver_tests ----------------------------------- == 26 tests, 1 stderr failure, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == gdbserver_tests/mcmain_pic (stderr)
filter_gdb already contains some sed expressions to canononicalise select syscalls e.g. ... -e 's/in select ()$/in syscall .../' \ -e 's/in \.__select ()$/in syscall .../' \ -e 's/in select () at \.\.\/sysdeps\/unix\/syscall-template\.S.*$/in syscall .../' \ ... Isn't there a way to use or extend this technique instead of adding a new filter_select ?
Created attachment 114437 [details] glibc2-27 & gdbserver problem v2 I changed filter as you suggested and also melt patch which fixes tests gdbserver_tests/mcmain_pic.
Sorry, it looks like I was not very clear in my comment : I see you have kept the 'START_DELETE/END_DELETE' technique, which you have integrated in filter_gdb. I was more thinking to 'canonicalise' the select syscall, with sed expressions like the -e 's/in select ()$/in syscall .../' (it looks somewhat preferrable to keep the somewhat edited output, rather than deleting it). Would it be difficult to add some sed expressions, like for the other syscalls or glibc versions ? (for both the select syscall differences, but also for mcmain_pic.stderr.exp-glibc-2_27 as maintaining different .exp files is painful: changing something implies to change all the copies, and for sure test everywhere. Thanks
Created attachment 114443 [details] glibc2-27 & gdbserver problem v3 I was trying for a few days to solve this problem like you suggested (before sending first patch), but it's too complicated to make sed expression which will filter all possible outputs result on the same way. There are too many differences between versions of glibc and platforms. For mcmain_pic: I removed added exp file, and added filter_mcmain which replace number of bytes and blocks to "xx".
Philippe, Can you take a look at this patch?
Philippe, Do you need any more modifications for this?
(In reply to Dimitrije Nikolic from comment #5) Finally replying, after some holidays ;). > Created attachment 114443 [details] > glibc2-27 & gdbserver problem v3 > > I was trying for a few days to solve this problem like you suggested (before > sending first patch), but it's too complicated to make sed expression which > will filter all possible outputs result on the same way. There are too many > differences between versions of glibc and platforms. Yes, all these differences are very painful (and these differences are the reasons why we already have about 60 sed expressions in filter_gdb). It is not very clear to me why the output of glibc 2-27 cannot be handled similarly to the other differences we had up to now. Can you clarify this by showing an (unfiltered) stacktrace produced by glibc 2-27 ? (e.g. attach the unfiltered output of mcinfcallWSRU obtained by running the test with --keep-unfiltered). Otherwise, if we reach the conclusion that the 'start/end delete' technique is the best, I think we already have this technique supported in filter_gdb via: -e '/filter_gdb BEGIN drop/,/filter_gdb END drop/d' \ > > For mcmain_pic: I removed added exp file, and added filter_mcmain which > replace number of bytes and blocks to "xx". As I do not believe that we have any need to check the 'in use at exit' in any vgdb tests, I think we better do the sed expression to change in use at exit: [0-9][0-9]* bytes in [0-9][0-9]* blocks to in use at exit: ... bytes in ... blocks as part of filter_gdb. If you prefer, you can do this part as a separate first patch. Thanks for the patience ...
(In reply to Philippe Waroquiers from comment #8) > > > > For mcmain_pic: I removed added exp file, and added filter_mcmain which > > replace number of bytes and blocks to "xx". > As I do not believe that we have any need to check the 'in use at exit' > in any vgdb tests, I think we better do the sed expression to change > in use at exit: [0-9][0-9]* bytes in [0-9][0-9]* blocks > to > in use at exit: ... bytes in ... blocks > as part of filter_gdb. > If you prefer, you can do this part as a separate first patch. I changed filter_memcheck_monitor (not filer_gdb as you suggested) and also changed exp files of those tests whose output have changed. I attached that patch as glibc2-27_gdbserver_v4_part2.diff
Created attachment 114681 [details] glibc2-27_gdbserver_v4_part2 glibc 2.27 and gdb_server tests Remove checks for "in use at exit" bytes. After resolving glibc bug #17730, memcheck's outputs of some gdbserver tests are different in "in use at exit" parts which is not relevant for tests execution. Fixed : gdbserver_tests/mcmain_pic
(In reply to Philippe Waroquiers from comment #8) > (In reply to Dimitrije Nikolic from comment #5) > Finally replying, after some holidays ;). > > > Created attachment 114443 [details] > > glibc2-27 & gdbserver problem v3 > > > > I was trying for a few days to solve this problem like you suggested (before > > sending first patch), but it's too complicated to make sed expression which > > will filter all possible outputs result on the same way. There are too many > > differences between versions of glibc and platforms. > Yes, all these differences are very painful (and these differences > are the reasons why we already have about 60 sed expressions > in filter_gdb). > It is not very clear to me why the output of glibc 2-27 cannot > be handled similarly to the other differences we had up to now. > Can you clarify this by showing an (unfiltered) stacktrace > produced by glibc 2-27 ? > (e.g. attach the unfiltered output of mcinfcallWSRU obtained by > running the test with --keep-unfiltered). > > Otherwise, if we reach the conclusion that the 'start/end delete' > technique is the best, I think we already have this technique > supported in filter_gdb via: > -e '/filter_gdb BEGIN drop/,/filter_gdb END drop/d' > \ > I attached differences between output of test on MIPS and X86 architectures. (with glibc 2.27) Both of these outputs are different from present exp file. I suggest that we use technique > supported in filter_gdb via: > -e '/filter_gdb BEGIN drop/,/filter_gdb END drop/d' and I attached patch glibc2-27_gdbserver_v4_part1.diff
Created attachment 114682 [details] glibc2-27_gdbserver_v4_part1
Created attachment 114683 [details] diff_mips_x86
Thanks for this work. I will look at all that in the coming days (probably this week-end).
I have looked at the patch v4_part2. The patch filters more than just the 'use at exit'. That means that e.g. we do not check anymore (or check less) the incremental leak values/behaviour. So, I have pushed a214595da, which changes filter_memcheck_monitor to just change the 'in use at exit'. Please confirm that is good enough for the glibc 2.27 memory related differences.
(In reply to Dimitrije Nikolic from comment #11) > I attached differences between output of test on MIPS and X86 architectures. > (with glibc 2.27) Can you rather attach the full unfiltered output on MIPS and X86, as produced for one of the failing tests with: perl tests/vg_regtest --keep-unfiltered gdbserver_tests/mcinfcallWSRU.vgtest That should produce some files matching mcinfcallWSRU.*unfiltered.out Please attach these files for MIPS and X86. thanks > Both of these outputs are different from present exp file. > I suggest that we use technique > > supported in filter_gdb via: > > -e '/filter_gdb BEGIN drop/,/filter_gdb END drop/d' > and I attached patch glibc2-27_gdbserver_v4_part1.diff Thanks for the patch, I would first like to take a look at the unfiltered output before applying this filter. Thanks Philippe
Commit 0822ebca8f964f1685d667e0c21fea926633bb92 should make the gdbserver tests working with glibc 2.27 (at least it does on Ubuntu 18.04 which has a glibc 2.27) Please confirm this also works on mips. Thanks Philippe
(In reply to Philippe Waroquiers from comment #17) > Commit 0822ebca8f964f1685d667e0c21fea926633bb92 should make the gdbserver > tests working with glibc 2.27 > (at least it does on Ubuntu 18.04 which has a glibc 2.27) > > > Please confirm this also works on mips. > > Thanks > > Philippe Hi Philippe, It works on mips, too. Dimitrije
Thanks for the feedback, closing the bug then.