Skip to content
Brice Dobry edited this page Sep 3, 2020 · 1 revision

This page lists the latest test results for this repository's main branch, riscv64. The statistics are presented in the following format:

  • Test stats are listed as +passed/-failed (e.g., +1000/-2)
  • Run-rate is the percentage of total tests run (including both passed and failed tests), less than 100% run-rate means that some tests are skipped by the test driver (e.g., runs too long, or known failures that are being investigated). Skipped tests can be found in .status files.

Running on HiFive Unleashed board

HiFive Unleashed board details:

Parameter
SoC SiFive Freedom U540 SoC
Memory 8GB DDR4 with ECC
OS Version Fedora Developer Rawhide [Fedora-Developer-Rawhide-20200108.n.0]

NodeJS test suite

Test Suite Pass/Fail(Run-Rate) Notes
all

Running on QEMU

Running on QEMU 5.0.0 with Fedora developer 20191123.

NodeJS test suite

Test Suite Pass/Fail(Run-Rate) Notes
all +2917/-28(100%)

How to Run Tests

Run on QEMU

Download QEMU

Clone QEMU:

git clone [email protected]:qemu/qemu.git
cd qemu
git checkout v5.0.0

Install Prerequisites

sudo apt-get install libglib2.0-dev libpixman-1-dev

Build QEMU for riscv64

./configure --target-list=riscv64-softmmu && make -j 4
sudo make install # Optional

Download Fedora and U-Boot Images

From https://dl.fedoraproject.org/pub/alt/risc-v/repo/virt-builder-images/images/, download Fedora-Developer-Rawhide-*.raw.xz as well as the matching Fedora-Developer-Rawhide-*-fw_payload-uboot-qemu-virt-smode.elf:

wget https://dl.fedoraproject.org/pub/alt/risc-v/repo/virt-builder-images/images/Fedora-Developer-Rawhide-20191123.n.0-sda.raw.xz

unxz -k Fedora-Developer-Rawhide-20191123.n.0-sda.raw.xz

wget https://dl.fedoraproject.org/pub/alt/risc-v/repo/virt-builder-images/images/Fedora-Developer-Rawhide-20191123.n.0-fw_payload-uboot-qemu-virt-smode.elf

Run QEMU

In the command below, VER is the version number from the files you downloaded above, for example, 20191123.n.0.

Let FEDORA_IMAGE_DIR be the directory that contains Fedora-Developer-Rawhide-20191123.n.0-fw_payload-uboot-qemu-virt-smode.elf and Fedora-Developer-Rawhide-20191123.n.0-sda.raw (downloaded by following the previous step).

cd <FEDORA_IMAGE_DIR>
export VER=20191123.n.0
qemu-system-riscv64 \
  -nographic \
  -machine virt \
  -smp 4 \
  -m 2G \
  -kernel Fedora-Developer-Rawhide-${VER}-fw_payload-uboot-qemu-virt-smode.elf \
  -object rng-random,filename=/dev/urandom,id=rng0 \
  -device virtio-rng-device,rng=rng0 \
  -device virtio-blk-device,drive=hd0 \
  -drive file=Fedora-Developer-Rawhide-${VER}-sda.raw,format=raw,id=hd0 \
  -device virtio-net-device,netdev=usernet \
  -netdev user,id=usernet,hostfwd=tcp::3333-:22

Once qemu is brought up, you will see the following prompt:

Welcome to the Fedora/RISC-V disk image
https://fedoraproject.org/wiki/Architectures/RISC-V

Build date: Sat Nov 23 12:47:19 UTC 2019

Kernel 5.4.0-0.rc7.git0.1.1.riscv64.fc32.riscv64 on an riscv64 (ttyS0)

The root password is 'fedora_rocks!'.
root password logins are disabled in SSH starting Fedora 31.
User 'riscv' with password 'fedora_rocks!' in 'wheel' group is provided.

To install new packages use 'dnf install ...'

To upgrade disk image use 'dnf upgrade --best'

If DNS isn’t working, try editing ‘/etc/yum.repos.d/fedora-riscv.repo’.

For updates and latest information read:
https://fedoraproject.org/wiki/Architectures/RISC-V

Fedora/RISC-V
-------------
Koji:               http://fedora.riscv.rocks/koji/
SCM:                http://fedora.riscv.rocks:3000/
Distribution rep.:  http://fedora.riscv.rocks/repos-dist/
Koji internal rep.: http://fedora.riscv.rocks/repos/
fedora-riscv login: 

The default root password for this image is fedora_rocks!.

Copy Files to QEMU

Inside the QEMU console, you'll need to enable root login over ssh with password. Add the following line to /etc/ssh/sshd_config:

PermitRootLogin=yes

Then restart the ssh server:

[root@fedora-riscv ~]# systemctl restart sshd.service

Now, you can use scp from a regular terminal on the same machine (not the qemu terminal) to copy files to the emulated machine. Note that the SSH port of the machine is mapped to 3333.

[joesmith@your-local-terminal] scp -P 3333 node/test node/tools node/out root@localhost:~/.

Run Node Tests on QEMU

Now, you are ready to run node inside the qemu console:

[root@fedora-riscv ~]# out/Release/node
Welcome to Node.js v14.8.0.
Type ".help" for more information.
> console.log("Hello, world!");
Hello, world!
undefined
>

Run the tests using the provided script:

[root@fedora-riscv ~]# python tools/test.py -J --mode=release

For more info about Fedora on RISC-V, please visit https://fedoraproject.org/wiki/Architectures/RISC-V/Installing

Clone this wiki locally