When using the collect utility and where the user provides a bundle
name with --name that is 236 characters or longer:
An inappropriate error "no space left on device" is reported;
An "operation timeout" error is reported when name length exceeds 239
On a standalone system, the Error reported is:
"refusing to creating empty <name>.tar file".
This update validates the name length and fixes the inappropriate Error
indicating the maximum allowed length for the bundle name.
Test Plan:
Verify collector package build with iso build in CentOS
Verify log name within limit is accepted and collect bundle is created
Verify name length 1 over max-length fails
Verify log name is rejected with the error code 55 with name_length 236
Verify log name is rejected with the error code 55 with name_length 240
Verify log name is rejected with the error code 55 without timeout error
Verify boundary condition with name length equal to max-length succeeds
Regression:
Verify named collect bundle tar under scratch with name length under 236
Signed-off-by: Girish Subramanya <girish.subramanya@windriver.com>
Closes-Bug:1990533
Change-Id: Iee8f918e19ed431a19209e19dc73fc28b9624027