Skip to contentSkip to conversation

Sending small fix for NPCM GMAC test to properly test on Nuvoton 7xx

PATCH Superseded Nabih Estefan 3 participants 4 messages Feb 6, 2024 – Feb 8, 2024 Arm/Amlogic Meson SoC support

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover Sending small fix for NPCM GMAC test to properly test on Nuvoton 7xx

Nabih Estefan (1):
tests/qtest: Fixing GMAC test to run in 7xx

 tests/qtest/meson.build      |  4 ++--
 tests/qtest/npcm_gmac-test.c | 12 ++----------
 2 files changed, 4 insertions(+), 12 deletions(-)
Signature · 1 line
2.43.0.594.gd9cf4e227d-goog
#1 lore raw

PATCH 1/1 tests/qtest: Fixing GMAC test to run in 7xx

Fixing the nocm_gmac-test.c file to run on a nuvoton 7xx machine instead of 8xx. Also fixing comments referencing this and values expecting 8xx.

Change-Id I07b91e8be473e6a1ece65a2202608b52ed4025b8
---
 tests/qtest/meson.build      |  4 ++--
 tests/qtest/npcm_gmac-test.c | 12 ++----------
 2 files changed, 4 insertions(+), 12 deletions(-)
tests/qtest/meson.build +2 -2
index 39557d5ecb..2b89e8634b 100644
@@ -192,7 +192,8 @@ qtests_npcm7xx = \
    'npcm7xx_sdhci-test',
    'npcm7xx_smbus-test',
    'npcm7xx_timer-test',
