summaryrefslogtreecommitdiff
path: root/.gitignore
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-05-23 22:28:53 +0200
committerJim Meyering <jim@meyering.net>2007-05-23 22:30:15 +0200
commit873251291e04dec0f7ab0d5b7d65809981ed95b4 (patch)
tree799101161149a00354dc9a5214afec650798f0ba /.gitignore
parentc1c80224d31fb1cfde26aa544790b307dccbb9a5 (diff)
downloadparted-873251291e04dec0f7ab0d5b7d65809981ed95b4.tar.gz
Don't fail all tests when "." lacks O_DIRECT support.
I often build tools on a tmpfs file system (it's faster), and found that parted tests always failed there. That's because it tries to open the "device" (a file) with O_DIRECT, and at least the linux tmpfs driver always fails with EINVAL in that case. So here's a patch that makes it work. Since the test may require writing in a directory like /tmp, to which others typically have write access, it is particularly careful about security (see the mkdtemp script below), in case "make check" is run by e.g., root. Don't fail all tests when "." lacks O_DIRECT support. Before, running "make check" on a file system that doesn't support O_DIRECT (e.g. tmpfs), would always fail. Now, it works, as long as the test machinery can find a writable directory in which open with O_DIRECT *does* work. * m4/o-direct.m4: New file. Find a directory/FS with O_DIRECT support. * configure.ac: Use the new macro. * libparted/tests/t1000-label.sh: New file. Wrap the binary, so it can take advantage of the code that finds O_DIRECT supporting FS. * tests/mkdtemp: New file. Required, since when running tests as root, we may have to create a temporary directory in a directory like /tmp that's writable by others. * tests/Makefile.am (EXTRA_DIST): Add mkdtemp. * tests/test-lib.sh: When creating test subdir, and setting up "trap", use the directory specified in $PARTED_USABLE_TEST_DIR. Don't set PATH here. Now, that's done via the generated, and always- sourced, init.sh. As a result, invoke parted via its full file name.
Diffstat (limited to '.gitignore')
-rw-r--r--.gitignore1
1 files changed, 1 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 28054a3..1bcbf96 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,6 +18,7 @@ configure
doc/C/po/parted.8.pot
doc/pt_BR/parted.8.pt_BR.po
libparted.pc
+libparted/tests/init.sh
libparted/tests/label
libtool
m4