1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env bash
# The first argument to this script is the name of the credential store to test.
#
# To test all the Linux credential stores, run this three times:
# bash run-linux-test.bash keyutils
# bash run-linux-test.bash secret-service-sync
# bash run-linux-test.bash secret-service-async
#
# By default, this "shows the sausage being made" as the test runs.
# If you don't want to see that, pipe the output of this script into
# a grep for the word `TEST`, as in:
# bash run-linux-test.bash keyutils | grep TEST
# Then you will just see the test program output (on stderr)
# together with the results of the testing.
#
# You can also just ignore the output completely and look at the
# exit code: if it's 0, the test passed, if it's 1 it didn't.
#
# You must have installed `procdump` from the Microsoft SysInternals suite
# before you run this script. And make sure your Yama ptrace setting allows
# users to dump processes. (See https://stackoverflow.com/a/10163848/558006
# and let your search engine AI look for `how set value of yama ptrace`)
# shellcheck disable=SC2086
&
# shellcheck disable=SC2181
if [; then
fi
|
# shellcheck disable=SC2181
if [; then
exit_code=1
else
exit_code=0
fi