linux/tools/testing/selftests
Po-Hsu Lin dff6d2ae56 selftests/efivarfs: clean up test files from test_create*()
Test files created by test_create() and test_create_empty() tests will
stay in the $efivarfs_mount directory until the system was rebooted.

When the tester tries to run this efivarfs test again on the same
system, the immutable characteristics in that directory will cause some
"Operation not permitted" noises, and a false-positve test result as the
file was created in previous run.
    --------------------
    running test_create
    --------------------
    ./efivarfs.sh: line 59: /sys/firmware/efi/efivars/test_create-210be57c-9849-4fc7-a635-e6382d1aec27: Operation not permitted
      [PASS]
    --------------------
    running test_create_empty
    --------------------
    ./efivarfs.sh: line 78: /sys/firmware/efi/efivars/test_create_empty-210be57c-9849-4fc7-a635-e6382d1aec27: Operation not permitted
     [PASS]
    --------------------

Create a file_cleanup() to remove those test files in the end of each
test to solve this issue.

For the test_create_read, we can move the clean up task to the end of
the test to ensure the system is clean.

Also, use this function to replace the existing file removal code.

Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2019-04-19 17:17:19 -06:00
..
android selftests: Fix test errors related to lib.mk khdr target 2018-12-17 09:17:55 -07:00
bpf net/flow_dissector: pass flow_keys->n_proto to BPF programs 2019-04-03 16:49:48 +02:00
breakpoints
capabilities
cgroup selftests: cgroup: fix cleanup path in test_memcg_subtree_control() 2019-04-08 16:44:22 -06:00
cpu-hotplug selftests: cpu-hotplug: fix case where CPUs offline > CPUs present 2019-01-25 14:57:45 -07:00
cpufreq
drivers selftests: mlxsw: spectrum-2: Add massive delta rehash test 2019-02-24 20:25:29 -08:00
efivarfs selftests/efivarfs: clean up test files from test_create*() 2019-04-19 17:17:19 -06:00
exec
filesystems selftests: add binderfs selftests 2019-01-30 15:19:56 +01:00
firmware selftests: firmware: fix verify_reqs() return value 2019-02-08 13:00:43 +01:00
ftrace The biggest change for this release is in the histogram code. 2019-03-11 17:01:32 -07:00
futex selftests: Fix test errors related to lib.mk khdr target 2018-12-17 09:17:55 -07:00
gpio selftest/gpio: Remove duplicate header 2019-04-08 16:18:21 -06:00
ia64
intel_pstate
ipc
ir media updates for v5.1-rc1 2019-03-09 14:45:54 -08:00
kcmp
kexec selftests/kexec: update get_secureboot_mode 2019-04-17 15:32:44 -06:00
kmod
kvm KVM: selftests: complete IO before migrating guest state 2019-03-28 17:29:09 +01:00
lib lib: Add test module for strscpy_pad 2019-04-08 16:44:21 -06:00
livepatch livepatch/selftests: use "$@" to preserve argument list 2019-02-12 10:58:47 +01:00
locking
media_tests
membarrier
memfd selftests/memfd: add tests for F_SEAL_FUTURE_WRITE seal 2019-03-05 21:07:19 -08:00
memory-hotplug selftests: memory-hotplug: add required configs 2018-09-05 10:58:31 -06:00
mount selftests: mount: remove no longer needed config option 2018-08-09 11:26:07 -06:00
mqueue
net selftest/net: Remove duplicate header 2019-03-04 11:35:51 -08:00
netfilter selftests: netfilter: add simple masq/redirect test cases 2019-02-04 14:21:27 +01:00
networking/timestamping Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-15 12:38:38 -08:00
nsfs
ntb
pidfd selftests: add tests for pidfd_send_signal() 2019-03-05 17:04:33 +01:00
powerpc selftests/powerpc: Remove duplicate header 2019-02-26 12:32:06 +11:00
prctl
proc tools/testing/selftests/proc/proc-pid-vm.c: test with vsyscall in mind 2019-03-14 14:36:20 -07:00
pstore
ptp
ptrace
rcutorture tools headers: Move the nolibc header from rcutorture to tools/include/nolibc/ 2019-01-25 15:37:13 -08:00
rseq rseq/selftests: Adapt number of threads to the number of detected cpus 2019-04-08 16:44:21 -06:00
rtc selftests: rtc: rtctest: add alarm test on minute boundary 2019-01-14 18:49:14 -07:00
safesetid LSM: SafeSetID: add selftest 2019-02-12 10:58:51 -08:00
seccomp selftests/seccomp: Handle namespace failures gracefully 2019-04-16 17:04:08 -06:00
sigaltstack
size
sparc64
splice
static_keys
sync
sysctl tools/testing/selftests/sysctl/sysctl.sh: add tests for >32-bit values written to 32-bit integers 2019-03-12 10:04:00 -07:00
tc-testing net/sched: act_sample: fix divide by zero in the traffic path 2019-04-04 10:46:33 -07:00
timers selftest/timers: Remove duplicate header 2019-04-08 16:18:21 -06:00
tmpfs tmpfs: test link accounting with O_TMPFILE 2019-03-05 21:07:20 -08:00
tpm2 selftests: add TPM 2.0 tests 2019-02-08 23:13:02 +02:00
uevent
user
vDSO selftests: vDSO - fix to return KSFT_SKIP when test couldn't be run 2018-07-11 10:14:26 -06:00
vm tools: mark 'test_vmalloc.sh' executable 2019-03-11 10:10:29 -07:00
watchdog selftests: watchdog: fix spelling mistake "experies" -> "expires" 2018-12-13 13:03:19 -07:00
x86 selftest/x86/mpx-dig.c: Remove duplicate header 2019-04-08 16:18:21 -06:00
zram
.gitignore
gen_kselftest_tar.sh
kselftest_harness.h selftests/harness: Add 30 second timeout per test 2019-04-16 17:04:34 -06:00
kselftest_install.sh
kselftest_module.h kselftest: Add test module framework header 2019-04-08 16:44:20 -06:00
kselftest_module.sh kselftest: Add test runner creation script 2019-04-08 16:44:11 -06:00
kselftest.h selftest: include stdio.h in kselftest.h 2019-02-13 08:34:47 -07:00
lib.mk selftests: fix headers_install circular dependency 2019-04-19 17:15:27 -06:00
Makefile selftests: fix headers_install circular dependency 2019-04-19 17:15:27 -06:00