public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: elfutils-devel@sourceware.org
Cc: fche@redhat.com, mcermak@redhat.com, dpranke@chromium.org,
		thestig@chromium.org, thomasanderson@chromium.org
Subject: Re: [PATCH] libelf: Fix some 32bit offset/size issues that break updating 4G+ files.
Date: Wed, 19 Jun 2019 23:10:00 -0000	[thread overview]
Message-ID: <88f529e444b84b7b58813fcaf185b80473fd569c.camel@klomp.org> (raw)
In-Reply-To: <1560902643-20602-1-git-send-email-mark@klomp.org>

On Wed, 2019-06-19 at 02:04 +0200, Mark Wielaard wrote:
> The patch also contains a testcase. But since it is necessary to create
> and process a 4GB+ file it is guarded by some checks to make sure the
> machine has enough disk and memory. Do these checks look reasonable?
> They probably prevent (make the test SKIP) on all buildbot CI workers.

We discussed this a bit on irc and it was pointed out that the machine
also really needs to have a somewhat fast disk. After a bit of
experimenting I found the following the be a good indicator of the
testcase being able to run in reasonable time:

diff --git a/tests/run-large-elf-file.sh b/tests/run-large-elf-file.sh
index 3d1bdb6..d97eec9 100755
--- a/tests/run-large-elf-file.sh
+++ b/tests/run-large-elf-file.sh
@@ -35,6 +35,15 @@ if test $space_available -lt 10; then
   exit 77
 fi
 
+# Make sure the disk is reasonably fast, should be able to write 100MB/s
+fast_disk=1
+timeout -s9 10s dd conv=fsync if=/dev/urandom of=tempfile bs=1M count=1K \
+  || fast_disk=0; rm tempfile
+if test $fast_disk -eq 0; then
+  echo "Disk not fast enough, need at least 100MB/s"
+  exit 77
+fi
+
 # Make sure the files fit into memory, assume 6GB needed (2.5 * 2 + 1 extra).
 mem_available=$(free -g | grep ^Mem: | awk -F ' +' '{print $7}')
 echo "mem_available: $mem_available"

  reply	other threads:[~2019-06-19 23:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-19  0:04 Mark Wielaard
2019-06-19 23:10 ` Mark Wielaard [this message]
2019-06-20  1:54   ` Dmitry V. Levin
2019-06-20  7:29     ` Mark Wielaard
2019-06-28 21:38       ` Mark Wielaard
2019-07-02 18:40 ` Lei Zhang
2019-07-02 23:15   ` Mark Wielaard
2019-07-02 23:21     ` Lei Zhang
2019-07-03 14:53       ` Mark Wielaard
2019-07-03 15:23         ` Lei Zhang
2019-07-03 15:34           ` Mark Wielaard
2019-07-03 16:00             ` Lei Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=88f529e444b84b7b58813fcaf185b80473fd569c.camel@klomp.org \
    --to=mark@klomp.org \
    --cc=dpranke@chromium.org \
    --cc=elfutils-devel@sourceware.org \
    --cc=fche@redhat.com \
    --cc=mcermak@redhat.com \
    --cc=thestig@chromium.org \
    --cc=thomasanderson@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).