Skip to content

Commit 4c5e8fc

Browse files
committed
Merge tag 'linux-kselftest-4.18-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull more Kselftest updates from Shuah Khan: - fix a signedness bug in cgroups test - add ppc support for kprobe args tests * tag 'linux-kselftest-4.18-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kselftest/cgroup: fix a signedness bug selftests/ftrace: Add ppc support for kprobe args tests
2 parents 2f6e24d + 53c3daf commit 4c5e8fc

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

tools/testing/selftests/cgroup/cgroup_util.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static ssize_t read_text(const char *path, char *buf, size_t max_len)
3535
return len;
3636
}
3737

38-
static ssize_t write_text(const char *path, char *buf, size_t len)
38+
static ssize_t write_text(const char *path, char *buf, ssize_t len)
3939
{
4040
int fd;
4141

@@ -140,7 +140,7 @@ long cg_read_key_long(const char *cgroup, const char *control, const char *key)
140140
int cg_write(const char *cgroup, const char *control, char *buf)
141141
{
142142
char path[PATH_MAX];
143-
size_t len = strlen(buf);
143+
ssize_t len = strlen(buf);
144144

145145
snprintf(path, sizeof(path), "%s/%s", cgroup, control);
146146

tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_string.tc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ arm*)
2424
ARG2=%r1
2525
OFFS=4
2626
;;
27+
ppc64*)
28+
ARG2=%r4
29+
OFFS=8
30+
;;
31+
ppc*)
32+
ARG2=%r4
33+
OFFS=4
34+
;;
2735
*)
2836
echo "Please implement other architecture here"
2937
exit_untested

tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_syntax.tc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ arm*)
3434
GOODREG=%r0
3535
BADREG=%ax
3636
;;
37+
ppc*)
38+
GOODREG=%r3
39+
BADREG=%msr
40+
;;
41+
*)
42+
echo "Please implement other architecture here"
43+
exit_untested
3744
esac
3845

3946
test_goodarg() # Good-args

0 commit comments

Comments
 (0)