Dmitry V. Levin
6bf08e3e4a
Print cpu_set_t as a set of integers, similar to the way fd_set is printed as a set of descriptors. * affinity.c: Include <sched.h>. (get_cpuset_size): New function. (print_affinitylist): Rewrite using get_cpuset_size and next_set_bit. (sched_getaffinity, sched_setaffinity): Print first two args as ints. * NEWS: Mention this enhancement. * tests/sched_xetaffinity.c: New file. * tests/sched_xetaffinity.test: New test. * tests/Makefile.am (check_PROGRAMS): Add sched_xetaffinity. (TESTS): Add sched_xetaffinity.test. * tests/.gitignore: Add sched_xetaffinity. Reported-by: Joe Korty <joe.korty@ccur.com>
14 lines
255 B
Bash
Executable File
14 lines
255 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Check sched_getaffinity and sched_setaffinity syscalls decoding.
|
|
|
|
. "${srcdir=.}/init.sh"
|
|
|
|
run_prog > /dev/null
|
|
OUT="$LOG.out"
|
|
run_strace -a28 -esched_getaffinity,sched_setaffinity $args > "$OUT"
|
|
match_diff "$LOG" "$OUT"
|
|
rm -f "$OUT"
|
|
|
|
exit 0
|