Otavio Salvador wrote:
> On Tue, Jun 16, 2009 at 10:56 AM, Jim Meyering<[email protected]> wrote:
>>    make check && PARTED_SECTOR_SIZE=4096 make check
>
> Wouldn't be easy for it to be done in all calls for make check? We
> might have a way to skip it but by would be nice to have it to cover
> different sector sizes by default.

Yes ;-)
I've just done that:

From a6a86e91d1542abfe47964bee5f9cd6035136ec5 Mon Sep 17 00:00:00 2001
From: Jim Meyering <[email protected]>
Date: Wed, 17 Jun 2009 11:21:17 +0200
Subject: [PATCH] build: arrange for "make check" to run the tests four times,

each using a different simulated partition size.  First with an
explicit size of 1024, then 2048, then 4096, and finally with
the default of 512.
* Makefile.am (check-other-sector_sizes): New rule.
(check): Depend on it.
* README-big-sector: Update accordingly.
---
 Makefile.am       |   16 +++++++++++++---
 README-big-sector |    7 ++-----
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 2cebc14..8dd22d1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -62,10 +62,10 @@ new-abi-baseline:
 # 'check-abi' to test for changes against that file.
 check-abi: baseline_symbols current_symbols.txt
        @diff -u ${baseline_file} ./current_symbols.txt 2>&1 \
-         | tee libparted.abi-diff
+        | tee libparted.abi-diff
        @test `wc -l < libparted.abi-diff` -eq 0 && exit 0 \
-         || echo "ABI has changed. Please, update you ABI package version." \
-         && exit 1
+        || echo "ABI has changed. Please, update you ABI package version." \
+        && exit 1

 MOSTLYCLEANDIRS = m4

@@ -76,6 +76,16 @@ MAINTAINERCLEANFILES += \
   aclocal.m4    \
   configure

+# Run the regression test suite with different settings,
+# to ensure it works with simulated partition sizes > 512.
+.PHONY: check-other-sector_sizes
+check-other-sector_sizes:
+       PARTED_SECTOR_SIZE=1024 $(MAKE) check-recursive
+       PARTED_SECTOR_SIZE=2048 $(MAKE) check-recursive
+       PARTED_SECTOR_SIZE=4096 $(MAKE) check-recursive
+
+check: check-other-sector_sizes
+
 # Arrange so that .tarball-version appears only in the distribution
 # tarball, and never in a checked-out repository.
 # The perl substitution is to change some key uses of "rm" to "/bin/rm".
diff --git a/README-big-sector b/README-big-sector
index 394f214..b7fee08 100644
--- a/README-big-sector
+++ b/README-big-sector
@@ -49,8 +49,5 @@ priority than fixing more serious problems involving stack 
smashing,
 used-uninitialized, using-freed, etc.  and generally getting the basic
 partition-related tests to pass.

-Note that I've been making almost no effort to make _file system_-
-related tests pass with >512 sector sizes.
-
-Before long, I expect to adjust or skip FS-related tests that fail
-when sector size is larger than 512.
+I am making no effort to make _file system_-related tests pass
+with >512-byte sector sizes.
--
1.6.3.2.406.gd6a466

_______________________________________________
parted-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/parted-devel

Reply via email to