18c2ecf20Sopenharmony_ciThis directory contains a mix of tests integrated with kselftest and
28c2ecf20Sopenharmony_cistandalone stress tests.
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_cikselftest tests
58c2ecf20Sopenharmony_ci===============
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_cisve-probe-vls - Checks the SVE vector length enumeration interface
88c2ecf20Sopenharmony_cisve-ptrace - Checks the SVE ptrace interface
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ciRunning the non-kselftest tests
118c2ecf20Sopenharmony_ci===============================
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_cisve-stress performs an SVE context switch stress test, as described
148c2ecf20Sopenharmony_cibelow.
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci(The fpsimd-stress test works the same way; just substitute "fpsimd" for
178c2ecf20Sopenharmony_ci"sve" in the following commands.)
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ciThe test runs until killed by the user.
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ciIf no context switch error was detected, you will see output such as
238c2ecf20Sopenharmony_cithe following:
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci$ ./sve-stress
268c2ecf20Sopenharmony_ci(wait for some time)
278c2ecf20Sopenharmony_ci^C
288c2ecf20Sopenharmony_ciVector length:        512 bits
298c2ecf20Sopenharmony_ciPID:    1573
308c2ecf20Sopenharmony_ciTerminated by signal 15, no error, iterations=9467, signals=1014
318c2ecf20Sopenharmony_ciVector length:  512 bits
328c2ecf20Sopenharmony_ciPID:    1575
338c2ecf20Sopenharmony_ciTerminated by signal 15, no error, iterations=9448, signals=1028
348c2ecf20Sopenharmony_ciVector length:  512 bits
358c2ecf20Sopenharmony_ciPID:    1577
368c2ecf20Sopenharmony_ciTerminated by signal 15, no error, iterations=9436, signals=1039
378c2ecf20Sopenharmony_ciVector length:  512 bits
388c2ecf20Sopenharmony_ciPID:    1579
398c2ecf20Sopenharmony_ciTerminated by signal 15, no error, iterations=9421, signals=1039
408c2ecf20Sopenharmony_ciVector length:  512 bits
418c2ecf20Sopenharmony_ciPID:    1581
428c2ecf20Sopenharmony_ciTerminated by signal 15, no error, iterations=9403, signals=1039
438c2ecf20Sopenharmony_ciVector length:  512 bits
448c2ecf20Sopenharmony_ciPID:    1583
458c2ecf20Sopenharmony_ciTerminated by signal 15, no error, iterations=9385, signals=1036
468c2ecf20Sopenharmony_ciVector length:  512 bits
478c2ecf20Sopenharmony_ciPID:    1585
488c2ecf20Sopenharmony_ciTerminated by signal 15, no error, iterations=9376, signals=1039
498c2ecf20Sopenharmony_ciVector length:  512 bits
508c2ecf20Sopenharmony_ciPID:    1587
518c2ecf20Sopenharmony_ciTerminated by signal 15, no error, iterations=9361, signals=1039
528c2ecf20Sopenharmony_ciVector length:  512 bits
538c2ecf20Sopenharmony_ciPID:    1589
548c2ecf20Sopenharmony_ciTerminated by signal 15, no error, iterations=9350, signals=1039
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ciIf an error was detected, details of the mismatch will be printed
588c2ecf20Sopenharmony_ciinstead of "no error".
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ciIdeally, the test should be allowed to run for many minutes or hours
618c2ecf20Sopenharmony_cito maximise test coverage.
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ciKVM stress testing
658c2ecf20Sopenharmony_ci==================
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ciTo try to reproduce the bugs that we have been observing, sve-stress
688c2ecf20Sopenharmony_cishould be run in parallel in two KVM guests, while simultaneously
698c2ecf20Sopenharmony_cirunning on the host.
708c2ecf20Sopenharmony_ci
718c2ecf20Sopenharmony_ci1) Start 2 guests, using the following command for each:
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_ci$ lkvm run --console=virtio -pconsole=hvc0 --sve Image
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ci(Depending on the hardware GIC implementation, you may also need
768c2ecf20Sopenharmony_ci--irqchip=gicv3.  New kvmtool defaults to that if appropriate, but I
778c2ecf20Sopenharmony_cican't remember whether my branch is new enough for that.  Try without
788c2ecf20Sopenharmony_cithe option first.)
798c2ecf20Sopenharmony_ci
808c2ecf20Sopenharmony_ciKvmtool occupies the terminal until you kill it (Ctrl+A x),
818c2ecf20Sopenharmony_cior until the guest terminates.  It is therefore recommended to run
828c2ecf20Sopenharmony_cieach instance in separate terminal (use screen or ssh etc.)  This
838c2ecf20Sopenharmony_ciallows multiple guests to be run in parallel while running other
848c2ecf20Sopenharmony_cicommands on the host.
858c2ecf20Sopenharmony_ci
868c2ecf20Sopenharmony_ciWithin the guest, the host filesystem is accessible, mounted on /host.
878c2ecf20Sopenharmony_ci
888c2ecf20Sopenharmony_ci2) Run the sve-stress on *each* guest with the Vector-Length set to 32:
898c2ecf20Sopenharmony_ciguest$ ./vlset --inherit 32 ./sve-stress
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ci3) Run the sve-stress on the host with the maximum Vector-Length:
928c2ecf20Sopenharmony_cihost$ ./vlset --inherit --max ./sve-stress
938c2ecf20Sopenharmony_ci
948c2ecf20Sopenharmony_ci
958c2ecf20Sopenharmony_ciAgain, the test should be allowed to run for many minutes or hours to
968c2ecf20Sopenharmony_cimaximise test coverage.
978c2ecf20Sopenharmony_ci
988c2ecf20Sopenharmony_ciIf no error is detected, you will see output from each sve-stress
998c2ecf20Sopenharmony_ciinstance similar to that illustrated above; otherwise details of the
1008c2ecf20Sopenharmony_ciobserved mismatches will be printed.
101