History log of /kvm-unit-tests/lib/argv.c (Results 1 – 15 of 15)
Revision Date Author Comments
# e526bc78 01-Jul-2023 Andrew Jones <andrew.jones@linux.dev>

Merge branch 'arm/queue' into 'master'

arm/arm64: EFI support, arm64 backtrace support, PMU test improvements, and more

See merge request kvm-unit-tests/kvm-unit-tests!43


# 85c3c524 30-May-2023 Nikos Nikoleris <nikos.nikoleris@arm.com>

lib/efi: Add support for getting the cmdline

This change adds support for discovering the command line arguments,
as a string. Then, we parse this string to populate __argc and __argv
for EFI tests.

lib/efi: Add support for getting the cmdline

This change adds support for discovering the command line arguments,
as a string. Then, we parse this string to populate __argc and __argv
for EFI tests.

Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>

show more ...


# 5a22b344 26-May-2022 Andrew Jones <drjones@redhat.com>

Merge branch 'misc/queue' into 'master'

lib: cleanups

See merge request kvm-unit-tests/kvm-unit-tests!32


# 5927d1c2 19-May-2022 Andrew Jones <drjones@redhat.com>

lib: Add ctype.h and collect is* functions

We've been slowly adding ctype functions to different files without
even exporting them. Let's change that.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Re

lib: Add ctype.h and collect is* functions

We've been slowly adding ctype functions to different files without
even exporting them. Let's change that.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Signed-off-by: Andrew Jones <drjones@redhat.com>

show more ...


# 03b1e457 22-Jul-2019 Nadav Amit <nadav.amit@gmail.com>

x86: Support environments without test-devices

Enable to run the tests when test-device is not present (e.g.,
bare-metal). Users can provide the number of CPUs and ram size through
kernel parameters

x86: Support environments without test-devices

Enable to run the tests when test-device is not present (e.g.,
bare-metal). Users can provide the number of CPUs and ram size through
kernel parameters.

On Ubuntu that uses grub, for example, the tests can be run by copying a
test to the boot directory (/boot) and adding a menu-entry to grub
(e.g., by editing /etc/grub.d/40_custom):

menuentry 'idt_test' {
set root='[ROOT]'
multiboot [BOOT_RELATIVE]/[TEST].flat [PARAMETERS]
module params.initrd
}

Replace:
* [ROOT] with `grub-probe --target=bios_hints /boot`
* [BOOT_RELATIVE] with `grub-mkrelpath /boot`
* [TEST] with the test executed
* [PARAMETERS] with the test parameters

