diff options
author | Cyril Bur <cyril.bur@au1.ibm.com> | 2017-12-05 12:01:13 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-12-18 17:58:32 -0600 |
commit | b9774c47eecd0c90e503919432ec1e4a86355398 (patch) | |
tree | fcd3840bc3570c1364093db423692b15964677cc /include | |
parent | 31f2c03b0abd43f3dadcecd6c00159ed52938081 (diff) | |
download | skiboot-b9774c47eecd0c90e503919432ec1e4a86355398.zip skiboot-b9774c47eecd0c90e503919432ec1e4a86355398.tar.gz skiboot-b9774c47eecd0c90e503919432ec1e4a86355398.tar.bz2 |
libflash/test: Add tests for mbox-flash
A first basic set of tests for mbox-flash. These tests do their testing
by stubbing out or otherwise replacing functions not in
libflash/mbox-flash.c. The stubbed out version of the function can then
be used to emulate a BMC mbox daemon talking to back to the code in
mbox-flash and it can ensure that there is some adherence to the
protocol and that from a blocklevel api point of view the world appears
sane.
This makes these tests simple to run and they have been integrated into
`make check`. The down side is that these tests rely on duplicated
feature incomplete BMC daemon behaviour. Therefore these tests are a
strong indicator of broken behaviour but a very unreliable indicator of
correctness.
Full integration tests with a 'real' BMC daemon are probably beyond the
scope of this repository.
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
[stewart: fix TESTS_LOOPS printf]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/skiboot.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/skiboot.h b/include/skiboot.h index 03b82a8..d7aeb27 100644 --- a/include/skiboot.h +++ b/include/skiboot.h @@ -146,6 +146,7 @@ extern unsigned int pcie_max_link_speed; /* Convert a 4-bit number to a hex char */ extern char __attrconst tohex(uint8_t nibble); +#ifndef __TEST__ /* Bit position of the most significant 1-bit (LSB=0, MSB=63) */ static inline int ilog2(unsigned long val) { @@ -160,6 +161,7 @@ static inline bool is_pow2(unsigned long val) { return val == (1ul << ilog2(val)); } +#endif #define lo32(x) ((x) & 0xffffffff) #define hi32(x) (((x) >> 32) & 0xffffffff) |