Skip to content

Instantly share code, notes, and snippets.

@ramblex
ramblex / ideas.md
Created September 4, 2011 09:41
Legacy C tools

Tools for legacy code

Formality for software

Checking globals are covered by tests

It can be difficult to see what the side-effects of globals are and just because they have line/conditional coverage in tests doesn't mean that they affect any test outcomes.

RCS file: /export/home/cvsroot/systems/products/lib/umtsfdd/rel8_200903/common/L1MsgHdlr/ProcDecHdlrs/src/radiolinkReconfigCommitRequestProcDecHdlr.c,v
RCS file: /export/home/cvsroot/systems/products/lib/umtsfdd/rel8_200903/common/L1MsgHdlr/ProcDecHdlrs/src/radiolinkReconfigPrepRequestProcDecHdlr.c,v
RCS file: /export/home/cvsroot/systems/products/lib/umtsfdd/rel8_200903/common/L1MsgHdlr/ProcDecHdlrs/src/radiolinkSetupRequestProcDecHdlr.c,v
RCS file: /export/home/cvsroot/systems/products/lib/umtsfdd/rel8_200903/common/L1MsgHdlr/ProcEncHdlrs/src/radiolinkReconfigReadyProcEncHdlr.c,v
RCS file: /export/home/cvsroot/systems/products/lib/umtsfdd/rel8_200903/common/L1MsgHdlr/ProcEncHdlrs/src/radiolinkSetupResponseProcEncHdlr.c,v
RCS file: /export/home/cvsroot/systems/products/lib/umtsfdd/rel8_200903/common/L1MsgHdlr/inc/radioLinkGVar.h,v
RCS file: /export/home/cvsroot/systems/products/lib/umtsfdd/rel8_200903/common/L1MsgHdlr/src/radioLinkAllocateRsrcMgr.c,v
RCS file: /export/home/cvsroot/systems/products/lib/umtsfd
{paramPresentFlags = 0x0524, fpPayloadCrcCheckMode = 0x0000 (FP_PAYLOAD_CRC_CHECK_ENABLE), fpEndianMode = 0x0000 (FP_MSG_BIG_ENDIAN_BYTEORDER), macDPduSpareBitsRemoved = 0x0001 (MACD_PDU_SPARE_BITS_REMOVED), eDchCapacityLimit = 0x0000, disableExtendedRange = 0x0000 (DISABLE_EXTENDED_RANGE_OFF), dlhsPriQThruputFilterParam = 0x0a '\n', nodeBTestModeConfig = 0x0000 (NODEB_TEST_MODE_DISABLED), pcpichAmplitude = 0x0000, nodeBResourceAllocation = {paramPresentFlags = 0x0007, cmnDemodPrachRsrcCount = 0x01, maxRachResourceCount = 0x01, prachOnlyRsrcCount = 0x01},
unusedFieldModSetup2 = {unusedFieldModSetup2_0 = 0x00 '\0', unusedFieldModSetup2_1 = 0x00 '\0', unusedFieldModSetup2_2 = 0x03}, hsupaConfigParams = {paramPresentFlags = 0x0001, despreadResourceBudget = 0x0001, hsupaMaxNumCdmUsers = 0x00 '\0'}}
message.msgStartFlag = 0x4b3c2d1e (1262234910)
message.msgSize = 0xf (15)
message.transactionId = 0x3 (3)
message.msgId = 0x28 (40)
message.msgType = 0x0 (0)
From MsgDecHdlr:
{paramPresentFlags = 0x0724, fpPayloadCrcCheckMode =
0x0000 (FP_PAYLOAD_CRC_CHECK_ENABLE), fpEndianMode = 0x0000
(FP_MSG_BIG_ENDIAN_BYTEORDER), macDPduSpareBitsRemoved = 0x0001
(MACD_PDU_SPARE_BITS_REMOVED), eDchCapacityLimit = 0x0000, disableExtendedRange
= 0x0000 (DISABLE_EXTENDED_RANGE_OFF), dlhsPriQThruputFilterParam = 0x0a '\n',
nodeBTestModeConfig = 0x0000 (NODEB_TEST_MODE_DISABLED), pcpichAmplitude =
0x0000,
nodeBResourceAllocation = {paramPresentFlags = 0x0007,
Successfully written /home/alexd/systems-git/systems/products/lib/umtsfdd/rel8_200903/common/NodeBLayer1/verif/scripts/bld/decodeCec.des
Compiling generated code (1 source file)
gmake[1]: Entering directory `/home/alexd/systems-git/systems/products/lib/umtsfdd/rel8_200903/common/NodeBLayer1/verif/scripts/src'
Compiling- User_zztlib5498_DecoderBsi.o
In file included from _decodeCec/User_zztlib5498_DecoderBsi.cpp:10:0:
/home/alexd/systems-git/systems/products/lib/umtsfdd/rel8_200903/common/NodeBLayer1/verif/scripts/src/decodeCec.vhd:235:20: error: ‘FmtSpecial_e’ has not been declared
/home/alexd/systems-git/systems/products/lib/umtsfdd/rel8_200903/common/NodeBLayer1/verif/scripts/src/decodeCec.vhd: In member function ‘void User_zztlib5498_DecoderBsi::doSpecialChar(int)’:
/home/alexd/systems-git/systems/products/lib/umtsfdd/rel8_200903/common/NodeBLayer1/verif/scripts/src/decodeCec.vhd:239:10: error: ‘FS_TIMESTAMP’ was not declared in this scope
/home/alexd/systems-git/systems/products/lib/umtsfdd/rel8_200903/co
@ramblex
ramblex / gist:866888
Created March 12, 2011 01:04
Using haml for express views
var haml = require('haml');
/*
* Register .haml so that markdown complies with express view system by
* implementing a compile method
*/
app.register('.haml', {
compile: function(str, options) {
return function(locals) {
return haml.render(str, {locals: locals});
# Run a command and append stdout and stderr output into a logfile. If the
# command fails cat the logfile. When this is run in Hudson it allows for
# a nice clean console log and will show only the error log.
#
# Assumes that the last argument is the log file and the rest are a command
function run()
{
local cmd=${@:1:$#-1}
local logfile=${!#}
$cmd >> $logfile 2>&1
In file included from /home/alexd/64qam/systems/products/lib/umtsfdd/rel6_200612/uplink/UlSched/src/UlSchedCtrl.vhd:148:
/home/alexd/64qam/systems/products/lib/umtsfdd/rel6_200612/uplink/UlSched/src/ulSchedCtrl.c: In function ‘handleTfciRach’:
/home/alexd/64qam/systems/products/lib/umtsfdd/rel6_200612/uplink/UlSched/src/ulSchedCtrl.c:1178: error: ‘DIAG_ULSCHED_BAD_TFCI’ undeclared (first use in this function)
/home/alexd/64qam/systems/products/lib/umtsfdd/rel6_200612/uplink/UlSched/src/ulSchedCtrl.c:1178: error: (Each undeclared identifier is reported only once
/home/alexd/64qam/systems/products/lib/umtsfdd/rel6_200612/uplink/UlSched/src/ulSchedCtrl.c:1178: error: for each function it appears in.)
/home/alexd/64qam/systems/products/lib/umtsfdd/rel6_200612/uplink/UlSched/src/ulSchedCtrl.c: In function ‘handleTfciDch’:
/home/alexd/64qam/systems/products/lib/umtsfdd/rel6_200612/uplink/UlSched/src/ulSchedCtrl.c:1282: error: ‘DIAG_ULSCHED_BAD_TFCI’ undeclared (first use in this function)
[Vhdl:Compiler:10] Error -
/**************************************************************************
*
* checkKi()
*
* Purpose: Calculates the value of Ki, with MCS table entry and Kt.
*
* (ki = kt - k0,i) and k0,i. is found in the MCS table.
*
* Args: UeConfig_t* - pointer to UE configuration structure
* HarqData_t* - pointer to HARQ data structure
<!DOCTYPE html>
<html>
<head>
<title>ONLINE KINGDOM</title>
<%= stylesheet_link_tag 'screen' %>
<%= javascript_include_tag 'jquery' %>
<%= javascript_include_tag 'application', 'cufon-yui', 'Arial_Rounded_MT_Bold_400.font' %>
<%= javascript_tag "var AUTH_TOKEN = #{form_authenticity_token.inspect};" if protect_against_forgery? %>
<%= javascript_include_tiny_mce_if_used %>
<%= tiny_mce if using_tiny_mce? %>