aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/cachestat
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-08-28 18:46:47 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2023-08-28 18:46:47 -0700
commit5a31cc7297072a7266a910ca5266b640d27803b4 (patch)
tree797dee0e1dece91407c609567a83a5e3ba54c55a /tools/testing/selftests/cachestat
parentMerge tag 'thermal-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm (diff)
parentselftests: cachestat: use proper syscall number macro (diff)
downloadwireguard-linux-5a31cc7297072a7266a910ca5266b640d27803b4.tar.xz
wireguard-linux-5a31cc7297072a7266a910ca5266b640d27803b4.zip
Merge tag 'linux-kselftest-next-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull Kselftest updates from Shuah Khan: "A mix of fixes, enhancements, and new tests. Bulk of the changes enhance and fix rseq and resctrl tests. In addition, user_events, dmabuf-heaps and perf_events are added to default kselftest build and test coverage. A futex test fix, enhance prctl test coverage, and minor fixes are included in this update" * tag 'linux-kselftest-next-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (32 commits) selftests: cachestat: use proper syscall number macro selftests: cachestat: properly link in librt selftests/futex: Order calls to futex_lock_pi selftests: Hook more tests into the build infrastructure selftests/user_events: Reenable build selftests/filesystems: Add six consecutive 'x' characters to mktemp selftests/rseq: Use rseq_unqual_scalar_typeof in macros selftests/rseq: Fix arm64 buggy load-acquire/store-release macros selftests/rseq: Implement rseq_unqual_scalar_typeof selftests/rseq: Fix CID_ID typo in Makefile selftests:prctl: add set-process-name to .gitignore selftests:prctl: Fix make clean override warning selftests/resctrl: Remove test type checks from cat_val() selftests/resctrl: Pass the real number of tests to show_cache_info() selftests/resctrl: Move CAT/CMT test global vars to function they are used in selftests/resctrl: Don't use variable argument list for ->setup() selftests/resctrl: Don't pass test name to fill_buf selftests/resctrl: Improve parameter consistency in fill_buf selftests/resctrl: Remove unnecessary startptr global from fill_buf selftests/resctrl: Remove "malloc_and_init_memory" param from run_fill_buf() ...
Diffstat (limited to 'tools/testing/selftests/cachestat')
-rw-r--r--tools/testing/selftests/cachestat/Makefile2
-rw-r--r--tools/testing/selftests/cachestat/test_cachestat.c7
2 files changed, 4 insertions, 5 deletions
diff --git a/tools/testing/selftests/cachestat/Makefile b/tools/testing/selftests/cachestat/Makefile
index fca73aaa7d14..778b54ebb036 100644
--- a/tools/testing/selftests/cachestat/Makefile
+++ b/tools/testing/selftests/cachestat/Makefile
@@ -3,6 +3,6 @@ TEST_GEN_PROGS := test_cachestat
CFLAGS += $(KHDR_INCLUDES)
CFLAGS += -Wall
-CFLAGS += -lrt
+LDLIBS += -lrt
include ../lib.mk
diff --git a/tools/testing/selftests/cachestat/test_cachestat.c b/tools/testing/selftests/cachestat/test_cachestat.c
index c037553cfd92..4804c7dc7b31 100644
--- a/tools/testing/selftests/cachestat/test_cachestat.c
+++ b/tools/testing/selftests/cachestat/test_cachestat.c
@@ -23,7 +23,6 @@ static const char * const dev_files[] = {
"/dev/zero", "/dev/null", "/dev/urandom",
"/proc/version", "/proc"
};
-static const int cachestat_nr = 451;
void print_cachestat(struct cachestat *cs)
{
@@ -144,7 +143,7 @@ static int test_cachestat(const char *filename, bool write_random, bool create,
}
}
- syscall_ret = syscall(cachestat_nr, fd, &cs_range, &cs, 0);
+ syscall_ret = syscall(__NR_cachestat, fd, &cs_range, &cs, 0);
ksft_print_msg("Cachestat call returned %ld\n", syscall_ret);
@@ -172,7 +171,7 @@ static int test_cachestat(const char *filename, bool write_random, bool create,
ksft_print_msg("fsync fails.\n");
ret = KSFT_FAIL;
} else {
- syscall_ret = syscall(cachestat_nr, fd, &cs_range, &cs, 0);
+ syscall_ret = syscall(__NR_cachestat, fd, &cs_range, &cs, 0);
ksft_print_msg("Cachestat call (after fsync) returned %ld\n",
syscall_ret);
@@ -233,7 +232,7 @@ bool test_cachestat_shmem(void)
goto close_fd;
}
- syscall_ret = syscall(cachestat_nr, fd, &cs_range, &cs, 0);
+ syscall_ret = syscall(__NR_cachestat, fd, &cs_range, &cs, 0);
if (syscall_ret) {
ksft_print_msg("Cachestat returned non-zero.\n");