Files
Hmkz0x00 7b36e6b39e CLI: Build file URLs with as_uri instead of by hand
populate_config prefixed "file://" onto the result of pathname2url, which
already returns a leading "///" on Windows. Three slashes plus two gives
file://///C:/..., an empty authority that urlopen reads as a UNC path, so
every URIRequirement failed there before the file was ever opened. That
covers --single-location, --yara-file, --yara-compiled-file, --strings-file,
--isf and volshell's --script.

pathlib's as_uri produces the same string as the current code on POSIX for
every supported Python version, and the correct one on Windows, including
for UNC paths. It also sidesteps the Python 3.14 rewrite of pathname2url,
which gives POSIX the same leading "///" that Windows always returned.

The two other places in the codebase that build file URLs,
URIRequirement.location_from_file and volshell's run_script, were already
correct; this was the only one assembling the scheme by hand.
2026-08-03 21:32:18 +05:30
..
2025-03-12 16:09:13 +01:00
2022-07-21 05:49:51 +09:00
2024-11-08 14:03:08 +01:00

Volatility 3 Testing Framework

Requirements

The Volatility 3 Testing Framework requires the same version of Python as Volatility 3 itself. To install the current set of dependencies that the framework requires, use a command like this:

pip3 install -e .[test]

Quick Start: Manual Testing

  1. To test Volatility 3 on an image, first download one with a command such as:
curl -sLO "https://downloads.volatilityfoundation.org/volatility3/images/win-xp-laptop-2005-06-25.img.gz"
gunzip win-xp-laptop-2005-06-25.img.gz
  1. In many cases, more symbols are required to be downloaded to the ./volatility3/symbols directory.

  2. To manually run the tests, run a command, such as:

py.test ./test/test_volatility.py --volatility=vol.py --image win-xp-laptop-2005-06-25.img -k test_windows

The above command runs all available tests for windows on the win-xp-laptop-2005-06-25.img image. To choose a more specific set of tests, change the phrase after -k in this command.

Github Actions

This framework currently tests two images (one linux image and one windows image) after every push on any branch. For more information/context, find the actions setup in ./github/workflows/test.yaml