-   'npcm7xx_watchdog_timer-test'] + \
+   'npcm7xx_watchdog_timer-test',
+   'npcm_gmac-test'] + \
    (slirp.found() ? ['npcm7xx_emc-test'] : [])
 qtests_aspeed = \
   ['aspeed_hace-test',
@@ -231,7 +232,6 @@ qtests_aarch64 = \
   (config_all_devices.has_key('CONFIG_RASPI') ? ['bcm2835-dma-test'] : []) +  \
   (config_all_accel.has_key('CONFIG_TCG') and                                            \
    config_all_devices.has_key('CONFIG_TPM_TIS_I2C') ? ['tpm-tis-i2c-test'] : []) + \
-  (config_all_devices.has_key('CONFIG_NPCM7XX') ? qtests_npcm7xx : []) + \
   ['arm-cpu-features',
    'numa-test',
    'boot-serial-test',
tests/qtest/npcm_gmac-test.c +2 -10
index 9e58b15ca1..0d1bc8107b 100644
@@ -36,7 +36,7 @@ typedef struct TestData {
     const GMACModule *module;
 } TestData;
 
-/* Values extracted from hw/arm/npcm8xx.c */
+/* Values extracted from hw/arm/npcm7xx.c */
 static const GMACModule gmac_module_list[] = {
     {
         .irq        = 14,
@@ -46,14 +46,6 @@ static const GMACModule gmac_module_list[] = {
         .irq        = 15,
         .base_addr  = 0xf0804000
     },
-    {
-        .irq        = 16,
-        .base_addr  = 0xf0806000
-    },
-    {
-        .irq        = 17,
-        .base_addr  = 0xf0808000
-    }
 };
 
 /* Returns the index of the GMAC module. */
@@ -196,7 +188,7 @@ static void test_init(gconstpointer test_data)
 {
     const TestData *td = test_data;
     const GMACModule *mod = td->module;
-    QTestState *qts = qtest_init("-machine npcm845-evb");
+    QTestState *qts = qtest_init("-machine npcm750-evb");
 
 #define CHECK_REG32(regno, value) \
     do { \
Signature · 1 line
2.43.0.594.gd9cf4e227d-goog
Reviewed-by on v1 1/1
#2 lore raw

RE: [PATCH 1/1] tests/qtest: Fixing GMAC test to run in 7xx

-----Original Message-----
From: Nabih Estefan <[email protected]>
Sent: Wednesday, February 7, 2024 7:24 AM
To: [email protected]
Cc: [email protected]; [email protected]; CS20 KFTing <[email protected]>; [email protected]; [email protected]; IS20 Avi Fishman <[email protected]>; [email protected]; CS20 KWLiu <[email protected]>; IS20 Tomer Maimon <[email protected]>; IN20 Hila Miranda-Kuzi <[email protected]>
Subject: [PATCH 1/1] tests/qtest: Fixing GMAC test to run in 7xx

CAUTION - External Email: Do not click links or open attachments unless you acknowledge the sender and content.

Fixing the nocm_gmac-test.c file to run on a nuvoton 7xx machine instead of 8xx. Also fixing comments referencing this and values expecting 8xx.

Change-Id I07b91e8be473e6a1ece65a2202608b52ed4025b8
---
 tests/qtest/meson.build      |  4 ++--
 tests/qtest/npcm_gmac-test.c | 12 ++----------
 2 files changed, 4 insertions(+), 12 deletions(-)
tests/qtest/meson.build +2 -2
@@ -192,7 +192,8 @@ qtests_npcm7xx = \
    'npcm7xx_sdhci-test',
    'npcm7xx_smbus-test',
    'npcm7xx_timer-test',
-   'npcm7xx_watchdog_timer-test'] + \
+   'npcm7xx_watchdog_timer-test',
+   'npcm_gmac-test'] + \
    (slirp.found() ? ['npcm7xx_emc-test'] : [])  qtests_aspeed = \
   ['aspeed_hace-test',
@@ -231,7 +232,6 @@ qtests_aarch64 = \
   (config_all_devices.has_key('CONFIG_RASPI') ? ['bcm2835-dma-test'] : []) +  \
   (config_all_accel.has_key('CONFIG_TCG') and                                            \
    config_all_devices.has_key('CONFIG_TPM_TIS_I2C') ? ['tpm-tis-i2c-test'] : []) + \
-  (config_all_devices.has_key('CONFIG_NPCM7XX') ? qtests_npcm7xx : []) + \
   ['arm-cpu-features',
    'numa-test',
    'boot-serial-test',
tests/qtest/npcm_gmac-test.c +1 -9
@@ -36,7 +36,7 @@ typedef struct TestData {
     const GMACModule *module;
 } TestData;
 
-/* Values extracted from hw/arm/npcm8xx.c */
+/* Values extracted from hw/arm/npcm7xx.c */
 static const GMACModule gmac_module_list[] = {
     {
         .irq        = 14,
@@ -46,14 +46,6 @@ static const GMACModule gmac_module_list[] = {
         .irq        = 15,
         .base_addr  = 0xf0804000
     },
-    {
-        .irq        = 16,
-        .base_addr  = 0xf0806000
-    },
-    {
-        .irq        = 17,
-        .base_addr  = 0xf0808000
-    }
 };
 
 /* Returns the index of the GMAC module. */ @@ -196,7 +188,7 @@ static void test_init(gconstpointer test_data)  {
     const TestData *td = test_data;
     const GMACModule *mod = td->module;

- QTestState *qts = qtest_init("-machine npcm845-evb");
+ QTestState *qts = qtest_init("-machine npcm750-evb");

 #define CHECK_REG32(regno, value) \
     do { \

--
2.43.0.594.gd9cf4e227d-goog

________________________________
________________________________
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

#3 lore raw
In reply to Nabih Estefan
Quoted 4 lines · Nabih Estefan

Nabih Estefan (1):
tests/qtest: Fixing GMAC test to run in 7xx

This fails "make check". Perhaps you forgot to configure QEMU with the arm-softmmu target enabled when doing your build and test?

=================================== 34/357 ===================================

test:         qemu:qtest+qtest-arm / qtest-arm/npcm_gmac-test
start time:   14:32:48
duration:     0.34s
result:       killed by signal 6 SIGABRT
command:      MALLOC_PERTURB_=46 QTEST_QEMU_BINARY=./qemu-system-arm

PYTHON=/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/pyvenv/bin/python3 QTEST_QEMU_IMG=./qemu-img QTEST_QEMU_STORAGE_DAEMON_BINARY=./storage-daemon/qemu-storage-daemon G_TEST_DBUS_DAEMON=/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/tests/dbus-vmstate-daemon.sh /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/tests/qtest/npcm_gmac-test --tap -k
----------------------------------- stdout -----------------------------------

# random seed: R02S12ecd459925511b522511dd789dfb6d8
1..2
# Start of arm tests
# Start of npcm7xx_gmac tests
# Start of gmac[0] tests
# starting QEMU: exec ./qemu-system-arm -qtest
unix:/tmp/qtest-797739.sock -qtest-log /dev/null -chardev
socket,path=/tmp/qtest-797739.qmp,id=char0 -mon
chardev=char0,mode=control -display none -audio none -machine
npcm750-evb -accel qtest
Bail out! ERROR:../../tests/qtest/npcm_gmac-test.c:254:test_init:
assertion failed (pcs_read(qts, mod, (NPCM_PCS_SR_CTL_ID1)) ==
(0x699e)): (0x00000000 == 0x0000699e)
----------------------------------- stderr -----------------------------------
**
ERROR:../../tests/qtest/npcm_gmac-test.c:254:test_init: assertion
failed (pcs_read(qts, mod, (NPCM_PCS_SR_CTL_ID1)) == (0x699e)):
(0x00000000 == 0x0000699e)

(test program exited with status code -6)
==============================================================================

-- PMM