Skip to content

Commit 832546a

Browse files
Merged PR 7902733: Fix Razzle build
+ Do not use git status in createBuildString.cmd, it writes all of the git lock files, which breaks Razzle build (ABT3101) + Do not include selftests that need allocations in the list used by kernel test; there is no SymCryptCallbackAlloc/Free defined there, so we have a link error.
1 parent 9ab13e2 commit 832546a

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

build/createBuildString.cmd

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ set %1=%date:~-4%-%date:~-10,2%-%date:~-7,2%T%time:~,-3%
3737
goto :EOF
3838

3939
:GetBranchName
40-
git status | findstr /C:"On branch" >%TmpBuildStringFile%
41-
set /P T=<%TmpBuildStringFile%
42-
for /f "tokens=3" %%i in ("%T%") do set %1=%%i
40+
git symbolic-ref --short HEAD >%TmpBuildStringFile%
41+
set /p %1=<%TmpBuildStringFile%
4342
goto :EOF
4443

4544
:GetVersionNumber

unittest/inc/test_lib.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1748,6 +1748,8 @@ typedef struct _SELFTEST_INFO
17481748
} SELFTEST_INFO;
17491749

17501750
extern const SELFTEST_INFO g_selfTests[];
1751+
// Some selftests require allocations, and we do not support them in KM test driver yet
1752+
extern const SELFTEST_INFO g_selfTests_allocating[];
17511753

17521754
VOID
17531755
runTestThread( VOID * seed );

unittest/lib/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1498,7 +1498,7 @@ runKernelmodeTests()
14981498
dw = GetCurrentDirectory( PATH_BUFFER_LEN - index, &quotedPathName[index] );
14991499
if( dw == 0 )
15001500
{
1501-
print( "Failed to get current direcotry, error = %08x", GetLastError() );
1501+
print( "Failed to get current directory, error = %08x", GetLastError() );
15021502
g_nTotalErrors++;
15031503
goto cleanup;
15041504
}

unittest/lib/selftestFuncList.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,18 @@ const SELFTEST_INFO g_selfTests[] =
6666
{&SymCryptSrtpKdfSelfTest, "SrtpKdf" },
6767
{&SymCryptSshKdfSha256SelfTest, "SshKdfSha256" },
6868
{&SymCryptSshKdfSha512SelfTest, "SshKdfSha512" },
69+
70+
{NULL, NULL},
71+
};
72+
73+
const SELFTEST_INFO g_selfTests_allocating[] =
74+
{
6975
{&SymCryptDhSecretAgreementSelftest, "DHSecretAgreement" },
7076
{&SymCryptEcDhSecretAgreementSelftest, "ECDHSecretAgreement" },
7177
{&SymCryptDsaSelftest, "DSA" },
7278
{&SymCryptEcDsaSelftest, "ECDSA" },
7379
{&SymCryptRsaSelftest, "RSA" },
74-
80+
7581
{NULL, NULL},
7682
};
7783

unittest/lib/testSelftest.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ testSelftest()
9393
{
9494
testSelftestOne( &g_selfTests[i], &selftestPerfTable );
9595
}
96+
for( int i=0; g_selfTests_allocating[i].f != NULL; i++ )
97+
{
98+
testSelftestOne( &g_selfTests_allocating[i], &selftestPerfTable );
99+
}
96100

97101
selftestPerfTable.print( "Self test performance" );
98102
}

0 commit comments

Comments
 (0)