zig icon indicating copy to clipboard operation
zig copied to clipboard

std:tar Copy Go tar test suite and make them pass

Open ianic opened this issue 2 years ago • 0 comments

Closes #14310.

Go test cases are copied to lib/std/tar/testdata folder.

New functionality added to pass tests:

  • reading link_name from pax attribute
  • reading file size from pax attribute
  • handling sizes greater than 8GB in gnu format
  • gnu extended headers for name, link_name; L and K header types
  • calculating and checking header checksum
  • few pax attribute checks: no null in key, break value on first null, attribute ending with newline

This passes all relevant Go tests expect those connected with sparse files. Those functionality is not yet implemented. We are using this for package manager, meaning that most of the files will be source code files, pretty unlikely that we will find there tar with sparse files.

ianic avatar Dec 11 '23 21:12 ianic