linux-stable/tools
Yang Xu bfc84cfd90 selftests/zram: Adapt the situation that /dev/zram0 is being used
[ Upstream commit 01dabed205 ]

If zram-generator package is installed and works, then we can not remove
zram module because zram swap is being used. This case needs a clean zram
environment, change this test by using hot_add/hot_remove interface. So
even zram device is being used, we still can add zram device and remove
them in cleanup.

The two interface was introduced since kernel commit 6566d1a32bf7("zram:
add dynamic device add/remove functionality") in v4.2-rc1. If kernel
supports these two interface, we use hot_add/hot_remove to slove this
problem, if not, just check whether zram is being used or built in, then
skip it on old kernel.

Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-02-23 12:00:58 +01:00
..
accounting
arch ia64: tools: remove duplicate definition of ia64_mf() on ia64 2021-04-28 13:40:02 +02:00
bootconfig tools/bootconfig: Fix tracing_on option checking in ftrace2bconf.sh 2021-09-26 14:08:59 +02:00
bpf tools/resolve_btfids: Do not print any commands when building silently 2022-02-08 18:30:39 +01:00
build tools build: Remove needless libpython-version feature check that breaks test-all fast path 2021-12-14 11:32:42 +01:00
cgroup tools/cgroup/slabinfo.py: updated to work on current kernel 2021-05-07 11:04:31 +02:00
debugging
edid
firewire
firmware
gpio tools: gpio: fix %llu warning in gpio-watch.c 2021-01-27 11:55:20 +01:00
hv
iio
include tools/nolibc: fix incorrect truncation of exit code 2022-01-27 10:53:42 +01:00
io_uring
kvm/kvm_stat tools/kvm_stat: Add restart delay 2021-04-16 11:43:20 +02:00
laptop
leds
lib libbpf: Fix endianness detection in BPF_CORE_READ_BITFIELD_PROBED() 2021-11-18 14:04:11 +01:00
memory-model
objtool objtool: Fix static_call list generation 2021-11-18 14:04:02 +01:00
pci
pcmcia
perf perf stat: Fix display of grouped aliased events 2022-02-08 18:30:40 +01:00
power tweewide: Fix most Shebang lines 2021-05-22 11:40:55 +02:00
scripts tools: Allow proper CC/CXX/... override with LLVM=1 in Makefile.include 2021-07-31 08:16:10 +02:00
spi
testing selftests/zram: Adapt the situation that /dev/zram0 is being used 2022-02-23 12:00:58 +01:00
thermal/tmon tools/thermal/tmon: Add cross compiling support 2021-09-18 13:40:07 +02:00
time
usb usb: testusb: Fix for showing the connection speed 2021-10-09 14:40:56 +02:00
virtio tools/virtio: fix build 2021-09-03 10:09:27 +02:00
vm tools/vm/page-types: remove dependency on opt_file for idle page tracking 2021-10-09 14:40:57 +02:00
wmi
Makefile