]> granicus.if.org Git - strace/commit
tests/btrfs.c: add pid suffix to the created directory, remove it on exit
authorEugene Syromyatnikov <evgsyr@gmail.com>
Sun, 18 Mar 2018 06:56:52 +0000 (07:56 +0100)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 20 Apr 2018 12:39:05 +0000 (12:39 +0000)
commit8c8321ee9e882f8f061cf035dc468bc7ce148a11
tree32bd9eb2a3a5ebb1ac5b2e73a402470111bbd5e0
parentfe73383f959762cc1ed20bd603f8efc9b95fe6a1
tests/btrfs.c: add pid suffix to the created directory, remove it on exit

If multiple tests are running simultaneously in the same directory,
conflicts (and test failures) may happen.

* tests/btrfs.c (path, dir_name_fmt, dir_name): New variables.
(btrfs_test_ino_path_ioctls): Use dir_name for printing directory name.
(rm_test_dir): New function.
(main): Generate dir_name, use it instead of fixed name, add rm_test_dir
as an atexit handler.
tests/btrfs.c