Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
June 2018
- 68 participants
- 1149 messages
[PATCH 3/6] wined3d: Remove "Reserved" fields from wined3d_caps.
by Józef Kucia
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
---
include/wine/wined3d.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index d1282d72873a..0f388ab2a198 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -1944,7 +1944,6 @@ struct wined3d_caps
DWORD DevCaps2;
float MaxNpatchTessellationLevel;
- DWORD Reserved5; /* undocumented */
UINT MasterAdapterOrdinal;
UINT AdapterOrdinalInGroup;
@@ -1959,8 +1958,6 @@ struct wined3d_caps
DWORD MaxPShaderInstructionsExecuted;
DWORD MaxVertexShader30InstructionSlots;
DWORD MaxPixelShader30InstructionSlots;
- DWORD Reserved2; /* Not in the microsoft headers but documented */
- DWORD Reserved3;
struct wined3d_ddraw_caps ddraw_caps;
--
2.16.4
June 13, 2018
[PATCH 2/6] wined3d: Get rid of WINED3DCAPS typedef.
by Józef Kucia
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
---
dlls/d3d11/device.c | 2 +-
dlls/d3d8/d3d8_private.h | 2 +-
dlls/d3d8/device.c | 4 ++--
dlls/d3d8/directx.c | 2 +-
dlls/d3d9/d3d9_private.h | 2 +-
dlls/d3d9/device.c | 6 +++---
dlls/d3d9/directx.c | 2 +-
dlls/ddraw/ddraw.c | 8 ++++----
dlls/dxgi/utils.c | 2 +-
dlls/wined3d/device.c | 2 +-
dlls/wined3d/directx.c | 2 +-
include/wine/wined3d.h | 8 ++++----
12 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index e7dd62cb3cd5..e6ba31c7c4b7 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -3411,7 +3411,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFeatureSupport(ID3D11Device2
void *feature_support_data, UINT feature_support_data_size)
{
struct d3d_device *device = impl_from_ID3D11Device2(iface);
- WINED3DCAPS wined3d_caps;
+ struct wined3d_caps wined3d_caps;
HRESULT hr;
TRACE("iface %p, feature %u, feature_support_data %p, feature_support_data_size %u.\n",
diff --git a/dlls/d3d8/d3d8_private.h b/dlls/d3d8/d3d8_private.h
index 3fbc096b2546..40a0f0a38d4e 100644
--- a/dlls/d3d8/d3d8_private.h
+++ b/dlls/d3d8/d3d8_private.h
@@ -42,7 +42,7 @@
/* CreateVertexShader can return > 0xFFFF */
#define VS_HIGHESTFIXEDFXF 0xF0000000
-void d3dcaps_from_wined3dcaps(D3DCAPS8 *caps, const WINED3DCAPS *wined3d_caps) DECLSPEC_HIDDEN;
+void d3dcaps_from_wined3dcaps(D3DCAPS8 *caps, const struct wined3d_caps *wined3d_caps) DECLSPEC_HIDDEN;
struct d3d8
{
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index 616886bcafa2..f0b36ee93c20 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -321,7 +321,7 @@ static BOOL wined3d_swapchain_desc_from_present_parameters(struct wined3d_swapch
return TRUE;
}
-void d3dcaps_from_wined3dcaps(D3DCAPS8 *caps, const WINED3DCAPS *wined3d_caps)
+void d3dcaps_from_wined3dcaps(D3DCAPS8 *caps, const struct wined3d_caps *wined3d_caps)
{
caps->DeviceType = (D3DDEVTYPE)wined3d_caps->DeviceType;
caps->AdapterOrdinal = wined3d_caps->AdapterOrdinal;
@@ -671,7 +671,7 @@ static HRESULT WINAPI d3d8_device_GetDirect3D(IDirect3DDevice8 *iface, IDirect3D
static HRESULT WINAPI d3d8_device_GetDeviceCaps(IDirect3DDevice8 *iface, D3DCAPS8 *caps)
{
struct d3d8_device *device = impl_from_IDirect3DDevice8(iface);
- WINED3DCAPS wined3d_caps;
+ struct wined3d_caps wined3d_caps;
HRESULT hr;
TRACE("iface %p, caps %p.\n", iface, caps);
diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c
index 68300c0a655d..499e488b0618 100644
--- a/dlls/d3d8/directx.c
+++ b/dlls/d3d8/directx.c
@@ -324,7 +324,7 @@ static HRESULT WINAPI d3d8_CheckDepthStencilMatch(IDirect3D8 *iface, UINT adapte
static HRESULT WINAPI d3d8_GetDeviceCaps(IDirect3D8 *iface, UINT adapter, D3DDEVTYPE device_type, D3DCAPS8 *caps)
{
struct d3d8 *d3d8 = impl_from_IDirect3D8(iface);
- WINED3DCAPS wined3d_caps;
+ struct wined3d_caps wined3d_caps;
HRESULT hr;
TRACE("iface %p, adapter %u, device_type %#x, caps %p.\n", iface, adapter, device_type, caps);
diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h
index c50aabf593f0..08ea73ccddf5 100644
--- a/dlls/d3d9/d3d9_private.h
+++ b/dlls/d3d9/d3d9_private.h
@@ -58,7 +58,7 @@ enum wined3d_format_id wined3dformat_from_d3dformat(D3DFORMAT format) DECLSPEC_H
unsigned int wined3dmapflags_from_d3dmapflags(unsigned int flags) DECLSPEC_HIDDEN;
void present_parameters_from_wined3d_swapchain_desc(D3DPRESENT_PARAMETERS *present_parameters,
const struct wined3d_swapchain_desc *swapchain_desc, DWORD presentation_interval) DECLSPEC_HIDDEN;
-void d3dcaps_from_wined3dcaps(D3DCAPS9 *caps, const WINED3DCAPS *wined3d_caps) DECLSPEC_HIDDEN;
+void d3dcaps_from_wined3dcaps(D3DCAPS9 *caps, const struct wined3d_caps *wined3d_caps) DECLSPEC_HIDDEN;
struct d3d9
{
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index 5d0f5071836c..5021ec75cf79 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -347,7 +347,7 @@ static BOOL wined3d_swapchain_desc_from_present_parameters(struct wined3d_swapch
return TRUE;
}
-void d3dcaps_from_wined3dcaps(D3DCAPS9 *caps, const WINED3DCAPS *wined3d_caps)
+void d3dcaps_from_wined3dcaps(D3DCAPS9 *caps, const struct wined3d_caps *wined3d_caps)
{
static const DWORD ps_minor_version[] = {0, 4, 0, 0};
static const DWORD vs_minor_version[] = {0, 1, 0, 0};
@@ -664,7 +664,7 @@ static HRESULT WINAPI d3d9_device_GetDirect3D(IDirect3DDevice9Ex *iface, IDirect
static HRESULT WINAPI d3d9_device_GetDeviceCaps(IDirect3DDevice9Ex *iface, D3DCAPS9 *caps)
{
struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
- WINED3DCAPS wined3d_caps;
+ struct wined3d_caps wined3d_caps;
HRESULT hr;
TRACE("iface %p, caps %p.\n", iface, caps);
@@ -4218,8 +4218,8 @@ HRESULT device_init(struct d3d9_device *device, struct d3d9 *parent, struct wine
D3DPRESENT_PARAMETERS *parameters, D3DDISPLAYMODEEX *mode)
{
struct wined3d_swapchain_desc *swapchain_desc;
+ struct wined3d_caps caps;
unsigned i, count = 1;
- WINED3DCAPS caps;
HRESULT hr;
if (mode)
diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c
index 98f4a99c4943..49da816564e1 100644
--- a/dlls/d3d9/directx.c
+++ b/dlls/d3d9/directx.c
@@ -355,7 +355,7 @@ static HRESULT WINAPI d3d9_CheckDeviceFormatConversion(IDirect3D9Ex *iface, UINT
static HRESULT WINAPI d3d9_GetDeviceCaps(IDirect3D9Ex *iface, UINT adapter, D3DDEVTYPE device_type, D3DCAPS9 *caps)
{
struct d3d9 *d3d9 = impl_from_IDirect3D9Ex(iface);
- WINED3DCAPS wined3d_caps;
+ struct wined3d_caps wined3d_caps;
HRESULT hr;
TRACE("iface %p, adapter %u, device_type %#x, caps %p.\n", iface, adapter, device_type, caps);
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index 32f01722630d..e60c5f345af6 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -1244,7 +1244,7 @@ void ddraw_d3dcaps1_from_7(D3DDEVICEDESC *caps1, D3DDEVICEDESC7 *caps7)
HRESULT ddraw_get_d3dcaps(const struct ddraw *ddraw, D3DDEVICEDESC7 *caps)
{
- WINED3DCAPS wined3d_caps;
+ struct wined3d_caps wined3d_caps;
HRESULT hr;
TRACE("ddraw %p, caps %p.\n", ddraw, caps);
@@ -1454,10 +1454,10 @@ HRESULT ddraw_get_d3dcaps(const struct ddraw *ddraw, D3DDEVICEDESC7 *caps)
static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DDCAPS *HELCaps)
{
struct ddraw *ddraw = impl_from_IDirectDraw7(iface);
+ DDSCAPS2 ddscaps = {0, 0, 0, {0}};
+ struct wined3d_caps winecaps;
DDCAPS caps;
- WINED3DCAPS winecaps;
HRESULT hr;
- DDSCAPS2 ddscaps = {0, 0, 0, {0}};
TRACE("iface %p, driver_caps %p, hel_caps %p.\n", iface, DriverCaps, HELCaps);
@@ -4911,7 +4911,7 @@ static const struct wined3d_device_parent_ops ddraw_wined3d_device_parent_ops =
HRESULT ddraw_init(struct ddraw *ddraw, DWORD flags, enum wined3d_device_type device_type)
{
- WINED3DCAPS caps;
+ struct wined3d_caps caps;
HRESULT hr;
ddraw->IDirectDraw7_iface.lpVtbl = &ddraw7_vtbl;
diff --git a/dlls/dxgi/utils.c b/dlls/dxgi/utils.c
index 73c3cf2c5d62..a30528193162 100644
--- a/dlls/dxgi/utils.c
+++ b/dlls/dxgi/utils.c
@@ -641,8 +641,8 @@ D3D_FEATURE_LEVEL dxgi_check_feature_level_support(struct dxgi_factory *factory,
};
D3D_FEATURE_LEVEL selected_feature_level = 0;
unsigned int shader_model;
+ struct wined3d_caps caps;
unsigned int i, j;
- WINED3DCAPS caps;
HRESULT hr;
wined3d_mutex_lock();
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 8ef74b6ef0f1..c0f7a1fc8ee4 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3476,7 +3476,7 @@ struct wined3d_texture * CDECL wined3d_device_get_texture(const struct wined3d_d
return device->state.textures[stage];
}
-HRESULT CDECL wined3d_device_get_device_caps(const struct wined3d_device *device, WINED3DCAPS *caps)
+HRESULT CDECL wined3d_device_get_device_caps(const struct wined3d_device *device, struct wined3d_caps *caps)
{
TRACE("device %p, caps %p.\n", device, caps);
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index baab2e9c1a31..e64df4f75f75 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -5626,7 +5626,7 @@ HRESULT CDECL wined3d_check_device_type(const struct wined3d *wined3d, UINT adap
}
HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapter_idx,
- enum wined3d_device_type device_type, WINED3DCAPS *caps)
+ enum wined3d_device_type device_type, struct wined3d_caps *caps)
{
const struct wined3d_adapter *adapter = &wined3d->adapters[adapter_idx];
const struct wined3d_d3d_info *d3d_info = &adapter->d3d_info;
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 5f54826b5668..d1282d72873a 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -1874,7 +1874,7 @@ struct wined3d_ddraw_caps
DWORD dds_caps;
};
-typedef struct _WINED3DCAPS
+struct wined3d_caps
{
enum wined3d_device_type DeviceType;
UINT AdapterOrdinal;
@@ -1965,7 +1965,7 @@ typedef struct _WINED3DCAPS
struct wined3d_ddraw_caps ddraw_caps;
BOOL shader_double_precision;
-} WINED3DCAPS;
+};
struct wined3d_color_key
{
@@ -2198,7 +2198,7 @@ UINT __cdecl wined3d_get_adapter_mode_count(const struct wined3d *wined3d, UINT
HRESULT __cdecl wined3d_get_adapter_raster_status(const struct wined3d *wined3d, UINT adapter_idx,
struct wined3d_raster_status *raster_status);
HRESULT __cdecl wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapter_idx,
- enum wined3d_device_type device_type, WINED3DCAPS *caps);
+ enum wined3d_device_type device_type, struct wined3d_caps *caps);
HRESULT __cdecl wined3d_get_output_desc(const struct wined3d *wined3d, unsigned int adapter_idx,
struct wined3d_output_desc *desc);
ULONG __cdecl wined3d_incref(struct wined3d *wined3d);
@@ -2271,7 +2271,7 @@ struct wined3d_sampler * __cdecl wined3d_device_get_cs_sampler(const struct wine
struct wined3d_unordered_access_view * __cdecl wined3d_device_get_cs_uav(const struct wined3d_device *device,
unsigned int idx);
struct wined3d_rendertarget_view * __cdecl wined3d_device_get_depth_stencil_view(const struct wined3d_device *device);
-HRESULT __cdecl wined3d_device_get_device_caps(const struct wined3d_device *device, WINED3DCAPS *caps);
+HRESULT __cdecl wined3d_device_get_device_caps(const struct wined3d_device *device, struct wined3d_caps *caps);
HRESULT __cdecl wined3d_device_get_display_mode(const struct wined3d_device *device, UINT swapchain_idx,
struct wined3d_display_mode *mode, enum wined3d_display_rotation *rotation);
struct wined3d_shader * __cdecl wined3d_device_get_domain_shader(const struct wined3d_device *device);
--
2.16.4
June 13, 2018
[PATCH 1/6] d3d11: Normalize 1D texture view descriptions.
by Józef Kucia
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
---
dlls/d3d11/view.c | 53 +++++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 45 insertions(+), 8 deletions(-)
diff --git a/dlls/d3d11/view.c b/dlls/d3d11/view.c
index 80c4888d7821..164a1839e633 100644
--- a/dlls/d3d11/view.c
+++ b/dlls/d3d11/view.c
@@ -132,6 +132,8 @@ static HRESULT normalize_dsv_desc(D3D11_DEPTH_STENCIL_VIEW_DESC *desc, ID3D11Res
{
case D3D11_RESOURCE_DIMENSION_TEXTURE1D:
{
+ const struct d3d_texture1d *texture;
+
if (desc->ViewDimension != D3D11_DSV_DIMENSION_TEXTURE1D
&& desc->ViewDimension != D3D11_DSV_DIMENSION_TEXTURE1DARRAY)
{
@@ -139,8 +141,15 @@ static HRESULT normalize_dsv_desc(D3D11_DEPTH_STENCIL_VIEW_DESC *desc, ID3D11Res
return E_INVALIDARG;
}
- FIXME("Unhandled 1D texture resource.\n");
- return S_OK;
+ if (!(texture = unsafe_impl_from_ID3D11Texture1D((ID3D11Texture1D *)resource)))
+ {
+ ERR("Cannot get implementation from ID3D11Texture1D.\n");
+ return E_FAIL;
+ }
+
+ format = texture->desc.Format;
+ layer_count = texture->desc.ArraySize;
+ break;
}
case D3D11_RESOURCE_DIMENSION_TEXTURE2D:
@@ -344,6 +353,8 @@ static HRESULT normalize_rtv_desc(D3D11_RENDER_TARGET_VIEW_DESC *desc, ID3D11Res
case D3D11_RESOURCE_DIMENSION_TEXTURE1D:
{
+ const struct d3d_texture1d *texture;
+
if (desc->ViewDimension != D3D11_RTV_DIMENSION_TEXTURE1D
&& desc->ViewDimension != D3D11_RTV_DIMENSION_TEXTURE1DARRAY)
{
@@ -351,8 +362,15 @@ static HRESULT normalize_rtv_desc(D3D11_RENDER_TARGET_VIEW_DESC *desc, ID3D11Res
return E_INVALIDARG;
}
- FIXME("Unhandled 1D texture resource.\n");
- return S_OK;
+ if (!(texture = unsafe_impl_from_ID3D11Texture1D((ID3D11Texture1D *)resource)))
+ {
+ ERR("Cannot get implementation from ID3D11Texture1D.\n");
+ return E_FAIL;
+ }
+
+ format = texture->desc.Format;
+ layer_count = texture->desc.ArraySize;
+ break;
}
case D3D11_RESOURCE_DIMENSION_TEXTURE2D:
@@ -626,6 +644,8 @@ static HRESULT normalize_srv_desc(D3D11_SHADER_RESOURCE_VIEW_DESC *desc, ID3D11R
case D3D11_RESOURCE_DIMENSION_TEXTURE1D:
{
+ const struct d3d_texture1d *texture;
+
if (desc->ViewDimension != D3D11_SRV_DIMENSION_TEXTURE1D
&& desc->ViewDimension != D3D11_SRV_DIMENSION_TEXTURE1DARRAY)
{
@@ -633,8 +653,16 @@ static HRESULT normalize_srv_desc(D3D11_SHADER_RESOURCE_VIEW_DESC *desc, ID3D11R
return E_INVALIDARG;
}
- FIXME("Unhandled 1D texture resource.\n");
- return S_OK;
+ if (!(texture = unsafe_impl_from_ID3D11Texture1D((ID3D11Texture1D *)resource)))
+ {
+ ERR("Cannot get implementation from ID3D11Texture1D.\n");
+ return E_FAIL;
+ }
+
+ format = texture->desc.Format;
+ miplevel_count = texture->desc.MipLevels;
+ layer_count = texture->desc.ArraySize;
+ break;
}
case D3D11_RESOURCE_DIMENSION_TEXTURE2D:
@@ -871,6 +899,8 @@ static HRESULT normalize_uav_desc(D3D11_UNORDERED_ACCESS_VIEW_DESC *desc, ID3D11
case D3D11_RESOURCE_DIMENSION_TEXTURE1D:
{
+ const struct d3d_texture1d *texture;
+
if (desc->ViewDimension != D3D11_UAV_DIMENSION_TEXTURE1D
&& desc->ViewDimension != D3D11_UAV_DIMENSION_TEXTURE1DARRAY)
{
@@ -878,8 +908,15 @@ static HRESULT normalize_uav_desc(D3D11_UNORDERED_ACCESS_VIEW_DESC *desc, ID3D11
return E_INVALIDARG;
}
- FIXME("Unhandled 1D texture resource.\n");
- return S_OK;
+ if (!(texture = unsafe_impl_from_ID3D11Texture1D((ID3D11Texture1D *)resource)))
+ {
+ ERR("Cannot get implementation from ID3D11Texture1D.\n");
+ return E_FAIL;
+ }
+
+ format = texture->desc.Format;
+ layer_count = texture->desc.ArraySize;
+ break;
}
case D3D11_RESOURCE_DIMENSION_TEXTURE2D:
--
2.16.4
June 13, 2018
[PATCH] testbot: Use FIXME to identify places that need fixing.
by Francois Gouget
The comment that follows should identify the nature of the required
fix.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/lib/ObjectModel/CGI/CollectionBlock.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testbot/lib/ObjectModel/CGI/CollectionBlock.pm b/testbot/lib/ObjectModel/CGI/CollectionBlock.pm
index 155717aee..f675e6b26 100644
--- a/testbot/lib/ObjectModel/CGI/CollectionBlock.pm
+++ b/testbot/lib/ObjectModel/CGI/CollectionBlock.pm
@@ -484,7 +484,7 @@ sub OnAction($$)
if ($Action eq "Cancel")
{
-#TODO
+ # FIXME Todo
}
elsif ($Action eq "Add " . $self->{Collection}->GetItemName())
{
--
2.17.1
June 13, 2018
[PATCH] testbot: Fix UpdateStatus() to handle empty jobs and steps.
by Francois Gouget
We should not have empty jobs and steps but if we do make sure they are
marked 'completed'.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/lib/WineTestBot/Jobs.pm | 1 +
testbot/lib/WineTestBot/Steps.pm | 1 +
2 files changed, 2 insertions(+)
diff --git a/testbot/lib/WineTestBot/Jobs.pm b/testbot/lib/WineTestBot/Jobs.pm
index a13b3468e..6951b98c5 100644
--- a/testbot/lib/WineTestBot/Jobs.pm
+++ b/testbot/lib/WineTestBot/Jobs.pm
@@ -229,6 +229,7 @@ sub UpdateStatus($)
my $StepStatus = $Step->UpdateStatus($Skip);
$Has{$StepStatus} = 1;
}
+ $Has{completed} = 1 if (!%Has); # This job has no step!
# Inherit the steps most significant status.
# Note that one or more tasks may have been requeued during the cleanup phase
diff --git a/testbot/lib/WineTestBot/Steps.pm b/testbot/lib/WineTestBot/Steps.pm
index 8afe79396..71e04471d 100644
--- a/testbot/lib/WineTestBot/Steps.pm
+++ b/testbot/lib/WineTestBot/Steps.pm
@@ -200,6 +200,7 @@ sub UpdateStatus($$)
my %Has;
map { $Has{$_->UpdateStatus($Skip)} = 1 } (@{$self->Tasks->Clone()->GetItems()});
+ $Has{completed} = 1 if (!%Has); # This step has no task!
# Inherit the tasks most significant status.
# Note that one or more tasks may have been requeued during the cleanup phase
--
2.17.1
June 13, 2018
[PATCH] testbot: Document the dependency on Procmail.
by Francois Gouget
It may be possible to do without it but it is used in the installation
instructions.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/doc/INSTALL.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testbot/doc/INSTALL.txt b/testbot/doc/INSTALL.txt
index cb7c31b97..bae1e8254 100644
--- a/testbot/doc/INSTALL.txt
+++ b/testbot/doc/INSTALL.txt
@@ -5,7 +5,7 @@ Dependencies:
- Apache2 with mod_perl
- MySQL
- Perl DBD and DBI::mysql modules
-- Sendmail
+- Sendmail and Procmail
- Sys::Virt (libsys-virt-perl, see http://libvirt.org/)
- Image::Magick (perlmagick)
- Optional: IO::Socket::IP (for IPv6, libio-socket-ip-perl)
--
2.17.1
June 13, 2018
[PATCH] testbot/web: Let PatchUtils compute the test executable name for Submit.pl.
by Francois Gouget
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/web/Submit.pl | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/testbot/web/Submit.pl b/testbot/web/Submit.pl
index d5265a3b3..ac9a38488 100644
--- a/testbot/web/Submit.pl
+++ b/testbot/web/Submit.pl
@@ -588,7 +588,7 @@ sub DetermineFileType($$)
close FH;
- my ($ErrMessage, $DllBaseName, $TestUnit);
+ my ($ErrMessage, $ExeBase, $TestUnit);
if ($FileType eq "unknown")
{
my $Impacts = GetPatchImpact($FileName);
@@ -604,7 +604,7 @@ sub DetermineFileType($$)
{
my $TestInfo = (values %{$Impacts->{Tests}})[0];
$FileType = $TestInfo->{Type};
- $DllBaseName = $TestInfo->{Module};
+ $ExeBase = $TestInfo->{ExeBase};
$TestUnit = (keys %{$TestInfo->{Units}})[0];
}
}
@@ -614,7 +614,7 @@ sub DetermineFileType($$)
$FileType = "unknown";
}
- return ($ErrMessage, $FileType, $DllBaseName, $TestUnit);
+ return ($ErrMessage, $FileType, $ExeBase, $TestUnit);
}
sub OnPage1Next($)
@@ -644,7 +644,7 @@ sub OnPage1Next($)
}
close OUTFILE;
- my ($ErrMessage, $FileType, $DllBaseName, $TestUnit) = $self->DetermineFileType($StagingFile);
+ my ($ErrMessage, $FileType, $ExeBase, $TestUnit) = $self->DetermineFileType($StagingFile);
if (defined($ErrMessage))
{
$self->{ErrField} = "File";
@@ -661,14 +661,9 @@ sub OnPage1Next($)
$self->{FileName} = $BaseName;
$self->{FileType} = $FileType;
- if (defined($DllBaseName))
+ if (defined $ExeBase)
{
- $self->{TestExecutable} = $DllBaseName;
- if ($FileType eq "patchprograms")
- {
- $self->{TestExecutable} .= ".exe";
- }
- $self->{TestExecutable} .= "_test.exe";
+ $self->{TestExecutable} = "$ExeBase.exe";
}
if (defined($TestUnit))
{
--
2.17.1
June 13, 2018
[PATCH] testbot: Add some section headers to the scripts.
by Francois Gouget
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/bin/Janitor.pl | 8 ++++++++
testbot/bin/WineRunBuild.pl | 4 ++++
testbot/bin/WineRunReconfig.pl | 4 ++++
testbot/bin/WineRunTask.pl | 9 +++++++++
testbot/bin/WineSendLog.pl | 10 ++++++++++
5 files changed, 35 insertions(+)
diff --git a/testbot/bin/Janitor.pl b/testbot/bin/Janitor.pl
index f7a6e33b6..9fb38efde 100755
--- a/testbot/bin/Janitor.pl
+++ b/testbot/bin/Janitor.pl
@@ -53,6 +53,11 @@ use WineTestBot::Tasks;
use WineTestBot::Users;
use WineTestBot::VMs;
+
+#
+# Logging and error handling helpers
+#
+
my $LogOnly;
sub Trace(@)
{
@@ -67,6 +72,9 @@ sub Error(@)
}
+#
+# Setup and command line processing
+#
$ENV{PATH} = "/usr/bin:/bin";
delete $ENV{ENV};
diff --git a/testbot/bin/WineRunBuild.pl b/testbot/bin/WineRunBuild.pl
index 61deb50a6..31decc107 100755
--- a/testbot/bin/WineRunBuild.pl
+++ b/testbot/bin/WineRunBuild.pl
@@ -49,6 +49,10 @@ use WineTestBot::Log;
use WineTestBot::Engine::Notify;
+#
+# Logging and error handling helpers
+#
+
my $Debug;
sub Debug(@)
{
diff --git a/testbot/bin/WineRunReconfig.pl b/testbot/bin/WineRunReconfig.pl
index 713712cec..99b73da6f 100755
--- a/testbot/bin/WineRunReconfig.pl
+++ b/testbot/bin/WineRunReconfig.pl
@@ -48,6 +48,10 @@ use WineTestBot::Log;
use WineTestBot::Engine::Notify;
+#
+# Logging and error handling helpers
+#
+
my $Debug;
sub Debug(@)
{
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index d75741757..3290b0bc6 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -47,6 +47,10 @@ use WineTestBot::Log;
use WineTestBot::Engine::Notify;
+#
+# Logging and error handling helpers
+#
+
my $Debug;
sub Debug(@)
{
@@ -60,6 +64,11 @@ sub Error(@)
LogMsg @_;
}
+
+#
+# Task helpers
+#
+
sub TakeScreenshot($$)
{
my ($VM, $FullScreenshotFileName) = @_;
diff --git a/testbot/bin/WineSendLog.pl b/testbot/bin/WineSendLog.pl
index 2a8942701..e03395af1 100755
--- a/testbot/bin/WineSendLog.pl
+++ b/testbot/bin/WineSendLog.pl
@@ -501,6 +501,11 @@ EOF
}
}
+
+#
+# Setup and command line processing
+#
+
$ENV{PATH} = "/usr/bin:/bin";
delete $ENV{ENV};
@@ -528,6 +533,11 @@ if (! defined($Job))
exit(1);
}
+
+#
+# Analyze the log and notify the developer
+#
+
SendLog($Job);
LogMsg "Log for job $JobId sent\n";
--
2.17.1
June 13, 2018
[PATCH 3/3] testbot/build: Simplify logging.
by Francois Gouget
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/bin/build/Build.pl | 29 ++++++++++++-----------------
testbot/bin/build/Reconfig.pl | 33 ++++++++++++++-------------------
2 files changed, 26 insertions(+), 36 deletions(-)
diff --git a/testbot/bin/build/Build.pl b/testbot/bin/build/Build.pl
index 001f5eb18..3fe0e14ea 100755
--- a/testbot/bin/build/Build.pl
+++ b/testbot/bin/build/Build.pl
@@ -43,32 +43,27 @@ sub BEGIN
use WineTestBot::Config;
use WineTestBot::PatchUtils;
+my $LogFileName = "$LogDir/Build.log";
+
sub InfoMsg(@)
{
my $OldUMask = umask(002);
- if (open LOGFILE, ">>$LogDir/Build.log")
+ if (open(my $Log, ">>", $LogFileName))
{
- print LOGFILE @_;
- close LOGFILE;
+ print $Log @_;
+ close($Log);
}
umask($OldUMask);
}
sub LogMsg(@)
{
- my $OldUMask = umask(002);
- if (open LOGFILE, ">>$LogDir/Build.log")
- {
- print LOGFILE "Build: ", @_;
- close LOGFILE;
- }
- umask($OldUMask);
+ InfoMsg "Build: ", @_;
}
sub FatalError(@)
{
LogMsg @_;
-
exit 1;
}
@@ -92,7 +87,7 @@ sub ApplyPatch($)
system("( cd $DataDir/wine && set -x && " .
" git apply --verbose $PatchFile && " .
" git add -A " .
- ") >> $LogDir/Build.log 2>&1");
+ ") >>$LogFileName 2>&1");
if ($? != 0)
{
LogMsg "Patch failed to apply\n";
@@ -105,7 +100,7 @@ sub ApplyPatch($)
InfoMsg "\nRunning make_makefiles\n";
system("( cd $DataDir/wine && set -x && " .
" ./tools/make_makefiles " .
- ") >> $LogDir/Build.log 2>&1");
+ ") >>$LogFileName 2>&1");
if ($? != 0)
{
LogMsg "make_makefiles failed\n";
@@ -118,7 +113,7 @@ sub ApplyPatch($)
InfoMsg "\nRunning autoconf\n";
system("( cd $DataDir/wine && set -x && " .
" autoconf " .
- ") >>$LogDir/Build.log 2>&1");
+ ") >>$LogFileName 2>&1");
if ($? != 0)
{
LogMsg "Autoconf failed\n";
@@ -136,7 +131,7 @@ sub BuildNative()
InfoMsg "\nRebuilding native tools\n";
system("( cd $DataDir/build-native && set -x && " .
" time make -j$ncpus __tooldeps__ " .
- ") >>$LogDir/Build.log 2>&1");
+ ") >>$LogFileName 2>&1");
if ($? != 0)
{
LogMsg "Rebuild of native tools failed\n";
@@ -162,7 +157,7 @@ sub BuildTestExecutables($$)
InfoMsg "\nBuilding the $Bits-bit test executable(s)\n";
system("( cd $DataDir/build-mingw$Bits && set -x && " .
" time make -j$ncpus ". join(" ", sort @BuildDirs) .
- ") >>$LogDir/Build.log 2>&1");
+ ") >>$LogFileName 2>&1");
if ($? != 0)
{
LogMsg "Rebuild of $Bits-bit crossbuild failed\n";
@@ -186,7 +181,7 @@ $ENV{PATH} = "/usr/lib/ccache:/usr/bin:/bin";
delete $ENV{ENV};
# Start with a clean logfile
-unlink("$LogDir/Build.log");
+unlink($LogFileName);
my ($PatchFile, $BitIndicators);
if (@ARGV == 2)
diff --git a/testbot/bin/build/Reconfig.pl b/testbot/bin/build/Reconfig.pl
index bc179951d..babc4a04b 100755
--- a/testbot/bin/build/Reconfig.pl
+++ b/testbot/bin/build/Reconfig.pl
@@ -42,32 +42,27 @@ sub BEGIN
use WineTestBot::Config;
+my $LogFileName = "$LogDir/Reconfig.log";
+
sub InfoMsg(@)
{
my $OldUMask = umask(002);
- if (open LOGFILE, ">>$LogDir/Reconfig.log")
+ if (open(my $Log, ">>", $LogFileName))
{
- print LOGFILE @_;
- close LOGFILE;
+ print $Log @_;
+ close($Log);
}
umask($OldUMask);
}
sub LogMsg(@)
{
- my $OldUMask = umask(002);
- if (open LOGFILE, ">>$LogDir/Reconfig.log")
- {
- print LOGFILE "Reconfig: ", @_;
- close LOGFILE;
- }
- umask($OldUMask);
+ InfoMsg "Reconfig: ", @_;
}
sub FatalError(@)
{
LogMsg @_;
-
exit 1;
}
@@ -92,7 +87,7 @@ sub BuildTestAgentd()
InfoMsg "\nBuilding the native testagentd\n";
system("( cd $::RootDir/src/testagentd && set -x && " .
" time make -j$ncpus build " .
- ") >>$LogDir/Reconfig.log 2>&1");
+ ") >>$LogFileName 2>&1");
if ($? != 0)
{
LogMsg "Build testagentd failed\n";
@@ -103,7 +98,7 @@ sub BuildTestAgentd()
InfoMsg "\nRebuilding the Windows TestAgentd\n";
system("( cd $::RootDir/src/testagentd && set -x && " .
" time make -j$ncpus iso " .
- ") >>$LogDir/Reconfig.log 2>&1");
+ ") >>$LogFileName 2>&1");
if ($? != 0)
{
LogMsg "Build winetestbot.iso failed\n";
@@ -118,7 +113,7 @@ sub BuildTestLauncher()
InfoMsg "\nRebuilding TestLauncher\n";
system("( cd $::RootDir/src/TestLauncher && set -x && " .
" time make -j$ncpus" .
- ") >>$LogDir/Reconfig.log 2>&1");
+ ") >>$LogFileName 2>&1");
if ($? != 0)
{
LogMsg "Build TestLauncher failed\n";
@@ -131,7 +126,7 @@ sub BuildTestLauncher()
sub GitPull()
{
InfoMsg "Updating the Wine source\n";
- system("cd $DataDir/wine && git pull >> $LogDir/Reconfig.log 2>&1");
+ system("cd $DataDir/wine && git pull >>$LogFileName 2>&1");
if ($? != 0)
{
LogMsg "Git pull failed\n";
@@ -167,7 +162,7 @@ sub BuildNative()
" rm -rf * && " .
" time ../wine/configure --enable-win64 --without-x --without-freetype --disable-winetest && " .
" time make -j$ncpus __tooldeps__ " .
- ") >>$LogDir/Reconfig.log 2>&1");
+ ") >>$LogFileName 2>&1");
if ($? != 0)
{
@@ -191,7 +186,7 @@ sub BuildCross($)
" rm -rf * && " .
" time ../wine/configure --host=$Host --with-wine-tools=../build-native --without-x --without-freetype --disable-winetest && " .
" time make -j$ncpus buildtests" .
- ") >>$LogDir/Reconfig.log 2>&1");
+ ") >>$LogFileName 2>&1");
if ($? != 0)
{
LogMsg "Build cross ($Bits bits) failed\n";
@@ -204,8 +199,8 @@ sub BuildCross($)
$ENV{PATH} = "/usr/lib/ccache:/usr/bin:/bin";
delete $ENV{ENV};
-# Start with clean logfile
-unlink("$LogDir/Reconfig.log");
+# Start with a clean logfile
+unlink($LogFileName);
if (! -d "$DataDir/staging" and ! mkdir "$DataDir/staging")
{
--
2.17.1
June 13, 2018
[PATCH 2/3] testbot/build: Move up CountCPus() in Build.pl.
by Francois Gouget
This way it matches Reconfig.pl.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/bin/build/Build.pl | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/testbot/bin/build/Build.pl b/testbot/bin/build/Build.pl
index 8b1859016..001f5eb18 100755
--- a/testbot/bin/build/Build.pl
+++ b/testbot/bin/build/Build.pl
@@ -72,6 +72,18 @@ sub FatalError(@)
exit 1;
}
+my $ncpus;
+sub CountCPUs()
+{
+ if (open(my $fh, "<", "/proc/cpuinfo"))
+ {
+ # Linux
+ map { $ncpus++ if (/^processor/); } <$fh>;
+ close($fh);
+ }
+ $ncpus ||= 1;
+}
+
sub ApplyPatch($)
{
my ($PatchFile) = @_;
@@ -117,18 +129,6 @@ sub ApplyPatch($)
return $Impacts;
}
-my $ncpus;
-sub CountCPUs()
-{
- if (open(my $fh, "<", "/proc/cpuinfo"))
- {
- # Linux
- map { $ncpus++ if (/^processor/); } <$fh>;
- close($fh);
- }
- $ncpus ||= 1;
-}
-
sub BuildNative()
{
mkdir "$DataDir/build-native" if (! -d "$DataDir/build-native");
--
2.17.1
June 13, 2018