[llvm-ar] Add more tests for errors in opening archives
authorSameer Arora <sameerarora101@fb.com>
Fri, 5 Jun 2020 17:29:18 +0000 (10:29 -0700)
committerShoaib Meenai <smeenai@fb.com>
Fri, 5 Jun 2020 17:36:58 +0000 (10:36 -0700)
commit399b12700b41cd58484c23639e61cace819229f6
tree375f88eac8f60b7c5ea4bbf1315c19e59069bfc2
parentb56bf30d3cc15896956061fdbeb6d078b63ec91f
[llvm-ar] Add more tests for errors in opening archives

Add 2 more tests for the function performOperation under llvm-ar.cpp. It
tests the scenario when the archive could not be opened for reasons
other than `no_such_file_or_directory` In particular, it tests for the
cases `permission_denied` and `is_a_directory` for the target archive.

Reviewed By: alexshap, jhenderson, smeenai, MaskRay

Differential Revision: https://reviews.llvm.org/D80838
llvm/test/tools/llvm-ar/error-opening-directory.test [new file with mode: 0644]
llvm/test/tools/llvm-ar/error-opening-permission.test [new file with mode: 0644]