Skip to content

Commit

Permalink
Merge tag 'linux-kselftest-4.18-rc1-2' of git://git.kernel.org/pub/sc…
Browse files Browse the repository at this point in the history
…m/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
  • Loading branch information
torvalds committed Jun 15, 2018
2 parents 2f6e24d + 53c3daf commit 4c5e8fc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/testing/selftests/cgroup/cgroup_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static ssize_t read_text(const char *path, char *buf, size_t max_len)
return len;
}

static ssize_t write_text(const char *path, char *buf, size_t len)
static ssize_t write_text(const char *path, char *buf, ssize_t len)
{
int fd;

Expand Down Expand Up @@ -140,7 +140,7 @@ long cg_read_key_long(const char *cgroup, const char *control, const char *key)
int cg_write(const char *cgroup, const char *control, char *buf)
{
char path[PATH_MAX];
size_t len = strlen(buf);
ssize_t len = strlen(buf);

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ arm*)
ARG2=%r1
OFFS=4
;;
ppc64*)
ARG2=%r4
OFFS=8
;;
ppc*)
ARG2=%r4
OFFS=4
;;
*)
echo "Please implement other architecture here"
exit_untested
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ arm*)
GOODREG=%r0
BADREG=%ax
;;
ppc*)
GOODREG=%r3
BADREG=%msr
;;
*)
echo "Please implement other architecture here"
exit_untested
esac

test_goodarg() # Good-args
Expand Down

0 comments on commit 4c5e8fc

Please sign in to comment.