svn commit: r355032 - head/tests/sys/sys
Doug Moore
dougm at FreeBSD.org
Sat Nov 23 17:22:36 UTC 2019
Author: dougm
Date: Sat Nov 23 17:22:36 2019
New Revision: 355032
URL: https://svnweb.freebsd.org/changeset/base/355032
Log:
The error messages that indicate bugs in 'area' bitstring functions
should identify accurately which function exhibited the bug.
Reviewed by: asomers
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D22519
Modified:
head/tests/sys/sys/bitstring_test.c
Modified: head/tests/sys/sys/bitstring_test.c
==============================================================================
--- head/tests/sys/sys/bitstring_test.c Sat Nov 23 13:39:47 2019 (r355031)
+++ head/tests/sys/sys/bitstring_test.c Sat Nov 23 17:22:36 2019 (r355032)
@@ -340,7 +340,7 @@ BITSTRING_TC_DEFINE(bit_ffs_area_no_match)
memset(bitstr, 0, bitstr_size(nbits));
bit_ffs_area(bitstr, nbits, 2, &found_clear_bits);
ATF_REQUIRE_EQ_MSG(-1, found_clear_bits,
- "bit_ffc_area_%d_%s: Failed all clear bits.", nbits, memloc);
+ "bit_ffs_area_%d_%s: Failed all clear bits.", nbits, memloc);
}
ATF_TC_WITHOUT_HEAD(bit_ffs_area);
@@ -358,36 +358,36 @@ ATF_TC_BODY(bit_ffs_area, tc)
location = 0;
bit_ffs_area(bitstr, nbits, 3, &location);
ATF_REQUIRE_EQ_MSG(-1, location,
- "bit_ffc_area: found location of size 3 when only 2 bits are set");
+ "bit_ffs_area: found location of size 3 when only 2 bits are set");
bit_set(bitstr, 7);
location = 0;
bit_ffs_area(bitstr, nbits, 3, &location);
ATF_REQUIRE_EQ_MSG(5, location,
- "bit_ffc_area: failed to find location of size 3");
+ "bit_ffs_area: failed to find location of size 3");
bit_set(bitstr, 8);
location = 0;
bit_ffs_area(bitstr, nbits, 3, &location);
ATF_REQUIRE_EQ_MSG(5, location,
- "bit_ffc_area: failed to find location of size 3");
+ "bit_ffs_area: failed to find location of size 3");
location = 0;
bit_ffs_area_at(bitstr, 2, nbits, 3, &location);
ATF_REQUIRE_EQ_MSG(5, location,
- "bit_ffc_area: failed to find location of size 3");
+ "bit_ffs_area_at: failed to find location of size 3");
location = 0;
bit_ffs_area_at(bitstr, 6, nbits, 3, &location);
ATF_REQUIRE_EQ_MSG(6, location,
- "bit_ffc_area: failed to find location of size 3");
+ "bit_ffs_area_at: failed to find location of size 3");
location = 0;
bit_ffs_area_at(bitstr, 8, nbits, 3, &location);
ATF_REQUIRE_EQ_MSG(-1, location,
- "bit_ffc_area: found invalid location");
+ "bit_ffs_area_at: found invalid location");
bit_set(bitstr, 69);
bit_set(bitstr, 70);
@@ -396,22 +396,22 @@ ATF_TC_BODY(bit_ffs_area, tc)
location = 0;
bit_ffs_area_at(bitstr, 8, nbits, 3, &location);
ATF_REQUIRE_EQ_MSG(69, location,
- "bit_ffc_area: failed to find location of size 3");
+ "bit_ffs_area_at: failed to find location of size 3");
location = 0;
bit_ffs_area_at(bitstr, 69, nbits, 3, &location);
ATF_REQUIRE_EQ_MSG(69, location,
- "bit_ffc_area: failed to find location of size 3");
+ "bit_ffs_area_at: failed to find location of size 3");
location = 0;
bit_ffs_area_at(bitstr, 70, nbits, 3, &location);
ATF_REQUIRE_EQ_MSG(-1, location,
- "bit_ffc_area: found invalid location");
+ "bit_ffs_area_at: found invalid location");
location = 0;
bit_ffs_area_at(bitstr, 72, nbits, 3, &location);
ATF_REQUIRE_EQ_MSG(-1, location,
- "bit_ffc_area: found invalid location");
+ "bit_ffs_area_at: found invalid location");
}
ATF_TC_WITHOUT_HEAD(bit_ffc_area);
@@ -449,17 +449,17 @@ ATF_TC_BODY(bit_ffc_area, tc)
location = 0;
bit_ffc_area_at(bitstr, 2, nbits, 3, &location);
ATF_REQUIRE_EQ_MSG(7, location,
- "bit_ffc_area: failed to find location of size 3");
+ "bit_ffc_area_at: failed to find location of size 3");
location = 0;
bit_ffc_area_at(bitstr, 8, nbits, 3, &location);
ATF_REQUIRE_EQ_MSG(8, location,
- "bit_ffc_area: failed to find location of size 3");
+ "bit_ffc_area_at: failed to find location of size 3");
location = 0;
bit_ffc_area_at(bitstr, 9, nbits, 3, &location);
ATF_REQUIRE_EQ_MSG(-1, location,
- "bit_ffc_area: found invalid bit location");
+ "bit_ffc_area_at: found invalid bit location");
bit_clear(bitstr, 77);
bit_clear(bitstr, 78);
@@ -468,22 +468,22 @@ ATF_TC_BODY(bit_ffc_area, tc)
location = 0;
bit_ffc_area_at(bitstr, 12, nbits, 3, &location);
ATF_REQUIRE_EQ_MSG(77, location,
- "bit_ffc_area: failed to find location of size 3");
+ "bit_ffc_area_at: failed to find location of size 3");
location = 0;
bit_ffc_area_at(bitstr, 77, nbits, 3, &location);
ATF_REQUIRE_EQ_MSG(77, location,
- "bit_ffc_area: failed to find location of size 3");
+ "bit_ffc_area_at: failed to find location of size 3");
location = 0;
bit_ffc_area_at(bitstr, 78, nbits, 3, &location);
ATF_REQUIRE_EQ_MSG(-1, location,
- "bit_ffc_area: found invalid location");
+ "bit_ffc_area_at: found invalid location");
location = 0;
bit_ffc_area_at(bitstr, 85, nbits, 3, &location);
ATF_REQUIRE_EQ_MSG(-1, location,
- "bit_ffc_area: found invalid location");
+ "bit_ffc_area_at: found invalid location");
}
BITSTRING_TC_DEFINE(bit_nclear)
More information about the svn-src-head
mailing list