On 26/06/29 01:18PM, Cédric Le Goater wrote:
> On 6/29/26 13:04, Aditya Gupta wrote:
> > <...snip...>
> > --- a/tests/qtest/pnv-host-i2c-test.c
> > +++ b/tests/qtest/pnv-host-i2c-test.c
> > @@ -402,15 +402,14 @@ static void reset_all(QTestState *qts, const PnvChip
> > *chip)
> > static void test_host_i2c(const void *data)
> > {
> > const PnvChip *chip = data;
> > + const char *machine = pnv_get_machine_type(chip->chip_type);
> > QTestState *qts;
> > - const char *machine = "powernv8";
> > PnvI2cCtlr ctlr;
> > PnvI2cDev pca9552;
> > PnvI2cDev pca9554;
> > - if (chip->chip_type == PNV_CHIP_POWER9) {
> > - machine = "powernv9";
> > - } else if (chip->chip_type == PNV_CHIP_POWER10) {
> > + /* i2c is initialised for rainier in case of P10 */
> > + if (chip->chip_type == PNV_CHIP_POWER10) {
> > machine = "powernv10-rainier";
>
> Is that true for all tests ? in that case, pnv_get_machine_type()
> could return "powernv10-rainier".
>
No this i2c test is the only test which specifically requires rainier,
other tests like pnv-spi-seeprom-test and pnv-xscom-test.
> > <...snip...>
> >
> > diff --git a/tests/qtest/pnv-xscom.h b/tests/qtest/pnv-xscom.h
> > index 5aa1701ea768..eefe206a2007 100644
> > --- a/tests/qtest/pnv-xscom.h
> > +++ b/tests/qtest/pnv-xscom.h
> > @@ -9,6 +9,9 @@
> > #ifndef PNV_XSCOM_H
> > #define PNV_XSCOM_H
> > +#include <stdint.h>
> > +#include <assert.h>
>
>
> Seems unrelated. Why do you need these includes ?
Not really cedric, i had added stdint.h since PnvChip used uint64_t, and
assert.h since i used assert in v1 & v2, which is not the case now.
I can remove these in v4.
Thanks for the reviews Cedric !
>
> Thanks,
>
> C.