Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dsc_script spec failure on 64-bit Ruby #3797

Merged
merged 1 commit into from
Aug 21, 2015
Merged

Fix dsc_script spec failure on 64-bit Ruby #3797

merged 1 commit into from
Aug 21, 2015

Conversation

chefsalim
Copy link
Contributor

dsc_script_spec.rb currently fails under 64-bit Ruby. The fix here is to make sure we ensure that the node architecture for the test is always set to 64-bit (since dsc is not supported on 32-bit Windows).

@adamedx @jaym

@jaym
Copy link
Contributor

jaym commented Aug 19, 2015

👍

@@ -67,8 +67,7 @@ def delete_user(target_user)
node = Chef::Node.new
node.automatic['platform'] = 'windows'
node.automatic['platform_version'] = '6.1'
node.automatic['kernel'][:machine] =
is_i386_process_on_x86_64_windows? ? :x86_64 : :i386
node.automatic['kernel'][:machine] = :x86_64 # Only 64-bit process is supported
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So isn't the key here that we only support running these specs on a 64-bit OS vs. a 64-bit process? The specs themselves have always been 32-bit to this point, but Chef (also 32-bit) shells out to 64-bit).

My note here is only about the comment, basically I think it's more accurate to say 64-bit OS instead of 64-bit process. Does that seem reasonable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The failure case was under a 64-bit OS - we would specify a i386
architecture if NOT running as a 32-bit process under a 64-bit OS. When we
ran under 32-bit, that was as a 64-bit process as you indicate. So I think
process is correct. Maybe we can say "64-bit architecture" instead?

On Thu, Aug 20, 2015 at 9:16 AM, Adam Edwards notifications@github.com
wrote:

In spec/functional/resource/dsc_script_spec.rb
#3797 (comment):

@@ -67,8 +67,7 @@ def delete_user(target_user)
node = Chef::Node.new
node.automatic['platform'] = 'windows'
node.automatic['platform_version'] = '6.1'

  • node.automatic['kernel'][:machine] =
  •  is_i386_process_on_x86_64_windows? ? :x86_64 : :i386
    
  • node.automatic['kernel'][:machine] = :x86_64 # Only 64-bit process is supported

So isn't the key here that we only support running these specs on a 64-bit
OS vs. a 64-bit process? The specs themselves have always been 32-bit to
this point, but Chef (also 32-bit) shells out to 64-bit).

My note here is only about the comment, basically I think it's more
accurate to say 64-bit OS instead of 64-bit process. Does that seem
reasonable?


Reply to this email directly or view it on GitHub
https://github.com/chef/chef/pull/3797/files#r37549239.

@chefsalim
Copy link
Contributor Author

Updated comment to say 'architecture'

@adamedx
Copy link
Contributor

adamedx commented Aug 21, 2015

The existential questions of 64-bitness have been answered. 👍

chefsalim added a commit that referenced this pull request Aug 21, 2015
Fix dsc_script spec failure on 64-bit Ruby
@chefsalim chefsalim merged commit c832f38 into master Aug 21, 2015
@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants