History log of /freebsd-10-stable/tools/regression/geom_gpt/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
321137 18-Jul-2017 ngie

MFC r319800,r319806:

r319800:

Don't explicitly get the class to PART in gctl_test_helper.c

This will allow the tool to be used with arbitrary geom(4) classes, like GEOM.

Specify class=PART explicitly in the tester to keep existing behavior.

r319806:

Improve handling with system state

- Always unlink $cmd after exit via END block.
- The tests don't function well if kern.geom.debugflags != 0. Save debugflags,
then restore them at the end of the test.

319170 30-May-2017 ngie

MFC r319015:

Use calloc instead of malloc + memset

319154 29-May-2017 ngie

MFC r317313:

gctl_test.t: catch errors with the mdcfg directive

While here, add a note about certain testcases relying on `count=1024` in
the "create" portion.

319014 27-May-2017 ngie

MFC r317290,r317291,r317292,r317293,r317294,r317295,r317304,r317306,r317307,r317308,r317309:

r317290:

Fix -Wimplicit-function-declaration compilation warning by moving libgeom.h
#include below the stdio.h #include.

gctl_dump(3) needs stdio.h, per reasoning noted in r317289.

PR: 218809

r317291:

Rename gctl.t to gctl_test.t and test.c to gctl_test_helper.c

This is being done to reduce ambiguity and to make the tests more portable
in the future to other locations in the source tree.

r317292:

gctl_test.t: use make to compile gctl_test_helper instead of calling cc directly

r317293:

gctl_test_helper: apply polish

- Staticize variables to fix warnings.
- Sprinkle asserts around for calls that can fail
- Apply style(9) for main(..) definition.
- ANSIify usage(..) definition.

r317294:

Bump WARNS to 6 per previous commits which fixed warnings

Tested with: clang (4.0), gcc (4.2.1, 6.3.0)

r317295:

The GPT class no longer exists; use the PART class instead

r317304:

gctl_test_helper: add diagnostic output for parse_retval(..)

This will help end-users better diagnose issues with the function.

r317306:

gctl_test.t: minor tweaks

- Declare $count with the `my` scope operator to permit `use strict`.
- Add `use strict`.
- Use `use warnings` instead of using `-w` in the shebang.
- Don't unlink $cmd when done (prevents unnecessary rebuilding).
- Improve the error message when running with insufficient permissions, e.g.,
non-root.

r317307:

Use verb=delete not verb=remove

The `remove` verb hasn't been present in geom_part*(4) for well
over a decade, if ever. I couldn't find any references to it in
^/stable/5 at least, which is around the timeframe that this test
was written.

r317308:

gctl_test.t: more tweaks to try and update the code and get it functional (again?)

- Make the logfile for $out be built off the basename for $cmd, instead of $cmd.
(r317292 broke this assumption).
- Rename $mntpt to $mntpt_prefix for clarity, as this variable is a prefix for
mountpoints.
- Reindent the umount directive block while here to match the rest of the code.

r317309:

gctl_test.t: improve error reporting with mdcfg and mount directives

If the commands had failed previously, it would press on and result in a
series of cascading failures. Fail early and continue on to the next case
instead of executing additional commands after a previously failed series
of steps.

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


157622 10-Apr-2006 marcel

MFp4:
o Add mount and umount actions so that partitions can be in use.
o Extend the testing of the add verb to include overlapping
partitions.
o Add tests for the remove verb. this includes tests to remove
a partition when in use (i.e. is mounted).
o Add a MD5 checksum to the output of the conf action so that
it can be tested. Make sure the MD5 doesn't vary based on
certain dynamic behaviour that is irrelevant to the output.
o Add MD5 checksums to the expected result of conf actions.


157621 10-Apr-2006 marcel

MFp4:
Add support for read-write parameters. Allow an optional initializer
for read-write parameters. Print the value of those parameters on
success following the PASS.


152402 13-Nov-2005 marcel

Update to match geom_gpt:1.35

o Change the result of gctl(001) now that a bogus verb still requires
a valid geom,
o Insert gctl(024) to test for an appropriate error when a bogus verb
is given that does have a proper geom parameter.


152345 12-Nov-2005 marcel

Instead of saving the unit number of the md(4) device name, save the
whole name. This does not unnecessarily close the door that in some
future we want to test on something other than md(4) devices.

Also add a "conf" action so that we can check whether a gctl actually
did the right thing or not. It's one thing to check that the result
strings are as expected, but it doesn't tell us if the end result is
correct. This needs a bit more fleshing out, but for now a visual
(i.e. manual) check suffices.


151172 09-Oct-2005 marcel

Rough implementation of the create and add verbs. The verbs cause
in-memory changes only and as such are only useful for prototyping
and regression testing purposes.


150308 19-Sep-2005 marcel

o Extend the suite to run more than just the driver. We need to run
mdconfig(8), because we need a disk to work on.
o Extend the number of tests now that we have a disk.
o Simplify the driver. All parameters are ASCII strings now.


150305 19-Sep-2005 marcel

Add the beginnings of a testsuite for testing GPT control requests.
The testsuite is based on a simple driver program that builds a
request from the arguments passed to it and issues the request to
Geom. The driver emits FAIL with the error string or PASS depending
on whether the request completed with an error or not. A -v option
has been added to the driver and causes the request to be dumped.
The -v option to prove(1) controls the -v option to the driver.

The testsuite itself contains a hash of which the key constitutes
the arguments and the value is the expected result.