-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A little test refactoring to add another kind of test - memory checking. Not added to an existing E2E_RUN() because valgrind would interfere with strace logging syscalls. Signed-off-by: Alexey Gladkov <legion@kernel.org>
- Loading branch information
Showing
24 changed files
with
157 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
AT_SETUP([clrunimap]) | ||
AT_KEYWORDS([e2e clrunimap memcheck]) | ||
AT_SKIP_IF([ test "$SANDBOX" != "priviliged" ]) | ||
E2E_MEMCHECK(["$abs_top_builddir/src/clrunimap"]) | ||
AT_CLEANUP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
AT_SETUP([dumpkeys (path/ruwin_cplk-UTF-8.map)]) | ||
AT_KEYWORDS([e2e dumpkeys memcheck]) | ||
AT_SKIP_IF([ test "$SANDBOX" != "priviliged" ]) | ||
export LANG=en_US.UTF-8 | ||
kbd_mode -u -f | ||
"$abs_top_builddir/src/loadkeys" -c -s "$abs_srcdir/data/keymaps/VoidSymbol.map" | ||
"$abs_top_builddir/src/loadkeys" "$abs_srcdir/data/keymaps/i386/qwerty/ruwin_cplk-UTF-8.map" | ||
E2E_MEMCHECK(["$abs_top_builddir/src/dumpkeys"]) | ||
AT_CLEANUP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
AT_SETUP([getunimap (empty unimap)]) | ||
AT_KEYWORDS([e2e getunimap memcheck]) | ||
AT_SKIP_IF([ test "$SANDBOX" != "priviliged" ]) | ||
clrunimap || "$abs_top_builddir/src/clrunimap" | ||
E2E_MEMCHECK(["$abs_top_builddir/src/getunimap"]) | ||
AT_CLEANUP | ||
|
||
AT_SETUP([getunimap (cp866)]) | ||
AT_KEYWORDS([e2e getunimap memcheck]) | ||
AT_SKIP_IF([ test "$SANDBOX" != "priviliged" ]) | ||
clrunimap || "$abs_top_builddir/src/clrunimap" | ||
loadunimap "$abs_srcdir/data/unimaps/cp866.uni" | ||
E2E_MEMCHECK(["$abs_top_builddir/src/getunimap"]) | ||
AT_CLEANUP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
AT_SETUP([loadkeys (path/ruwin_cplk-UTF-8.map)]) | ||
AT_KEYWORDS([e2e loadkeys memcheck]) | ||
AT_SKIP_IF([ test "$SANDBOX" != "priviliged" ]) | ||
kbd_mode -u -f | ||
"loadkeys" -c -s "$abs_srcdir/data/keymaps/VoidSymbol.map" | ||
E2E_MEMCHECK(["$abs_top_builddir/src/loadkeys" "$abs_srcdir/data/keymaps/i386/qwerty/ruwin_cplk-UTF-8.map"]) | ||
AT_CLEANUP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
AT_SETUP([loadunimap (cp866)]) | ||
AT_KEYWORDS([e2e loadunimap memcheck]) | ||
AT_SKIP_IF([ test "$SANDBOX" != "priviliged" ]) | ||
clrunimap || "$abs_top_builddir/src/clrunimap" | ||
E2E_MEMCHECK(["$abs_top_builddir/src/loadunimap" cp866]) | ||
AT_CLEANUP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
AT_SETUP([setfont (path/UniCyrExt_8x16.psf)]) | ||
AT_KEYWORDS([e2e setfont memcheck]) | ||
AT_SKIP_IF([ test "$SANDBOX" != "priviliged" ]) | ||
AT_SKIP_IF([ test -z "$HAVE_VGA" ]) | ||
E2E_CHECK(["$abs_top_builddir/src/setfont" -v "$abs_srcdir/data/consolefonts/UniCyrExt_8x16.psf"]) | ||
AT_CLEANUP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
AT_SETUP([setvtrgb (vga)]) | ||
AT_KEYWORDS([e2e setvtrgb memcheck]) | ||
AT_SKIP_IF([ test "$SANDBOX" != "priviliged" ]) | ||
E2E_MEMCHECK(["$abs_top_builddir/src/setvtrgb" vga]) | ||
AT_CLEANUP | ||
|
||
AT_SETUP([setvtrgb (vtrgb.ubuntu)]) | ||
AT_KEYWORDS([e2e setvtrgb memcheck]) | ||
AT_SKIP_IF([ test "$SANDBOX" != "priviliged" ]) | ||
E2E_MEMCHECK(["$abs_top_builddir/src/setvtrgb" "$abs_srcdir/data/setvtrgb/vtrgb.ubuntu"]) | ||
AT_CLEANUP | ||
|
||
AT_SETUP([setvtrgb (vtrgb.ubuntu.hex)]) | ||
AT_KEYWORDS([e2e setvtrgb memcheck]) | ||
AT_SKIP_IF([ test "$SANDBOX" != "priviliged" ]) | ||
E2E_MEMCHECK(["$abs_top_builddir/src/setvtrgb" "$abs_srcdir/data/setvtrgb/vtrgb.ubuntu.hex"]) | ||
AT_CLEANUP |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh -efu | ||
|
||
cwd="$(readlink -ev "${0%/*}")" | ||
|
||
rc=0 | ||
strace -o syscalls.raw -s 1073741823 -e abbrev=none -e trace=/open.*,/ioctl \ | ||
-- "$@" \ | ||
1>stdout \ | ||
2>stderr || rc=$? | ||
|
||
"$cwd/syscall-filter.sed" < syscalls.raw > syscalls ||: | ||
|
||
exit $rc |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
AT_SETUP([getunimap (empty unimap)]) | ||
AT_KEYWORDS([e2e getunimap]) | ||
AT_SKIP_IF([ test "$SANDBOX" != "priviliged" ]) | ||
clrunimap | ||
clrunimap || "$abs_top_builddir/src/clrunimap" | ||
E2E_CHECK(["$abs_top_builddir/src/getunimap"]) | ||
E2E_COMPARE_SYSCALLS([cat $abs_srcdir/data/e2e/getunimap-test01.calls]) | ||
AT_CLEANUP | ||
|
||
AT_SETUP([getunimap (cp866)]) | ||
AT_KEYWORDS([e2e getunimap]) | ||
AT_SKIP_IF([ test "$SANDBOX" != "priviliged" ]) | ||
clrunimap | ||
clrunimap || "$abs_top_builddir/src/clrunimap" | ||
loadunimap "$abs_srcdir/data/unimaps/cp866.uni" | ||
E2E_CHECK(["$abs_top_builddir/src/getunimap"]) | ||
E2E_COMPARE_SYSCALLS([cat $abs_srcdir/data/e2e/getunimap-test02.calls], [clrunimap], [clrunimap]) | ||
AT_CLEANUP | ||
|
||
AT_SETUP([getunimap (cp866)]) | ||
AT_KEYWORDS([e2e getunimap]) | ||
AT_SKIP_IF([ test "$SANDBOX" != "priviliged" ]) | ||
clrunimap || "$abs_top_builddir/src/clrunimap" | ||
loadunimap "$abs_srcdir/data/unimaps/cp866.uni" | ||
E2E_MEMCHECK(["$abs_top_builddir/src/getunimap"]) | ||
AT_CLEANUP |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/sh -efu | ||
|
||
tool="$1" | ||
shift | ||
|
||
case "$tool" in | ||
memcheck) | ||
valgrind_args="--leak-check=full --leak-resolution=high --show-leak-kinds=all --track-origins=yes" | ||
;; | ||
*) | ||
echo >&1 "$0: unknown valgrind tool: $tool" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
rc=0 | ||
valgrind --tool="$tool" $valgrind_args --error-exitcode=1 -- "$@" \ | ||
1>stdout.valgrind \ | ||
2>stderr.valgrind || rc=$? | ||
|
||
if [ $rc -eq 0 ]; then | ||
rm -f -- stdout.valgrind stderr.valgrind | ||
exit 0 | ||
fi | ||
|
||
mv -f -- stdout.valgrind stdout | ||
mv -f -- stderr.valgrind stderr | ||
|
||
exit $rc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters