mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-22 02:12:16 +00:00
test(profiles): allow group-writable source checkouts
Check executable bits when selecting source profiles. Exact package modes remain covered by the native payload test.
This commit is contained in:
@@ -87,9 +87,9 @@ for my $case (@cases) {
|
||||
: xCAT::SvrUtils::get_file_name($base, $extension, $profile, "$os.2", $arch);
|
||||
is($selected, "$base/$name", 'retains the public profile filename');
|
||||
ok(defined($selected) && -r $selected, 'selected asset is readable') or return;
|
||||
is(sprintf('%04o', S_IMODE((stat($selected))[2])),
|
||||
$extension eq 'postinstall' ? '0755' : '0644',
|
||||
'retains the asset permissions');
|
||||
is(sprintf('%03o', S_IMODE((stat($selected))[2]) & oct('111')),
|
||||
$extension eq 'postinstall' ? '111' : '000',
|
||||
'only postinstall assets are executable');
|
||||
my $original = read_binary($selected);
|
||||
my $custom = "$work/$name";
|
||||
copy($selected, $custom) or die "copy $selected: $!";
|
||||
|
||||
Reference in New Issue
Block a user