mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-28 10:10:29 +00:00
Speed up test suite by avoiding fsync
Add grub_util_disable_fd_syncs call to turn grub_util_fd_sync calls into no-ops, and use it in programs that copy files but do not need to take special care to sync writes (grub-mknetdir, grub-rescue, grub-mkstandalone). On my laptop, this reduces partmap_test's runtime from 1236 seconds to 204 seconds.
This commit is contained in:
1 parent
fc3f2b72cd
commit
5c7206e45e
9 files changed
+52
-11
No files matched your search
@@ -369,6 +369,7 @@ main (int argc, char *argv[])
|
||||
const char *pkgdatadir;
|
||||
|
||||
grub_util_host_init (&argc, &argv);
|
||||
grub_util_disable_fd_syncs ();
|
||||
|
||||
pkgdatadir = grub_util_get_pkgdatadir ();
|
||||
|
||||
@@ -529,7 +530,7 @@ main (int argc, char *argv[])
|
||||
GRUB_COMPRESSION_AUTO);
|
||||
sz = ftello (sa);
|
||||
fflush (sa);
|
||||
fsync (fileno (sa));
|
||||
grub_util_fd_sync (fileno (sa));
|
||||
fclose (sa);
|
||||
|
||||
if (sz > 32768)
|
||||
|
||||
Reference in new issue
Block a user