#
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
|
#
af8e25f9 |
| 30-May-2023 |
Nikos Nikoleris <nikos.nikoleris@arm.com> |
lib/printf: Add support for printing wide strings
This change adds support for wide strings (u16*) to printf() variants. This feature is used by a future change.
Signed-off-by: Nikos Nikoleris <nik
lib/printf: Add support for printing wide strings
This change adds support for wide strings (u16*) to printf() variants. This feature is used by a future change.
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Ricardo Koller <ricarkol@google.com> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
show more ...
|
#
2a9c2e2f |
| 30-May-2023 |
Nikos Nikoleris <nikos.nikoleris@arm.com> |
lib/printf: Support for precision modifier in printf
This follows the typical format of:
printf("%.Ns", *str);
Where N might be a decimal digit string or '*'. This feature is used by a future chan
lib/printf: Support for precision modifier in printf
This follows the typical format of:
printf("%.Ns", *str);
Where N might be a decimal digit string or '*'. This feature is used by a future change.
See also: man 3 printf
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Andrew Jones <drjones@redhat.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
|
#
0e981298 |
| 19-May-2022 |
Andrew Jones <drjones@redhat.com> |
lib: Fix whitespace
printf.c and string.c are a couple of the original files and are the last that still have the original formatting. Let's finally clean them up!
The change was done by modifying
lib: Fix whitespace
printf.c and string.c are a couple of the original files and are the last that still have the original formatting. Let's finally clean them up!
The change was done by modifying Linux's scripts/Lindent to use 100 columns instead of 80 and then manually reverting a few changes that I didn't like, which I found by diffing with -b.
Acked-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Signed-off-by: Andrew Jones <drjones@redhat.com>
show more ...
|
#
23b8916b |
| 29-Jun-2017 |
Thomas Huth <thuth@redhat.com> |
Mark some local functions as "static"
Discovered while compiling kvm-unit-tests with the "-Wmissing-prototypes" parameter of GCC.
Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <14987617
Mark some local functions as "static"
Discovered while compiling kvm-unit-tests with the "-Wmissing-prototypes" parameter of GCC.
Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1498761773-11164-4-git-send-email-thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
c9af8739 |
| 17-May-2017 |
Radim Krčmář <rkrcmar@redhat.com> |
libcflat: support # flag in printf
The only use is with %#x, where we'll automatically get 0x prefix. Advantage over 0x%x can be seen with padding.
A simple test:
printf(".%#08x.\n", 0); print
libcflat: support # flag in printf
The only use is with %#x, where we'll automatically get 0x prefix. Advantage over 0x%x can be seen with padding.
A simple test:
printf(".%#08x.\n", 0); printf(".%#8x.\n", 0); printf(".%#-8x.\n", 0);
printf(".%#08x.\n", 1); printf(".%#8x.\n", 1); printf(".%#-8x.\n", 1);
printf(".%#08x.\n", 0x123456); printf(".%#8x.\n", 0x123456); printf(".%#-8x.\n", 0x123456);
printf(".%#02x.\n", 0); printf(".%#2x.\n", 0); printf(".%#-2x.\n", 0);
printf(".%#02x.\n", 1); printf(".%#2x.\n", 1); printf(".%#-2x.\n", 1);
looks just like glibc:
.00000000. . 0. .0 . .0x000001. . 0x1. .0x1 . .0x123456. .0x123456. .0x123456. .00. . 0. .0 . .0x1. .0x1. .0x1.
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
show more ...
|
#
8ef44442 |
| 17-May-2017 |
Radim Krčmář <rkrcmar@redhat.com> |
libcflat: fix padding in printf
A simple test:
printf(".%8p.\n", (void *)0); printf(".%-8p.\n", (void *)0); printf(".%8p.\n", (void *)1); printf(".%-8p.\n", (void *)1); printf(".%8p.\n"
libcflat: fix padding in printf
A simple test:
printf(".%8p.\n", (void *)0); printf(".%-8p.\n", (void *)0); printf(".%8p.\n", (void *)1); printf(".%-8p.\n", (void *)1); printf(".%8p.\n", (void *)0x123456); printf(".%-8p.\n", (void *)0x123456);
printf(".%2p.\n", (void *)0); printf(".%-2p.\n", (void *)0); printf(".%2p.\n", (void *)1); printf(".%-2p.\n", (void *)1);
glibc:
. (nil). .(nil) . . 0x1. .0x1 . .0x123456. .0x123456. .(nil). .(nil). .0x1. .0x1.
before patch:
. 0x 0. .0x 0 . . 0x 1. .0x 1 . . 0x 123456. .0x 123456 . .0x 0. .0x0 . .0x 1. .0x1 .
after patch:
. 0. .0 . . 0x1. .0x1 . .0x123456. .0x123456. . 0. .0 . .0x1. .0x1.
(nil) would be possible with a small change, but the standard leaves it to the implementation and 0 is acceptable, IMO.
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
show more ...
|
#
cda042ca |
| 12-May-2017 |
Paolo Bonzini <pbonzini@redhat.com> |
libcflat: add support for %zd and %td
These are useful to avoid warnings from the compiler.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
|
#
12bea6f2 |
| 21-Apr-2017 |
Peter Feiner <pfeiner@google.com> |
lib: fix *printf return value
Was returning the number of characters printed plus, incorrectly, one for the null terminator.
Signed-off-by: Peter Feiner <pfeiner@google.com> Signed-off-by: David Ma
lib: fix *printf return value
Was returning the number of characters printed plus, incorrectly, one for the null terminator.
Signed-off-by: Peter Feiner <pfeiner@google.com> Signed-off-by: David Matlack <dmatlack@google.com> Message-Id: <20170421005004.137260-21-dmatlack@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
840375e1 |
| 21-Apr-2017 |
Peter Feiner <pfeiner@google.com> |
x86: binstr utility function
Signed-off-by: Peter Feiner <pfeiner@google.com> Signed-off-by: David Matlack <dmatlack@google.com> Message-Id: <20170421005004.137260-16-dmatlack@google.com> Signed-off
x86: binstr utility function
Signed-off-by: Peter Feiner <pfeiner@google.com> Signed-off-by: David Matlack <dmatlack@google.com> Message-Id: <20170421005004.137260-16-dmatlack@google.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 ...
|
#
f1df8658 |
| 29-Feb-2016 |
Paolo Bonzini <pbonzini@redhat.com> |
Merge branch 'ppc64/initial-drop-v7' of https://github.com/rhdrjones/kvm-unit-tests into HEAD
This series brings basic setup; starts a test's C entry point, main(), and printf, exit, and malloc work
Merge branch 'ppc64/initial-drop-v7' of https://github.com/rhdrjones/kvm-unit-tests into HEAD
This series brings basic setup; starts a test's C entry point, main(), and printf, exit, and malloc work. Three more series should follow this one which must bring; vector support, mmu support, and smp support, at which point I believe the framework could just evolve with the creation of unit tests.
Tested on TCG and a P8 kvm_pr machine, and Laurent has tested it on both a PowerMac G5 (kvm_pr) and a kvm_hv machine. I'm looking forward to hearing more testing feedback from others though.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
cb12eccc |
| 17-Feb-2016 |
Andrew Jones <drjones@redhat.com> |
lib: add vprintf
va_report_xfail has the pattern
char buf[] vsnprintf(buf, ...) puts(buf)
Before adding another one, replace it with vprintf.
Suggested-by: David Gibson <david@gibson.dropbear.
lib: add vprintf
va_report_xfail has the pattern
char buf[] vsnprintf(buf, ...) puts(buf)
Before adding another one, replace it with vprintf.
Suggested-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Andrew Jones <drjones@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
3a08f439 |
| 06-Nov-2015 |
Alex Bennée <alex.bennee@linaro.org> |
lib/printf: support the %u unsigned fmt field
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Andrew Jones <drjones@redhat.com> Message-Id: <1446769483-21586-12-git-send-email-drjo
lib/printf: support the %u unsigned fmt field
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Andrew Jones <drjones@redhat.com> Message-Id: <1446769483-21586-12-git-send-email-drjones@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
2c978d9b |
| 11-Jun-2014 |
Andrew Jones <drjones@redhat.com> |
printf: support field padding
Support format flags for field padding, such as "%08x", allowing register dumps to be easier on the eyes.
Signed-off-by: Andrew Jones <drjones@redhat.com> Reviewed-by:
printf: support field padding
Support format flags for field padding, such as "%08x", allowing register dumps to be easier on the eyes.
Signed-off-by: Andrew Jones <drjones@redhat.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
3d7d5195 |
| 03-Apr-2013 |
Michael S. Tsirkin <mst@redhat.com> |
kvm-unittest: add printf %c support
Handy for printing debug strings from hardware.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Gleb Natapov <gleb@redhat.com>
|
#
7d36db35 |
| 03-Aug-2010 |
Avi Kivity <avi@redhat.com> |
Initial commit from qemu-kvm.git kvm/test/
Signed-off-by: Avi Kivity <avi@redhat.com>
|