| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
Fixes to make maintainer-clean work properly.
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
|
|
|
| |
Remove the GNU awk specifics to allow the use of a standard
awk program. Fixes build errors on older distros.
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
|
|
|
|
| |
Send the boot options to the client in the order discovered. This
change is in follow up to inverting the order that the server
saves the options internally.
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Add process_global_keys to handle global key events. Using this,
implement ctrl+l to refresh.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
All process_key callbacks will want to query the key that was pressed,
so do the getch() once in cui_process_key, and pass the result to the
callback.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have a bug at the moment: if the waitset's->waiters array is updated
duing waiter_poll() (eg, a client connection is closed, and the client's
callback performs a waiter_remove()), then we may invoke callbacks for
incorrect waiters.
This change uses a consistent waiters array duing execution of
waiter_poll, so that any pollfds returned from poll() will result in
correct callback invocations.
This assumes that a waiter will only ever remove *itself* from the
waitset; otherwise, we may call a free()ed waiter.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
Since we reallocate set->waiters, we can't hand out pointers to within
that array.
Instead, this change allocates the 'struct waiter's separately from the
set->waiters array.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
When a client disconnects, the read from the client's fd will return
EOF. We should destroy the client in this situation.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
exec is a bit flaky for starting on consoles, so use getty instead.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
Allows for cleaner usage message in the source.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We should talloc_free the parser list once we're done, enabling
valgrind's leak check. Before:
[jk@pablo parser]$ valgrind ./test-null
...
==9330== HEAP SUMMARY:
==9330== in use at exit: 288 bytes in 3 blocks
==9330== total heap usage: 11 allocs, 8 frees, 1,177 bytes allocated
After:
[jk@pablo parser]$ valgrind ./test-null
...
==9940== HEAP SUMMARY:
==9940== in use at exit: 0 bytes in 0 blocks
==9940== total heap usage: 11 allocs, 11 frees, 1,177 bytes allocated
==9940==
==9940== All heap blocks were freed -- no leaks are possible
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
In preparation for packaging add a man page, a help option, and some
comments to the script.
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new routine check_not_present_resource() to check
that a resource is not present. This is typically used
to check that an initrd entry has not been found.
Also add any needed checks for no initrd to the existing
tests.
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
|
|
|
| |
Now that we dynamically add parsers, we can use a list to
hold them. Also simplifies the test_run_parser() routine.
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
| |
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
| |
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
|
|
| |
Ubuntu uses the linux16 symbol in thier conf files for memory test entries.
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
|
|
| |
Grub2 menuentry entry text can use double or single quotes.
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
| |
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
Add a resource type for grub, allowing us to parse search parameters.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Any other implementation of resources will need to resolve againsst
particular devices, so make resolve_devpath_against_device
publically-accessible, and rename to not be devpath-specific.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Remove some of the more noisy log messages, and add some information
pertinent to device resolution events.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
Add a real-world config file from a f18 ppc64 machine.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Add a yaboot test to add boot options for an external device, then
hotplug that device.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Add a function, test_hotplug_device(), to simulate the addition of
devices during tests. This should make it possible to observe boot
options' resources changing from unresolved state to resolved.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Add check_resolved_local_resource and check_unresolved_resource to
check the resources returned from parsers.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
Simple function to check a boot_option's name.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
Add a small helper to check boot option arguments.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Add a helper function to check the expected boot option counts, and
print the boot option details if the check fails.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
We should error-out if we didn't find a valid parser, so it doesn't look
like we found no boot options.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Add a little post-processing script (extract-config.awk) to allow us to
put the config data directly into the test .c files, without having to
quote the C string.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Some tests may want to use an existing buffer as config data, so add
test_read_config_data() to allow this.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change is a major rework of the parser tests. Currently, the parser
tests just run the parsers on each subdir of data/, but we don't
actually check the results.
Rather than just running parsers and expecting a certain fixed output,
the new tests are arbitraty (short!) C programs. This allows us to set
up the device configuration / discover context etc in whatever manner
necessary, and check that the boot options that the parsers emit are
correct.
This change removes all of the old tests, and adds a new "null" test.
Actual tests will be added in subsequent changes.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
| |
This change moves some of the device-handler code into an #ifdef-ed
section, so we can easily drop the stuff that's not required for
testing.
Although the change is quite large, most of it is moving entire
functions around.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
Add a function to unparse a URL, to make comparisons in tests easy.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Devices that have been added via the user path may not have a device
path. In this case, don't segfault in device_match_path, and break out
of mount_device early.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
| |
We should always be tallocing resources to a boot option context;
anything else (for example, the discover context) may have a different
lifetime.
In order to enforce this, we change the void *ctx argument to the
context_create functions to a struct discover_boot_option.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|