params.initrd, which would be located on the boot directory should
describe the machine and tell the test infrastructure that a test
device is not present and boot-loader was used (the bootloader and qemu
deliver test . For example for a 4 core machines with 4GB of
memory:

NR_CPUS=4
MEMSIZE=4096
TEST_DEVICE=0
BOOTLOADER=1

Since we do not really use E820, using more than 4GB is likely to fail
due to holes.

Finally, do not forget to run update-grub. Remember that the output goes
to the serial port.

Cc: Andrew Jones <drjones@redhat.com>
Signed-off-by: Nadav Amit <nadav.amit@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 63d5cbec 27-Jun-2017 Thomas Huth <thuth@redhat.com>

Add a proper header for the lib/argv.c file

Instead of declaring the prototypes for these functions in various
C files, introduce a proper header for them. This change also
revealed that the prototy

Add a proper header for the lib/argv.c file

Instead of declaring the prototypes for these functions in various
C files, introduce a proper header for them. This change also
revealed that the prototypes of setup_args_progname() did not match
the implementation - the argument can be a "const char *", so change
the code in argv.c accordingly.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 4b6da826 07-Apr-2017 Thomas Huth <thuth@redhat.com>

lib: Add headers to generic library files

Many files in the lib folder do not have proper statements about
their license. Add such a header there so that it is clear under
which conditions the code

lib: Add headers to generic library files

Many files in the lib folder do not have proper statements about
their license. Add such a header there so that it is clear under
which conditions the code can be used.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>

show more ...


# 69205bf1 13-Jan-2017 Andrew Jones <drjones@redhat.com>

lib/argv: introduce setup_env and getenv

Provide a function that imports an environ (a list of key=value
environment variables). The list may be delimited by either
'\0' or '\n'. If the list is deli

lib/argv: introduce setup_env and getenv

Provide a function that imports an environ (a list of key=value
environment variables). The list may be delimited by either
'\0' or '\n'. If the list is delimited by '\n', then we assume
it's user input and do additional sanity checking, as well as
allow variables to be commented out with '#'. We also provide
getenv() to lookup the variables.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>

show more ...


# 4bc666ca 13-Jan-2017 Andrew Jones <drjones@redhat.com>

lib/argv: fix coding style

The next patch will double the amount of code in the file,
so let's fix its coding style first. No functional change.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Sig

lib/argv: fix coding style

The next patch will double the amount of code in the file,
so let's fix its coding style first. No functional change.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>

show more ...


# 809ebcb3 12-Jul-2016 Andrew Jones <drjones@redhat.com>

arm & powerpc: populate argv[0] fixups

* Fix powerpc builds, we can't pass $(LDFLAGS) to $(CC)
* Fix argv[0] name to include dir and suffix, like x86 has.
* Satisfy Drew's OCD by adding 'e' to all p

arm & powerpc: populate argv[0] fixups

* Fix powerpc builds, we can't pass $(LDFLAGS) to $(CC)
* Fix argv[0] name to include dir and suffix, like x86 has.
* Satisfy Drew's OCD by adding 'e' to all prognam variables,
matching the more popular variable name (says Google) used
by Paolo, PROGNAME.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 6b97d595 12-Jun-2016 Andrew Jones <drjones@redhat.com>

arm & powerpc: populate argv[0] with prognam

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


# 6ffea954 12-Jun-2016 Andrew Jones <drjones@redhat.com>

arm/arm64: reserve argv[0] for prognam

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


# 901c1c8d 22-Aug-2014 Paolo Bonzini <pbonzini@redhat.com>

Merge remote-tracking branch 'drjones/arm/v7-initial-drop'


# 5e61cba0 21-Jan-2014 Andrew Jones <drjones@redhat.com>

arm: initial drop

This is the initial drop of the arm test framework and a first test
that just checks that setup completed (a selftest). kvm isn't needed
to run this test unless testing with smp >

arm: initial drop

This is the initial drop of the arm test framework and a first test
that just checks that setup completed (a selftest). kvm isn't needed
to run this test unless testing with smp > 1.

Try it out with
yum install gcc-arm-linux-gnu
export QEMU=[qemu with mach-virt and chr-testdev]
./configure --cross-prefix=arm-linux-gnu- --arch=arm
make
./run_tests.sh

Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
---
v7:
- remove memregions (reworked them as phys_alloc in lib/alloc)
- selftest: non-functional change: s/argv[i]/var/
- lib/argv:setup_args don't dereference NULL
v6:
- fixed setup.c comment [Christoffer Dall]
- changed arm/run to use chr-testdev instead of virtio-testdev
- add align parameter to memregion_new, setup alloc_ops
v5:
- memregions: check freemem_start is in bounds and document
- selftest: rename testnam => testname and properly init it
- io.c: use writeb instead of writel in puts() and use ioremap
- arm/run script update for new qemu ('-device ?' now requires -machine)
- couple other minor changes to setup.c and io.c [Christoffer Dall]
v4:
- moved fdt to just after stacktop (it was in the middle of free memory)
- switched from using heap to memregions
- get nr_cpus and added smp=<num> test
- added barrier.h
- use new report()/report_summary()
- config/config-arm.mak cleanup

show more ...


# ea7d43d0 17-Aug-2010 Avi Kivity <avi@redhat.com>

Parse multiboot command line into argc/argv

Signed-off-by: Avi Kivity <avi@redhat.com>