]> granicus.if.org Git - strace/blob - tests/caps-abbrev.awk
Remove XLAT_END
[strace] / tests / caps-abbrev.awk
1 #!/bin/gawk
2 #
3 # This file is part of caps strace test.
4 #
5 # Copyright (c) 2014-2018 Dmitry V. Levin <ldv@altlinux.org>
6 # All rights reserved.
7 #
8 # SPDX-License-Identifier: GPL-2.0-or-later
9
10 BEGIN {
11         cap = "(0|1<<CAP_[A-Z_]+(\\|1<<CAP_[A-Z_]+)*|1<<CAP_[A-Z_]+(\\|1<<CAP_[A-Z_]+){37}\\|0xffffffc0)"
12         s_efault = "-1 EFAULT (Bad address)"
13         r_efault = "-1 EFAULT \\(Bad address\\)"
14         r_einval = "-1 EINVAL \\(Invalid argument\\)"
15         r_eperm = "-1 EPERM \\(Operation not permitted\\)"
16         r_addr = "0x[[:xdigit:]]+"
17         s[1] = "capget(NULL, NULL) = " s_efault
18         r[2] = r[3] = "^capget\\(" r_addr ", " r_addr "\\) = " r_efault
19         r[4] = "^capget\\(" r_addr ", " r_addr "\\) = 0"
20
21         s[5] = "capset(NULL, NULL) = " s_efault
22         r[6] = "^capset\\(" r_addr ", " r_addr "\\) = " r_efault
23         r[7] = "^capset\\(" r_addr ", " r_addr "\\) = " r_einval
24         r[8] = "^capset\\(" r_addr ", " r_addr "\\) = " r_efault
25         r[9] = r[10] = r[11] = "^capset\\(" r_addr ", " r_addr "\\) = " r_eperm
26         s[12] = "+++ exited with 0 +++"
27
28         lines = 12
29         fail = 0
30 }
31
32 @include "match.awk"