From Fedora Project Wiki

Revision as of 04:31, 13 August 2023 by Sumantrom (talk | contribs) (Created page with "{{QA/Test_Case |description=This test case ensures the proper installation and basic functionality of the `bzip2` compression utility and its associated libraries (`bzip2-libs`). |setup= # Install a fresh version of Fedora. # Install the {{package|bzip2}} and {{package|bzip2-libs}} packages: `sudo dnf install bzip2 bzip2-libs`. |actions= # Create a text file for testing: `echo "This is a test for bzip2 compression." > ~/test.txt`. # Compress the file using `bzip2`: `bzip...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

This test case ensures the proper installation and basic functionality of the bzip2 compression utility and its associated libraries (bzip2-libs).

Setup

  1. Install a fresh version of Fedora.
  2. Install the Package-x-generic-16.pngbzip2 and Package-x-generic-16.pngbzip2-libs packages: sudo dnf install bzip2 bzip2-libs.

How to test

  1. Create a text file for testing: echo "This is a test for bzip2 compression." > ~/test.txt.
  2. Compress the file using bzip2: bzip2 ~/test.txt. This should create a file named test.txt.bz2.
  3. Decompress the file using bunzip2: bunzip2 ~/test.txt.bz2.
  4. Check the contents of the decompressed file: cat ~/test.txt.

Expected Results

  1. After compression, the original test.txt file should no longer be present, but test.txt.bz2 should exist.
  2. After decompression, the test.txt.bz2 file should no longer be present, but test.txt should be back with the original content: "This is a test for bzip2 compression.".

Optional

For deeper testing:

  1. Try compressing and decompressing larger files to test efficiency and speed.
  2. Examine CPU and memory usage during compression of larger files.
  3. Use the bzcat command to view the content of a compressed file without decompressing it.