[parted-devel] many partitions test
Phillip Susi
phillsusi at gmail.com
Mon Jan 23 20:41:58 UTC 2012
On 1/23/2012 3:37 PM, Jim Meyering wrote:
> It stopped at 60 for a good reason.
> From the comments:
>
> # Fail the test if it takes too long.
> # On Fedora 13, it takes about 15 seconds.
> # With older kernels, it typically takes more than 150 seconds.
> $AWK "BEGIN {d = $t_final - $t0; n = $n_partitions; st = 180 < d;"\
> ' printf "created %d partitions in %.2f seconds\n", n, d; exit st }' /dev/null \
> || fail=1
>
> However, I can do better by making it more like today's test
> and not exec'ing parted once for each partition.
> In addition, we need not use 256 sectors per partition
> when just one will do.
> And finally, I don't really care if it takes a long time
> to run on a kernel that is that old.
>
> Patch for that below.
>
> I've also adjusted the preceding test:
> * do initialize the shell variable, "cmd"
> (could have had nasty consequences for test runners with a
> pathologically chosen value of the cmd envvar)
> * don't use seq, for the sake of portability
>
> From fd9fe8fa65019e62c80f87b68aa1dda46b63ecf8 Mon Sep 17 00:00:00 2001
> From: Jim Meyering <meyering at redhat.com>
> Date: Mon, 23 Jan 2012 20:01:30 +0100
> Subject: [PATCH 1/2] tests: exercise today's bug fix, creating a GPT table
> with 128 entries
>
> * tests/t0212-gpt-many-partitions.sh: New test.
> * tests/Makefile.am (TESTS): Add it.
Why make a new test instead of modifying the existing one?
More information about the parted-devel
mailing list