message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
iot_secure_sockets.c for lpc54018: corrected comparison | @@ -356,7 +356,7 @@ int32_t SOCKETS_Recv( Socket_t xSocket,
SSOCKETContextPtr_t pxContext = ( SSOCKETContextPtr_t ) xSocket;
- if( ( SOCKETS_INVALID_CONTEXT != xSocket ) &&
+ if( ( SOCKETS_INVALID_SOCKET != xSocket ) &&
( NULL != pvBuffer ) &&
( ( nxpsecuresocketsSOCKET_READ_CLOSED_FLAG & pxContext->xShutdownFlags ) == 0UL ) &&
( pxContext->ulState & ( nxpsecuresocketsSOCKET_CONNECTED_FLAG ) )
|
GRIB1: Local definition 5: Allow lowerThreshold and upperThreshold to be MISSING | @@ -13,7 +13,6 @@ _if (timeRangeIndicator==3 || timeRangeIndicator==4
alias productDefinitionTemplateNumber=probPoint;
}
-
template mars_labeling "grib1/mars_labeling.def";
unsigned[1] forecastProbabilityNumber : dump;
@@ -24,9 +23,9 @@ signed[1] localDecimalScaleFactor : dump ;
unsigned[1] thresholdIndicator : dump;
-signed[2] lowerThreshold : dump ;
+signed[2] lowerThreshold : can_be_missing,dump;
-signed[2] upperThreshold : dump;
+signed[2] upperThreshold : can_be_missing,dump;
# 1 to 2 conversion
_if (thresholdIndicator == 1) {
@@ -56,7 +55,6 @@ _if (thresholdIndicator == 3) {
transient scaledValueOfUpperLimit=upperThreshold;
}
-
# spareSetToZero
pad padding_loc5_1(1);
alias number = forecastProbabilityNumber;
|
Change "Calibration" to "Orientation" in UI. | <div class="panel-body">
<div class="col-xs-12">
<span style="position:relative; overflow: hidden;">
- <button class="btn btn-primary btn-block" ui-turn-on="modalCalibrateForward">Calibrate AHRS Sensors</button>
+ <button class="btn btn-primary btn-block" ui-turn-on="modalCalibrateForward">Set AHRS Sensor Orientation</button>
</span>
</div>
</div>
<div class="modal-content">
<div class="modal-header">
<button class="close" ui-turn-off="modalCalibrateForward"></button>
- <h4 class="modal-title">Calibrate AHRS Sensors: Forward Direction</h4>
+ <h4 class="modal-title">Set AHRS Sensor Orientation: Forward Direction</h4>
</div>
<div class="modal-body">
<p>Point the Stratux/sensor box so that the end that will be pointing toward the <strong>nose</strong> of the airplane is pointing toward the sky and press the <strong>Set Forward Direction</strong> button.</p>
<div class="modal-content">
<div class="modal-header">
<button class="close" ui-turn-off="modalCalibrateUp"></button>
- <h4 class="modal-title">Calibrate AHRS Sensors: Up Direction</h4>
+ <h4 class="modal-title">Set AHRS Sensor Orientation: Up Direction</h4>
</div>
<div class="modal-body">
<p>Place the Stratux/sensor box in the orientation it will be in during flight and press the <strong>Set Up Direction</strong> button.</p>
<div class="modal-content">
<div class="modal-header">
<button class="close" ui-turn-off="modalCalibrateDone"></button>
- <h4 class="modal-title">Calibrate AHRS Sensors: Finished</h4>
+ <h4 class="modal-title">Set AHRS Sensor Orientation: Finished</h4>
</div>
<div class="modal-body">
<p>The sensors are calibrated. These settings will be saved for future flights.</p>
<div class="modal-content">
<div class="modal-header">
<button class="close" ui-turn-off="modalCalibrateFailed"></button>
- <h4 class="modal-title">Calibrate AHRS Sensors: Failed!</h4>
+ <h4 class="modal-title">Set AHRS Sensor Orientation: Failed!</h4>
</div>
<div class="modal-body">
<p>There was an error: {{Orientation_Failure_Message}}</p>
<div class="modal-content">
<div class="modal-header">
<button class="close" ui-turn-off="modalCalibrateCanceled"></button>
- <h4 class="modal-title">Calibrate AHRS Sensors: Canceled</h4>
+ <h4 class="modal-title">Set AHRS Sensor Orientation: Canceled</h4>
</div>
<div class="modal-body">
<p>Calibration canceled.</p>
|
h2olog: use `override` keyword | @@ -43,20 +43,20 @@ class h2o_raw_tracer : public h2o_tracer
void initialize();
protected:
- virtual void do_handle_event(const void *data, int len);
- virtual void do_handle_lost(std::uint64_t lost);
+ void do_handle_event(const void *data, int len) override;
+ void do_handle_lost(std::uint64_t lost) override;
public:
h2o_raw_tracer(): h2o_tracer() {
initialize();
}
- virtual std::string select_usdts(const char *pattern);
- virtual const std::vector<h2o_tracer::usdt> &usdt_probes()
+ std::string select_usdts(const char *pattern) override;
+ const std::vector<h2o_tracer::usdt> &usdt_probes() override
{
return selected_usdts.empty() ? available_usdts : selected_usdts;
}
- virtual std::string bpf_text();
+ std::string bpf_text() override;
};
void h2o_raw_tracer::do_handle_lost(std::uint64_t lost)
|
Fix BCC on arm64 by allowing missing ausyscall
ausyscall is not available on ARM64 systems I am testing. The system is
running debian buster. All BCC tools fail as a result. Let us not fail
if ausyscall is missing. | @@ -381,10 +381,7 @@ try:
out = out.split(b'\n',1)[1]
syscalls = dict(map(_parse_syscall, out.strip().split(b'\n')))
except Exception as e:
- if platform.machine() == "x86_64":
pass
- else:
- raise Exception("ausyscall: command not found")
def syscall_name(syscall_num):
"""Return the syscall name for the particular syscall number."""
|
highlevel: fix linker error | @@ -2,7 +2,7 @@ file (GLOB SOURCES
*.c)
set_source_files_properties (${PROJECT_BINARY_DIR}/src/error/elektra_errors.c PROPERTIES GENERATED ON)
-add_lib (highlevel SOURCES ${SOURCES} ${PROJECT_BINARY_DIR}/src/error/elektra_errors.c LINK_ELEKTRA elektra-kdb)
+add_lib (highlevel SOURCES ${SOURCES} ${PROJECT_BINARY_DIR}/src/error/elektra_errors.c LINK_ELEKTRA elektra-kdb elektra-ease)
configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/elektra-highlevel.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/elektra-highlevel.pc" @ONLY)
install (FILES "${CMAKE_CURRENT_BINARY_DIR}/elektra-highlevel.pc" DESTINATION lib${LIB_SUFFIX}/${TARGET_PKGCONFIG_FOLDER})
|
Add common internal crypto/ modules in liblegacy.a
Just as for the FIPS module, there's code in the legacy module that need
this. | @@ -80,6 +80,7 @@ SOURCE[../libcrypto]=$UTIL_COMMON \
o_fopen.c getenv.c o_init.c o_fips.c init.c trace.c provider.c \
$UPLINKSRC
SOURCE[../providers/libfips.a]=$UTIL_COMMON
+SOURCE[../providers/liblegacy.a]=$UTIL_COMMON
# Implementations are now spread across several libraries, so the defines
# need to be applied to all affected libraries and modules.
@@ -87,6 +88,7 @@ DEFINE[../libcrypto]=$UTIL_DEFINE $UPLINKDEF
DEFINE[../providers/libfips.a]=$UTIL_DEFINE
DEFINE[../providers/fips]=$UTIL_DEFINE
DEFINE[../providers/libimplementations.a]=$UTIL_DEFINE
+DEFINE[../providers/liblegacy.a]=$UTIL_DEFINE
DEFINE[../providers/libcommon.a]=$UTIL_DEFINE
DEPEND[info.o]=buildinf.h
|
Fix compilation for INET6 stacks | #if defined(__FreeBSD__) && !defined(__Userspace__)
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/netinet/sctputil.c 362448 2020-06-20 20:20:16Z tuexen $");
+__FBSDID("$FreeBSD: head/sys/netinet/sctputil.c 362454 2020-06-20 23:48:57Z tuexen $");
#endif
#include <netinet/sctp_os.h>
@@ -7638,6 +7638,8 @@ sctp_bindx_add_address(struct socket *so, struct sctp_inpcb *inp,
} else {
addr_to_use = sa;
}
+#else
+ addr_to_use = sa;
#endif
break;
#endif
|
test: add one more | @@ -171,6 +171,16 @@ int main (int argc, char ** argv)
SET(field_injector_arg, "p->f1,\n");
SET(field_inject_settings, "if (p->f1 != NULL)\n p->__M.arg_switches[0] = p->f1;\n");
test_one();
+
+ SET(spec, "{(name):|f1|, (type):{ (base):|int| }, (inject_if_not):10}");
+ SET(field_struct, "int f1;\n");
+ SET(field_cleanup, "//p->f1 is a scalar\n");
+ SET(field_extractor, "\"(f1):d,\"\n");
+ SET(field_extractor_arg, "&p->f1,\n");
+ SET(field_injector, "\"(f1):d,\"\n");
+ SET(field_injector_arg, "&p->f1,\n");
+ SET(field_inject_settings, "if (p->f1 != 10)\n p->__M.arg_switches[0] = &p->f1;\n");
+ test_one();
return 0;
}
|
af_xdp: fix xsk_socket__delete left un-cleanup
Type: fix
while xsk fd closed by clib_file_del_by_index fisrt,
xsk_get_mmap_offsets will get wrong off in xsk_socket__delete,
so munmap wrong place. | @@ -101,9 +101,6 @@ af_xdp_delete_if (vlib_main_t * vm, af_xdp_device_t * ad)
ethernet_delete_interface (vnm, ad->hw_if_index);
}
- for (i = 0; i < ad->rxq_num; i++)
- clib_file_del_by_index (&file_main, vec_elt (ad->rxqs, i).file_index);
-
for (i = 0; i < ad->txq_num; i++)
clib_spinlock_free (&vec_elt (ad->txqs, i).lock);
@@ -113,6 +110,9 @@ af_xdp_delete_if (vlib_main_t * vm, af_xdp_device_t * ad)
vec_foreach (umem, ad->umem)
xsk_umem__delete (*umem);
+ for (i = 0; i < ad->rxq_num; i++)
+ clib_file_del_by_index (&file_main, vec_elt (ad->rxqs, i).file_index);
+
if (ad->bpf_obj)
{
bpf_set_link_xdp_fd (ad->linux_ifindex, -1, 0);
|
reformat-markdown bug? | @@ -226,8 +226,7 @@ kdbkey {'system/sw/samba/#0/current/global/workgroup':
> Note, that the specification (in both examples above) actually lands up in
> `spec/sw/samba/#0/current/global/workgroup`. The unique path to the
> configuration setting is `/sw/samba/#0/current/global/workgroup`, but
-> the specification gets written to the [namespace](/doc/tutorial/namespaces.md)
-> `spec`, while the system-configuration gets written to the namespace `system`.
+> the specification gets written to the [namespace](/doc/tutorial/namespaces.md) > `spec`, while the system-configuration gets written to the namespace `system`.
## Conclusion
|
Fix error on autoLabel for some text events | @@ -4,7 +4,7 @@ const id = "EVENT_TEXT";
const groups = ["EVENT_GROUP_DIALOGUE"];
const autoLabel = (fetchArg, args) => {
- if ((args.text || []).join()) {
+ if (([].concat(args.text) || []).join()) {
return l10n("FIELD_TEXT_LABEL", {
text: fetchArg("text"),
});
|
vagrant: use nearby mirrors | #!/usr/bin/env bash
+# Use nearby mirrors.
+sudo sed -i -e 's#http://archive.ubuntu.com/ubuntu#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list
+
# Install i386 binary support on x64 system and required tools
sudo dpkg --add-architecture i386
sudo add-apt-repository --yes ppa:mosquitto-dev/mosquitto-ppa
|
Add warning about start-server on Windows. | @@ -121,3 +121,11 @@ New Features
Note that the new request metrics is still a work in progress and may be
modified or enhanced, causing breaking changes in the format of data
returned.
+
+* Hidden experimental support for running ``mod_wsgi-express start-server``
+ on Windows. It will not show in list of sub commands ``mod_wsgi-express``
+ accepts on Windows, but it is there. There are still various issues that
+ need to be sorted out but need assistance from someone who knows more
+ about programming Python on Windows and Windows programming in general to
+ get it all working properly. If you are interested in helping, reach out
+ on the mod_wsgi mailing list.
|
Docs:Update Overall Design en
In BoAT implementation framework Section,the interface layer(#106 ) statement is wrong. The protocol layer(#107 ) and the RPC layer(#108 ) are not made clear. | @@ -37,9 +37,9 @@ Figure 3-1 The position of BoAT in the blockchain interactive network<br>
## BoAT implementation framework
BoAT follows a hierarchical design, which is divided into interface layer, protocol layer, RPC layer, hardware dependency layer, general tools and utility programs. among them:
-+ The interface provided by the interface layer is for users to call to access the corresponding blockchain.
-+ The protocol layer provides services to the interface layer.
-+ The RPC layer provides services to the protocol layer.
++ The interface provided by the interface layer is for users to access the corresponding blockchain..
++ The protocol layer provides blockchain adpatation services to the interface layer.
++ The RPC layer provides remote process call services to the protocol layer.
+ The hardware dependency layer provides encryption, signature, storage and other services for the wallet at the interface layer.
+ The general tool layer is used to generate the C language interface of the smart contract and provide services such as data encoding and format conversion for the remaining layers.
+ The utility program provides services such as data format conversion, message encoding and decoding to each layer.
|
Makefile: Wno-format-truncation | @@ -26,7 +26,7 @@ LD = $(CC)
BIN := honggfuzz
HFUZZ_CC_BINS := hfuzz_cc/hfuzz-clang hfuzz_cc/hfuzz-clang++ hfuzz_cc/hfuzz-gcc hfuzz_cc/hfuzz-g++
HFUZZ_CC_SRCS := hfuzz_cc/hfuzz-cc.c
-COMMON_CFLAGS := -D_GNU_SOURCE -Wall -Werror -Wframe-larger-than=131072
+COMMON_CFLAGS := -D_GNU_SOURCE -Wall -Werror -Wframe-larger-than=131072 -Wno-format-truncation
COMMON_LDFLAGS := -lm libcommon/libcommon.a
COMMON_SRCS := $(sort $(wildcard *.c))
CFLAGS ?= -O3
|
Cleanup PSA ifdefs for CBC block mode
Try to make these definitions clearer given the complexity of the
mapping between the PSA config options and the MBEDTLS ones. | @@ -333,26 +333,20 @@ extern "C" {
#if defined(PSA_WANT_ALG_CBC_NO_PADDING) || defined(PSA_WANT_ALG_CBC_PKCS7)
#define MBEDTLS_CIPHER_MODE_CBC
-#if defined(PSA_WANT_ALG_CBC_PKCS7)
-#define MBEDTLS_CIPHER_PADDING_PKCS7
-#endif /* PSA_WANT_ALG_CBC_PKCS7 */
#endif /* PSA_WANT_ALG_CBC_NO_PADDING || PSA_WANT_ALG_CBC_PKCS7 */
#if defined(PSA_WANT_ALG_CBC_NO_PADDING)
#if !defined(MBEDTLS_PSA_ACCEL_ALG_CBC_NO_PADDING) || \
- defined(PSA_HAVE_SOFT_KEY_TYPE_AES) || \
- defined(PSA_HAVE_SOFT_KEY_TYPE_DES) || \
- defined(PSA_HAVE_SOFT_KEY_TYPE_CAMELLIA)
+ defined(PSA_HAVE_SOFT_BLOCK_CIPHER)
#define MBEDTLS_PSA_BUILTIN_ALG_CBC_NO_PADDING 1
#endif
#endif /* PSA_WANT_ALG_CBC_NO_PADDING */
#if defined(PSA_WANT_ALG_CBC_PKCS7)
#if !defined(MBEDTLS_PSA_ACCEL_ALG_CBC_PKCS7) || \
- defined(PSA_HAVE_SOFT_KEY_TYPE_AES) || \
- defined(PSA_HAVE_SOFT_KEY_TYPE_DES) || \
- defined(PSA_HAVE_SOFT_KEY_TYPE_CAMELLIA)
+ defined(PSA_HAVE_SOFT_BLOCK_CIPHER)
#define MBEDTLS_PSA_BUILTIN_ALG_CBC_PKCS7 1
+#define MBEDTLS_CIPHER_PADDING_PKCS7
#endif
#endif /* PSA_WANT_ALG_CBC_PKCS7 */
|
Adds max probe_count to gpsegwalrep.py FTS probes
Previously, gpsegwalrep.py would wait indefinitely until the FTS probe
transitioned into an expected state. This commit adds a maximum probe_count | @@ -365,12 +365,13 @@ def defargs():
return parser.parse_args()
-def ForceFTSProbeScan(cluster_configuration, expected_mirror_status = None):
+def ForceFTSProbeScan(cluster_configuration, expected_mirror_status = None, max_probes=2000):
'''Force FTS probe scan to reflect primary and mirror status in catalog.'''
commands = []
commands.append("psql postgres -c \"SELECT gp_request_fts_probe_scan()\"")
+ probe_count = 1
# if the expected_mirror_status is not None, we wait until the mirror status is updated
while(True):
runcommands(commands, "Force FTS probe scan", "FTS probe refreshed catalog")
@@ -383,6 +384,13 @@ def ForceFTSProbeScan(cluster_configuration, expected_mirror_status = None):
if (cluster_configuration.check_mirror_status(expected_mirror_status)):
return
+ if probe_count >= max_probes:
+ print("ERROR: Server did not trasition to expected_mirror_status %s within %d probe attempts"
+ % (expected_mirror_status, probe_count))
+ sys.exit(1)
+
+ probe_count += 1
+
time.sleep(0.1)
if __name__ == "__main__":
|
Remove extraneous break | @@ -191,7 +191,6 @@ bool lib_loaded(const std::string& lib) {
auto sym = read_symlink(file.c_str());
if (sym.find(lib) != std::string::npos) {
return true;
- break;
}
}
return false;
|
story: fix output formatting in `+story-log` | :: There are two recursions in the log file:
:: 1. the outer loop, `commit-loop` which threads downwards into each commit by ancestor
:: 2. the inner loop, `ancestor-loop`, which threads left-to-right on reverse-ancestors
+::
+:: +story-log outputs a tang with the least-recent commits at the head of the list,
+:: even though we want most-recent commits to end up printing first.
+:: But because dojo prints tangs in reverse, we don't flop the results
::::
++ story-log
|= [[our=ship syd=^desk cas=case] current-commit=yaki:clay tale=story]
^- tang
- ::
- %- flop :: least-recent-first -> most-recent-first
%- head :: result from state
=| state=[result=tang mergebase=(unit tako:clay)]
|-
?- reverse-ancestors
~
:: stop here and return the current message
- =/ msg=(unit cord) (msg-from-commit current-commit tale)
- [?~(msg result.state [u.msg result.state]) mergebase=~]
+ =/ msg=(list cord) (msg-from-commit current-commit tale)
+ [(weld msg result.state) mergebase=~]
::
[tako:clay ~]
=/ parent=tako:clay i.reverse-ancestors
:: Otherwise, record the current message if exists
?: ?&(?=(^ mergebase.state) =(u.mergebase.state r.current-commit))
[result=result.state mergebase=~]
- commit-loop(current-commit parent-commit, result.state ?~(msg result.state [u.msg result.state]))
+ commit-loop(current-commit parent-commit, result.state (weld msg result.state))
::
[tako:clay tako:clay ~]
::
=/ mainline=tako:clay i.t.reverse-ancestors
=/ mergebases .^((list tako:clay) %cs /(scot %p our)/[syd]/(scot cas)/base-tako/(scot %uv mainline)/(scot %uv sideline)) :: XX base-tako ignores beak
=/ next-mergebase=(unit tako:clay) ?~(mergebases ~ (some i.mergebases)) :: take the first valid mergebase (by convention) if exists, else none
+ :: ~& "Debug: Mergebase is null? {<=(~ next-mergebase)>}"
=/ sideline-commit=yaki:clay .^(yaki:clay %cs /(scot %p our)/[syd]/(scot cas)/yaki/(scot %uv sideline))
=/ mainline-commit=yaki:clay .^(yaki:clay %cs /(scot %p our)/[syd]/(scot cas)/yaki/(scot %uv mainline))
- =/ msg=(unit cord) (msg-from-commit current-commit tale)
+ =/ msg=(list cord) (msg-from-commit current-commit tale)
::
:: 1 - process current commit
:: 2 - recur and queue processing on all commits on the sideline
:: Because mainline messages are cons'd to result last, they are
:: (by definition) towards the less recent side of the resulting flopped list
::
- =. state [result=?~(msg result.state [u.msg result.state]) mergebase=next-mergebase] :: 1
+ =. state [result=(weld msg result.state) mergebase=next-mergebase] :: 1
=. state commit-loop(current-commit sideline-commit) :: 2
=. state commit-loop(current-commit mainline-commit) :: 3
state
::
++ msg-from-commit
|= [commit=yaki:clay tale=story]
- ^- (unit cord)
+ ^- (list cord)
=/ proses (~(get by tale) r.commit)
?~ proses ~
- %- some
+ %- flop :: fix formatting reversal in dojo
+ %- to-wain:format
%- crip
;: welp
(tako-to-text:lib r.commit)
|
Have RAC CRange's go up to COffMax | @@ -89,9 +89,7 @@ visited for any given request `[di .. dj)`.
`Range` is a pair of byte offsets `[i .. j)`, in either `CSpace` or `DSpace`.
It is half-open, containing every byte offset `x` such that `(i <= x)` and `(x
-< j)`. The size of a `Range` equals `(j - i)` if `(j > i)`, otherwise it equals
-zero. Having `(j <= i)` is valid, and means an empty `Range`: one with zero
-size. There are many valid `[i .. j)` pairs that mean an empty range.
+< j)`. It is invalid to have `(i > j)`. The size of a `Range` equals `(j - i)`.
All bytes are 8 bits and unless explicitly specified otherwise, all fixed-size
unsigned integers (e.g. `uint32_t`, `uint64_t`) are encoded little-endian.
@@ -99,7 +97,7 @@ Within those unsigned integers, bit 0 is the least significant bit and e.g. bit
31 is the most significant bit of a `uint32_t`.
The maximum supported `CFileSize` and the maximum supported `DFileSize` are the
-same number: `0xFFFFFFFFFFFFFF`, which is `((1 << 56) - 1)`.
+same number: `0xFF_FFFF_FFFF_FFFF`, which is `((1 << 56) - 1)`.
## File Structure
@@ -229,23 +227,22 @@ half-open range `[0xC0 .. 0xFE)` is reserved. Otherwise, the child is a `Leaf
Node`.
A child `Branch Node`'s `SubBranch COffset` is defined to be `COff[a]`. Its
-`COff[a+1]` value is ignored. Its `SubBranch DBias` and `SubBranch DOffMax` are
-defined to be `DOff[a]` and `DOff[a+1].
+`SubBranch DBias` and `SubBranch DOffMax` are defined to be `DOff[a]` and
+`DOff[a+1].
- When `(STag[a] < Arity)`, it is a `CBiasing Branch Node`. The `SubBranch
- CBias` is defined to be `(Branch_CBias + CPtr[STag[a]])`.
+ CBias` is defined to be `(Branch_CBias + CPtr[STag[a]])`. This expression
+ is equivalent to `COff[STag[a]]`.
- When `(STag[a] >= Arity)`, it is a `CNeutral Branch Node`. The `SubBranch
CBias` is defined to be `(Branch_CBias)`.
A child `Leaf Node`'s `STag[a]` and `TTag[a]` values are also called its `Leaf
STag` and `Leaf TTag`. It also has:
- - A `Primary CRange`, equal to `[COff[a] .. COff[a+1])`. Recall that it is
- valid for a `Range`'s upper bound to be less than its lower bound, meaning
- an empty `Range`.
- - A `Secondary CRange`, equal to `[COff[STag[a]] .. COff[STag[a]+1])` when
+ - A `Primary CRange`, equal to `[COff[a] .. COffMax)`.
+ - A `Secondary CRange`, equal to `[COff[STag[a]] .. COffMax)` when
`(STag[a] < Arity)`. If `(STag[a] >= Arity)` then the `Secondary CRange` is
- the canonical empty range `[0 .. 0)`.
+ the empty range `[COffMax .. COffMax)`.
- A `Tertiary CRange`, similar to the `Secondary CRange`, but using `TTag[a]`
instead of `STag[a]`.
|
gpu: tally waits for query results; | @@ -1600,7 +1600,7 @@ void gpu_copy_texture_buffer(gpu_stream* stream, gpu_texture* src, gpu_buffer* d
}
void gpu_copy_tally_buffer(gpu_stream* stream, gpu_tally* src, gpu_buffer* dst, uint32_t srcIndex, uint32_t dstOffset, uint32_t count, uint32_t stride) {
- vkCmdCopyQueryPoolResults(stream->commands, src->handle, srcIndex, count, dst->handle, dstOffset, stride, 0);
+ vkCmdCopyQueryPoolResults(stream->commands, src->handle, srcIndex, count, dst->handle, dstOffset, stride, VK_QUERY_RESULT_WAIT_BIT);
}
void gpu_clear_buffer(gpu_stream* stream, gpu_buffer* buffer, uint32_t offset, uint32_t size) {
|
[examples] curious ref file | @@ -241,7 +241,7 @@ int main(int argc, char* argv[])
// Comparison with a reference file
SimpleMatrix dataPlotRef(dataPlot);
dataPlotRef.zero();
- ioMatrix::read("BouncingBallTwoContactsED.cpp", "ascii", dataPlotRef);
+ ioMatrix::read("BouncingBallTwoContactsED.ref", "ascii", dataPlotRef);
std:: cout << " Error ="<< (dataPlot - dataPlotRef).normInf() << std::endl;
@@ -256,10 +256,12 @@ int main(int argc, char* argv[])
catch (SiconosException e)
{
cout << e.report() << endl;
+ return 1;
}
catch (...)
{
cout << "Exception caught." << endl;
+ return 1;
}
cout << "Computation Time: " << time.elapsed() << endl;
}
|
[finsh] Add lwip 2.0.0 support. | @@ -314,6 +314,9 @@ FINSH_FUNCTION_EXPORT_ALIAS(cmd_ifconfig, __cmd_ifconfig, list the information o
#ifdef RT_LWIP_DNS
#include <lwip/api.h>
#include <lwip/dns.h>
+#include <lwip/ip_addr.h>
+#include <lwip/init.h>
+
int cmd_dns(int argc, char **argv)
{
extern void set_dns(char* dns_server);
@@ -321,12 +324,22 @@ int cmd_dns(int argc, char **argv)
if (argc == 1)
{
int index;
- struct ip_addr ip_addr;
+
+#if (LWIP_VERSION) < 0x02000000U
+ ip_addr_t ip_addr;
+ for(index=0; index<DNS_MAX_SERVERS; index++)
+ {
+ ip_addr = dns_getserver(index);
+ rt_kprintf("dns server #%d: %s\n", index, ipaddr_ntoa(&ip_addr));
+ }
+#else
+ const ip_addr_t *ip_addr;
for(index=0; index<DNS_MAX_SERVERS; index++)
{
ip_addr = dns_getserver(index);
- rt_kprintf("dns server #%d: %s\n", index, ipaddr_ntoa(&(ip_addr)));
+ rt_kprintf("dns server #%d: %s\n", index, ipaddr_ntoa(ip_addr));
}
+#endif
}
else if (argc == 2)
{
|
Fix array indexation in copy, and fix test (Reference-LAPACK PR764) | *
SRNAMT = 'CLATRS3'
CALL CCOPY( N, X, 1, B, 1 )
- CALL CCOPY( N, X, 1, B, 1 )
+ CALL CCOPY( N, X, 1, B( N+1 ), 1 )
CALL CSCAL( N, BIGNUM, B( N+1 ), 1 )
CALL CLATRS3( UPLO, TRANS, DIAG, 'N', N, 2, A, LDA,
$ B, MAX(1, N), SCALE3, RWORK, WORK, NMAX,
*
IF( INFO.NE.0 )
$ CALL ALAERH( PATH, 'CLATRS3', INFO, 0,
- $ UPLO // TRANS // DIAG // 'Y', N, N,
+ $ UPLO // TRANS // DIAG // 'N', N, N,
$ -1, -1, -1, IMAT, NFAIL, NERRS, NOUT )
CALL CTRT03( UPLO, TRANS, DIAG, N, 1, A, LDA,
$ SCALE3( 1 ), RWORK, ONE, B( 1 ), LDA,
CALL CSSCAL( N, BIGNUM, X, 1 )
CALL CTRT03( UPLO, TRANS, DIAG, N, 1, A, LDA,
$ SCALE3( 2 ), RWORK, ONE, B( N+1 ), LDA,
- $ X, LDA, WORK, RESULT( 10 ) )
+ $ X, LDA, WORK, RES )
RESULT( 10 ) = MAX( RESULT( 10 ), RES )
*
* Print information about the tests that did not pass
|
changed response of getLoadedAccountsList to JSON string | @@ -31,8 +31,7 @@ struct loaded_accounts_response parseForLoadedAccountsListResponse(char* respons
} else {
secFree(_status);
oidc_errno = OIDC_SUCCESS;
- char *accounts = JSONArrayStringToDelimitedString(_info, "||");
- return (struct loaded_accounts_response){accounts};
+ return (struct loaded_accounts_response){_info};
}
}
|
fuzz: better way of going around the list of dynamic files | @@ -68,7 +68,6 @@ static void fuzz_getFileName(honggfuzz_t* hfuzz, fuzzer_t* fuzzer)
static bool fuzz_prepareFileDynamically(honggfuzz_t* hfuzz, fuzzer_t* fuzzer)
{
fuzzer->origFileName = "[DYNAMIC]";
- struct dynfile_t* dynfile;
{
MX_SCOPED_RWLOCK_READ(&hfuzz->dynfileq_mutex);
@@ -79,16 +78,19 @@ static bool fuzz_prepareFileDynamically(honggfuzz_t* hfuzz, fuzzer_t* fuzzer)
"coverage and/or CPU counters");
}
- if (fuzzer->dynfileqCurrent == NULL
- || fuzzer->dynfileqCurrent == TAILQ_LAST(&hfuzz->dynfileq, dyns_t)) {
+ if (fuzzer->dynfileqCurrent == NULL) {
fuzzer->dynfileqCurrent = TAILQ_FIRST(&hfuzz->dynfileq);
- }
- dynfile = fuzzer->dynfileqCurrent;
+ } else {
+ if (fuzzer->dynfileqCurrent == TAILQ_LAST(&hfuzz->dynfileq, dyns_t)) {
+ fuzzer->dynfileqCurrent = TAILQ_FIRST(&hfuzz->dynfileq);
+ } else {
fuzzer->dynfileqCurrent = TAILQ_NEXT(fuzzer->dynfileqCurrent, pointers);
}
+ }
+ }
- memcpy(fuzzer->dynamicFile, dynfile->data, dynfile->size);
- fuzzer->dynamicFileSz = dynfile->size;
+ memcpy(fuzzer->dynamicFile, fuzzer->dynfileqCurrent->data, fuzzer->dynfileqCurrent->size);
+ fuzzer->dynamicFileSz = fuzzer->dynfileqCurrent->size;
mangle_mangleContent(hfuzz, fuzzer);
|
Updates to ASE Makefile for Quartus 17.1.1 | @@ -100,8 +100,8 @@ GLS_VERILOG_OPT = $(QUARTUS_HOME)/eda/sim_lib/altera_primitives.v
GLS_VERILOG_OPT+= $(QUARTUS_HOME)/eda/sim_lib/220model.v
GLS_VERILOG_OPT+= $(QUARTUS_HOME)/eda/sim_lib/sgate.v
GLS_VERILOG_OPT+= $(QUARTUS_HOME)/eda/sim_lib/altera_mf.v
-GLS_VERILOG_OPT+= $(QUARTUS_HOME)/eda/sim_lib/stratixv_hssi_atoms.v
-GLS_VERILOG_OPT+= $(QUARTUS_HOME)/eda/sim_lib/stratixv_pcie_hip_atoms.v
+#GLS_VERILOG_OPT+= $(QUARTUS_HOME)/eda/sim_lib/stratixv_hssi_atoms.v
+#GLS_VERILOG_OPT+= $(QUARTUS_HOME)/eda/sim_lib/stratixv_pcie_hip_atoms.v
GLS_VERILOG_OPT+= $(QUARTUS_HOME)/eda/sim_lib/altera_lnsim.sv
# add required files for local memory model
|
Make harness a bit more tolerant for accepting output | @@ -133,7 +133,7 @@ class Harness:
lines = rf.readlines()
for idx, line in enumerate(lines):
if line.strip() == "root (nd)" or \
- line.strip().startswith("Kernel starting at address"):
+ "Barrelfish CPU driver starting" in line.strip():
break
if idx > 0:
with open(boot_file_name, 'w') as wf:
|
AltGR fix in the Code Editor | @@ -891,7 +891,7 @@ static void processKeyboard(Code* code)
{
tic_mem* tic = code->tic;
- if(tic->ram.input.keyboard.data == 0) return;
+ if(tic->ram.input.keyboard.data == 0 || tic->ram.input.keyboard.text != 0) return;
switch(getClipboardEvent(0))
{
@@ -1044,7 +1044,6 @@ static void textEditTick(Code* code)
processKeyboard(code);
- if(!tic->api.key(tic, tic_key_ctrl) && !tic->api.key(tic, tic_key_alt))
{
char sym = tic->ram.input.keyboard.text;
|
gftp-gtk.c: forget last dir if remember_last_directory == 0 | @@ -99,6 +99,13 @@ _gftp_exit (GtkWidget * widget, gpointer data)
tempstr = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window2.dir_combo));
gftp_set_global_option ("remote_startup_directory", tempstr);
}
+ else
+ {
+ // problem: last_directory is always set, we must forget it
+ // until remember_last_directory=1 again
+ gftp_set_global_option ("local_startup_directory", "");
+ gftp_set_global_option ("remote_startup_directory", "");
+ }
tempstr = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(toolbar_combo_protocol));
gftp_set_global_option ("default_protocol", tempstr);
|
more robust id heap test; mix allocs and frees and churn aplenty | #define MAX_PAGE_ORDER 12
#define LENGTH_ORDER 16
+#define RANDOM_TEST_PASSES 100
static boolean basic_test(heap h)
{
@@ -50,7 +51,7 @@ static boolean basic_test(heap h)
}
#define VEC_LEN 64
-static boolean random_test(heap h, u64 page_order)
+static boolean random_test(heap h, u64 page_order, int churn)
{
int max_order = page_order + 4; /* up to 16 pages; arbitrary */
int alloc_size_vec[VEC_LEN];
@@ -71,10 +72,19 @@ static boolean random_test(heap h, u64 page_order)
msg_debug("*** allocated id heap %p at length %d (%d pages), pagesize %d\n",
id, length, length / pagesize, pagesize);
+ do {
+ int start;
+
+ start = random_u64() % VEC_LEN; /* change up start and end points */
for (int i=0; i < VEC_LEN; i++) {
- alloc_result_vec[i] = allocate_u64(id, alloc_size_vec[i]);
- if (alloc_result_vec[i] == INVALID_PHYSICAL) {
- msg_err("alloc of size %d failed\n", alloc_size_vec[i]);
+ int o = (i + start) % VEC_LEN;
+ if (alloc_result_vec[o])
+ continue;
+
+ alloc_result_vec[o] = allocate_u64(id, alloc_size_vec[o]);
+// msg_debug("alloc %d, size %d, result %P\n", o, alloc_size_vec[o], alloc_result_vec[o]);
+ if (alloc_result_vec[o] == INVALID_PHYSICAL) {
+ msg_err("alloc of size %d failed\n", alloc_size_vec[o]);
goto fail;
}
}
@@ -99,9 +109,19 @@ static boolean random_test(heap h, u64 page_order)
}
/* free */
+ start = random_u64() % VEC_LEN;
for (int i=0; i < VEC_LEN; i++) {
- deallocate_u64(id, alloc_result_vec[i], alloc_size_vec[i]);
+ /* selectively deallocate if multiple passes */
+ if (churn > 0 && (random_u64() & 0x1))
+ continue;
+ int o = (i + start) % VEC_LEN;
+ if (alloc_result_vec[o]) {
+// msg_debug("dealloc %d, size %d\n", o, alloc_size_vec[o]);
+ deallocate_u64(id, alloc_result_vec[o], alloc_size_vec[o]);
+ alloc_result_vec[o] = 0;
+ }
}
+ } while(churn-- > 0);
id->destroy(id);
@@ -122,7 +142,7 @@ int main(int argc, char **argv)
goto fail;
for (int order=0; order < 13; order++) {
- if (!random_test(h, order))
+ if (!random_test(h, order, RANDOM_TEST_PASSES))
goto fail;
}
|
ToolStatus: Remove unused code (searchbox autocomplete) | @@ -1294,64 +1294,6 @@ LRESULT CALLBACK MainWndSubclassProc(
}
}
break;
- case WM_MEASUREITEM:
- {
- LPMEASUREITEMSTRUCT drawInfo = (LPMEASUREITEMSTRUCT)lParam;
-
- if (drawInfo->CtlType == ODT_COMBOBOX)
- {
- drawInfo->itemHeight = 16;
- }
- }
- break;
- case WM_DRAWITEM:
- {
- LPDRAWITEMSTRUCT drawInfo = (LPDRAWITEMSTRUCT)lParam;
-
- if (drawInfo->hwndItem == SearchboxHandle && drawInfo->CtlType == ODT_COMBOBOX)
- {
- INT length;
- PPH_STRING text;
-
- if (!(length = ComboBox_GetLBTextLen(drawInfo->hwndItem, drawInfo->itemID)))
- break;
-
- SetBkMode(drawInfo->hDC, TRANSPARENT);
-
- if ((drawInfo->itemState & CDIS_SELECTED) == CDIS_SELECTED)
- {
- SetTextColor(drawInfo->hDC, GetSysColor(COLOR_HIGHLIGHTTEXT));
- SetDCBrushColor(drawInfo->hDC, RGB(78, 78, 78));
-
- FillRect(drawInfo->hDC, &drawInfo->rcItem, GetStockObject(DC_BRUSH));
- }
- else
- {
- SetTextColor(drawInfo->hDC, RGB(0x0, 0x0, 0x0));
- SetDCBrushColor(drawInfo->hDC, RGB(0xff, 0xff, 0xff));
-
- FillRect(drawInfo->hDC, &drawInfo->rcItem, GetStockObject(DC_BRUSH));
-
- //SetDCBrushColor(drawInfo->hDC, RGB(0xff, RGB(43, 43, 43));
- //SetTextColor(drawInfo->hDC, GetSysColor(COLOR_HIGHLIGHTTEXT));
- }
-
- text = PhCreateStringEx(NULL, length * sizeof(WCHAR));
- ComboBox_GetLBText(drawInfo->hwndItem, drawInfo->itemID, text->Buffer);
-
- drawInfo->rcItem.left += 5;
- DrawText(
- drawInfo->hDC,
- text->Buffer,
- (INT)text->Length / sizeof(WCHAR),
- &drawInfo->rcItem,
- DT_LEFT | DT_VCENTER | DT_SINGLELINE | DT_WORD_ELLIPSIS
- );
-
- PhDereferenceObject(text);
- }
- }
- break;
}
return DefSubclassProc(hWnd, uMsg, wParam, lParam);
|
right names for plots in calc_feature_statistics | @@ -2170,14 +2170,14 @@ class CatBoost(_CatBoostBase):
Parameters
----------
- feature: None, int, string, or list of int or strings
- Features indexes or names in pd.DataFrame for which you want to get statistics.
- None, if you need statistics for all features.
data: numpy.array or pandas.DataFrame or catboost.Pool
Data to compute statistics on
target: numpy.array or pandas.Series or None
Target corresponding to data
Use only if data is not catboost.Pool.
+ feature: None, int, string, or list of int or strings
+ Features indexes or names in pd.DataFrame for which you want to get statistics.
+ None, if you need statistics for all features.
prediction_type: str
Prediction type used for counting mean_prediction: 'Class', 'Probability' or 'RawFormulaVal'.
If not specified, is derived from the model.
@@ -2309,9 +2309,10 @@ class CatBoost(_CatBoostBase):
if plot or plot_file is not None:
warn_msg = "To draw binarized feature statistics you should install plotly."
figs = []
- for feature_name in statistics_by_feature:
+ for feature_num in statistics_by_feature:
+ feature_name = self.feature_names_[feature_num]
figs += _plot_feature_statistics(
- statistics_by_feature[feature_name],
+ statistics_by_feature[feature_num],
feature_name,
max_cat_features_on_plot
)
|
lv_ddlist: fix original selected option not restoring on escape | @@ -701,6 +701,7 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par
} else if(c == LV_GROUP_KEY_ESC) {
if(ext->opened) {
ext->opened = 0;
+ ext->sel_opt_id = ext->sel_opt_id_ori;
lv_ddlist_refr_size(ddlist, true);
}
}
|
merge -V into -h | @@ -784,8 +784,12 @@ USAGE: h2olog -p PID
h2olog quic -p PID
h2olog quic -t event_type -p PID
h2olog quic -v -s response_header_name -p PID
- h2olog [-h] [-V] [-d] // help / version / debug
-""".strip())
+ h2olog [-h] [-d] // help / debug
+
+h2olog version %s
+Platform: %s
+BCC: %s
+""".strip() % (version, platform.platform(), bcc_version))
exit()
def trace_http():
@@ -826,15 +830,10 @@ try:
allowed_res_header_name = set()
verbose = False
debug = False
- opts, args = getopt.getopt(sys.argv[optidx:], 'hVvp:t:s:d')
+ opts, args = getopt.getopt(sys.argv[optidx:], 'hvp:t:s:d')
for opt, arg in opts:
if opt == "-h":
usage()
- elif opt == "-V":
- print("h2olog version %s" % version)
- print("Platform: %s" % platform.platform())
- print("BCC: %s" % bcc_version)
- sys.exit()
elif opt == "-p":
h2o_pid = arg
elif opt == "-t":
|
mangle: exprand() based on an idea by | @@ -46,7 +46,10 @@ static inline size_t mangle_LenLeft(run_t* run, size_t off) {
return (run->dynfile->size - off - 1);
}
-/* Get a random value <1:max>, but prefer smaller ones - up to 8KiB */
+/*
+ * Get a random value <1:max>, but prefer smaller ones
+ * Based on an idea by https://twitter.com/gamozolabs
+ */
static inline size_t mangle_getLen(size_t max) {
if (max > _HF_INPUT_MAX_SIZE) {
LOG_F("max (%zu) > _HF_INPUT_MAX_SIZE (%zu)", max, (size_t)_HF_INPUT_MAX_SIZE);
@@ -59,24 +62,12 @@ static inline size_t mangle_getLen(size_t max) {
}
/* Give 50% chance the the uniform distribution */
- switch (util_rndGet(0, 11)) {
- case 0:
- return (size_t)util_rndGet(1, HF_MIN(8, max));
- case 1:
- return (size_t)util_rndGet(1, HF_MIN(32, max));
- case 2:
- return (size_t)util_rndGet(1, HF_MIN(128, max));
- case 3:
- return (size_t)util_rndGet(1, HF_MIN(512, max));
- case 4:
- return (size_t)util_rndGet(1, HF_MIN(2048, max));
- case 5:
- return (size_t)util_rndGet(1, HF_MIN(8192, max));
- default:
- break;
+ if (util_rnd64() & 1) {
+ return (size_t)util_rndGet(1, max);
}
- return (size_t)util_rndGet(1, max);
+ /* effectively exprand() */
+ return (size_t)util_rndGet(1, util_rndGet(1, max));
}
/* Prefer smaller values here, so use mangle_getLen() */
@@ -172,15 +163,15 @@ static void mangle_MemSwap(run_t* run, bool printable HF_ATTR_UNUSED) {
for (size_t i = 0; i < (len / 2); i++) {
/*
* First - from the head, next from the tail. Don't worry about layout of the overlapping
- * part - there's no good solution to that, ond it can be left somewhat scrambled,
- * still preserving the entropy
+ * part - there's no good solution to that, and it can be left somewhat scrambled,
+ * while still preserving the entropy
*/
const uint8_t tmp1 = run->dynfile->data[off2 + i];
run->dynfile->data[off2 + i] = run->dynfile->data[off1 + i];
run->dynfile->data[off1 + i] = tmp1;
- const uint8_t tmp2 = run->dynfile->data[off2 + len - (i + 1)];
- run->dynfile->data[off2 + len - (i + 1)] = run->dynfile->data[off1 + len - (i + 1)];
- run->dynfile->data[off1 + len - (i + 1)] = tmp2;
+ const uint8_t tmp2 = run->dynfile->data[off2 + (len - 1) - i];
+ run->dynfile->data[off2 + (len - 1) - i] = run->dynfile->data[off1 + (len - 1) - i];
+ run->dynfile->data[off1 + (len - 1) - i] = tmp2;
}
}
|
Update .travis.yml for docker deploy | matrix:
include:
- - python: '2.7'
+ - python: '3.6'
sudo: required
services:
- docker
env: DOCKER_IMAGE=quay.io/pypa/manylinux1_x86_64
DOCKER_DEPLOY='manylinux1_x86_64'
- TRAVIS_PYTHON_VERSION='2.7'
- - python: '2.7'
+ TRAVIS_PYTHON_VERSION='3.6'
+ PLAT=manylinux1_x86_64
+ - python: '3.6'
sudo: required
services:
- docker
env: DOCKER_IMAGE=quay.io/pypa/manylinux1_i686
PRE_CMD=linux32
DOCKER_DEPLOY='manylinux1_i686'
- TRAVIS_PYTHON_VERSION='2.7'
+ TRAVIS_PYTHON_VERSION='3.6'
+ PLAT=manylinux1_i686
+ - python: '3.6'
+ sudo: required
+ services:
+ - docker
+ env: DOCKER_IMAGE=quay.io/pypa/manylinux2010_x86_64
+ DOCKER_DEPLOY='manylinux2010_x86_64'
+ TRAVIS_PYTHON_VERSION='3.6'
+ PLAT=manylinux2010_x86_64
- python: '2.7'
sudo: false
env: DOCKER_DEPLOY=false
@@ -60,7 +70,7 @@ install:
docker pull $DOCKER_IMAGE;
cd python;
cp -a ../src .;
- docker run --rm -v `pwd`:/io $DOCKER_IMAGE $PRE_CMD /io/build-wheels.sh;
+ docker run --rm -e PLAT=$PLAT -v `pwd`:/io $DOCKER_IMAGE $PRE_CMD /io/travis/build-wheels.sh;
ls wheelhouse/;
mkdir dist;
cp wheelhouse/spglib* dist/;
@@ -105,7 +115,7 @@ deploy:
repo: atztogo/spglib
branch: rc
tags: false
- condition: "$DOCKER_DEPLOY == manylinux1_x86_64 || $DOCKER_DEPLOY == manylinux1_i686"
+ condition: "$DOCKER_DEPLOY == manylinux1_x86_64 || $DOCKER_DEPLOY == manylinux1_i686 || $DOCKER_DEPLOY == manylinux2010_x86_64"
# testing conda
- provider: script
@@ -130,7 +140,7 @@ deploy:
repo: atztogo/spglib
branch: master
tags: false
- condition: "$DOCKER_DEPLOY == manylinux1_x86_64 || $DOCKER_DEPLOY == manylinux1_i686"
+ condition: "$DOCKER_DEPLOY == manylinux1_x86_64 || $DOCKER_DEPLOY == manylinux1_i686 || $DOCKER_DEPLOY == manylinux2010_x86_64"
# production anaconda
- provider: script
|
core/opal.c: sparse cleanup integer as NULL
Fixes:
core/opal.c:418:61: warning: Using plain integer as NULL pointer | @@ -415,7 +415,7 @@ void add_opal_node(void)
opal_event = dt_new(opal_node, "event");
dt_add_property_strings(opal_event, "compatible", "ibm,opal-event");
dt_add_property_cells(opal_event, "#interrupt-cells", 0x1);
- dt_add_property(opal_event, "interrupt-controller", 0, 0);
+ dt_add_property(opal_event, "interrupt-controller", NULL, 0);
add_opal_firmware_node();
add_associativity_ref_point();
|
VERSION bump to version 0.12.2 | @@ -32,7 +32,7 @@ set(CMAKE_C_FLAGS_DEBUG "-g -O0")
# set version
set(LIBNETCONF2_MAJOR_VERSION 0)
set(LIBNETCONF2_MINOR_VERSION 12)
-set(LIBNETCONF2_MICRO_VERSION 1)
+set(LIBNETCONF2_MICRO_VERSION 2)
set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION}.${LIBNETCONF2_MICRO_VERSION})
set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION})
|
update template engine example | import System;
-const LEFT_BRACE = "{";
-const RIGHT_BRACE = "}";
-
// Template is a simple template rendering engine.
class Template {
- private tmpl;
- private klass;
- private rendered;
+ var LEFT_BRACE = "{";
+ var RIGHT_BRACE = "}";
init(tmpl, klass) {
this.tmpl = tmpl;
@@ -19,22 +15,26 @@ class Template {
// fields and replaces them with the class values.
render() {
const classAttrs = this.klass.getAttributes()["properties"];
- this.rendered = this.tmpl;
+ var rendered = this.tmpl;
classAttrs.forEach(def(attr) => {
const attrVal = this.klass.getAttribute(attr);
- const tmplField = LEFT_BRACE+attr+RIGHT_BRACE;
+ const tmplField = "{}{}{}".format(
+ Template.LEFT_BRACE,
+ attr,
+ Template.RIGHT_BRACE
+ );
- if (this.rendered.contains(tmplField)) {
+ if (rendered.contains(tmplField)) {
if (type(attrVal) != "string") {
- this.rendered = this.rendered.replace(tmplField, attrVal.toString());
+ rendered = rendered.replace(tmplField, attrVal.toString());
} else {
- this.rendered = this.rendered.replace(tmplField, attrVal);
+ rendered = rendered.replace(tmplField, attrVal);
}
}
});
- return this.rendered;
+ return rendered;
}
}
@@ -54,5 +54,5 @@ class Person {
const t = Template(tmpl, p);
- print("{}".format(t.render()));
+ print(t.render());
}
|
Update doc/decisions/spec_expressiveness.md | @@ -17,7 +17,7 @@ We need to find minimal requirements to implement a sane spec plugin.
- no defaults for `sw/_/key` specifications
(default will not work for `ksLookup(/sw/sthg/key)`)
-- plugins are not allowed to create keys
+- plugins are not allowed to create keys (may change in future; depends on plugin positions)
The spec plugin should yield errors when it detects such situations.
|
Another fix attempt | @@ -16,4 +16,4 @@ jobs:
- name: get container
run: docker pull jeffbush001/nyuzi-build
- name: build
- run: docker run -v .:/root/NyuziProcessor -w /root/NyuziProcessor jeffbush001/nyuzi-build /bin/bash -c scripts/run_ci_tests.sh
+ run: docker run -v $(pwd):/root/NyuziProcessor -w /root/NyuziProcessor jeffbush001/nyuzi-build /bin/bash -c scripts/run_ci_tests.sh
|
wren: Remove a magic number in the compiler. | @@ -2088,7 +2088,7 @@ static void field(Compiler* compiler, bool canAssign)
{
// Initialize it with a fake value so we can keep parsing and minimize the
// number of cascaded errors.
- int field = 255;
+ int field = MAX_FIELDS;
ClassInfo* enclosingClass = getEnclosingClass(compiler);
|
Fixed Misra complaint | @@ -78,6 +78,15 @@ void rtc_set_time(timestamp_t time){
timestamp_t rtc_get_time(void){
timestamp_t result;
+ // Init with zero values in case there is no RTC running
+ result.year = 0U;
+ result.month = 0U;
+ result.day = 0U;
+ result.weekday = 0U;
+ result.hour = 0U;
+ result.minute = 0U;
+ result.second = 0U;
+
if(board_has_rtc()){
// Wait until the register sync flag is set
while((RTC->ISR & RTC_ISR_RSF) == 0){}
|
[apps] Adjust counting queues for benchmark | @@ -78,13 +78,15 @@ void blocking_queue_push(queue_t *const queue, int32_t *data) {
void counting_queue_pop(queue_t *const queue, int32_t *data,
uint32_t *counter) {
while (queue_pop(queue, data)) {
- counter++;
+ __asm__ __volatile__("");
+ (*counter)++;
};
}
void counting_queue_push(queue_t *const queue, int32_t *data,
uint32_t *counter) {
while (queue_push(queue, data)) {
- counter++;
+ __asm__ __volatile__("");
+ (*counter)++;
};
}
|
Exposed Sheth-Tormen mass function to python | @@ -60,7 +60,8 @@ mass_function_types = {
'angulo': lib.angulo,
'tinker': lib.tinker,
'tinker10': lib.tinker10,
- 'watson': lib.watson
+ 'watson': lib.watson,
+ 'shethtormen': lib.shethtormen
}
"""dict: Types of halo mass function models. The strings represent possible choices the user can specify for different halo mass function models.
|
Remove unnecessary packages from doc requirements (fix build) | @@ -3,29 +3,19 @@ Babel==2.9.1
breathe==4.33.1
certifi==2021.10.8
charset-normalizer==2.0.12
-click==8.0.3
colorama==0.4.4
-Cython==0.29.27
-distlib==0.3.4
docutils==0.17.1
-expense-parser==0.0.1
-filelock==3.6.0
idna==3.3
imagesize==1.3.0
importlib-metadata==4.11.3
Jinja2==3.0.3
-livereload @ https://github.com/lepture/python-livereload/archive/master.zip
+livereload==2.6.3
MarkupSafe==2.1.1
-numpy==1.22.2
packaging==21.3
-pandas==1.4.0
-platformdirs==2.5.1
Pygments==2.11.2
pyparsing==3.0.7
-python-dateutil==2.8.2
pytz==2021.3
requests==2.27.1
-six==1.16.0
snowballstemmer==2.2.0
Sphinx==4.4.0
sphinx-autobuild==2021.3.14
@@ -38,5 +28,4 @@ sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
tornado==6.1
urllib3==1.26.9
-virtualenv==20.13.4
zipp==3.7.0
|
Add "no existing reader gangs" assert when destroying writer gang. | @@ -93,6 +93,7 @@ static CdbComponentDatabaseInfo *findDatabaseInfoBySegIndex(
CdbComponentDatabases *cdbs, int segIndex);
static void addGangToAllocated(Gang *gp);
static Gang *getAvailableGang(GangType type, int size, int content);
+static bool readerGangsExist(void);
/*
* Create a reader gang.
@@ -1031,6 +1032,8 @@ DisconnectAndDestroyGang(Gang *gp)
if (gp == NULL)
return;
+ AssertImply(gp->type == GANGTYPE_PRIMARY_WRITER, !readerGangsExist());
+
ELOG_DISPATCHER_DEBUG("DisconnectAndDestroyGang entered: id = %d", gp->gang_id);
if (gp->allocated)
@@ -1690,6 +1693,14 @@ bool GangsExist(void)
availableReaderGangs1 != NIL);
}
+static bool
+readerGangsExist(void)
+{
+ return (allocatedReaderGangsN != NIL ||
+ availableReaderGangsN != NIL ||
+ allocatedReaderGangs1 != NIL ||
+ availableReaderGangs1 != NIL);
+}
int largestGangsize(void)
{
|
Jenkinsfile: enable debug where memcheck is run | @@ -64,8 +64,7 @@ CMAKE_FLAGS_BASE = [
CMAKE_FLAGS_BUILD_ALL = [
'BINDINGS': 'ALL;-DEPRECATED',
'PLUGINS': 'ALL;-DEPRECATED',
- 'TOOLS': 'ALL',
- 'ENABLE_DEBUG': 'ON' // TODO: remove ENABLE_DEBUG
+ 'TOOLS': 'ALL'
]
CMAKE_FLAGS_COVERAGE = ['ENABLE_COVERAGE': 'ON']
@@ -440,6 +439,7 @@ def generateMainBuildStages() {
"debian-stable-full",
DOCKER_IMAGES.stretch,
CMAKE_FLAGS_BUILD_ALL +
+ CMAKE_FLAGS_DEBUG +
CMAKE_FLAGS_BUILD_FULL +
CMAKE_FLAGS_BUILD_STATIC +
CMAKE_FLAGS_COVERAGE
@@ -492,6 +492,7 @@ def generateFullBuildStages() {
"debian-oldstable-full",
DOCKER_IMAGES.jessie,
CMAKE_FLAGS_BUILD_ALL +
+ CMAKE_FLAGS_DEBUG +
['COMMON_FLAGS': ''] // The build system can not compile Elektra on Debian Jessie, if we specify the compiler switch `-Werror`.
,
[TEST.ALL, TEST.MEM, TEST.INSTALL]
@@ -501,7 +502,8 @@ def generateFullBuildStages() {
tasks << buildAndTest(
"debian-unstable-full",
DOCKER_IMAGES.sid,
- CMAKE_FLAGS_BUILD_ALL,
+ CMAKE_FLAGS_BUILD_ALL+
+ CMAKE_FLAGS_DEBUG,
[TEST.ALL, TEST.MEM, TEST.INSTALL]
)
@@ -520,6 +522,7 @@ def generateFullBuildStages() {
"debian-unstable-full-clang",
DOCKER_IMAGES.sid,
CMAKE_FLAGS_BUILD_ALL +
+ CMAKE_FLAGS_DEBUG +
CMAKE_FLAGS_CLANG
,
[TEST.ALL, TEST.MEM, TEST.INSTALL]
@@ -571,6 +574,7 @@ def generateFullBuildStages() {
"debian-stable-full-ini",
DOCKER_IMAGES.stretch,
CMAKE_FLAGS_BUILD_ALL +
+ CMAKE_FLAGS_DEBUG +
CMAKE_FLAGS_INI +
CMAKE_FLAGS_COVERAGE
,
@@ -582,6 +586,7 @@ def generateFullBuildStages() {
"debian-stable-full-mmap",
DOCKER_IMAGES.stretch,
CMAKE_FLAGS_BUILD_ALL +
+ CMAKE_FLAGS_DEBUG +
CMAKE_FLAGS_MMAP +
CMAKE_FLAGS_COVERAGE
,
@@ -592,6 +597,7 @@ def generateFullBuildStages() {
"debian-stable-full-mmap-asan",
DOCKER_IMAGES.stretch,
CMAKE_FLAGS_BUILD_ALL +
+ CMAKE_FLAGS_DEBUG +
CMAKE_FLAGS_MMAP
)
|
Initialize stencil mask state slightly better;
Not sure this has an effect but it seems better. | @@ -3383,7 +3383,9 @@ Pass* lovrGraphicsGetPass(PassInfo* info) {
.viewCount = pass->viewCount,
.depth.format = depth->texture ? depth->texture->info.format : depth->format,
.depth.test = GPU_COMPARE_GEQUAL,
- .depth.write = true
+ .depth.write = true,
+ .stencil.testMask = 0xff,
+ .stencil.writeMask = 0xff
};
for (uint32_t i = 0; i < pass->info.canvas.count; i++) {
|
[Gate] Transformation of messages mode node/topic depending on json | @@ -101,19 +101,29 @@ void Bootloader_JsonToLuos(service_t *service, char *bin_data, json_t const *boo
// parse all relevant values in json object
uint16_t type = (uint16_t)json_getReal(json_getProperty(command_item, "type"));
uint8_t topic_target = (uint8_t)json_getReal(json_getProperty(command_item, "topic"));
+ uint16_t node_id = (uint16_t)json_getReal(json_getProperty(command_item, "node"));
+
// create a message to send to nodes
msg_t boot_msg;
- boot_msg.header.target = (uint16_t)topic_target; // first node of the network
+
+ if (node_id == 0)
+ {
+ boot_msg.header.target = (uint16_t)topic_target; // topic
boot_msg.header.cmd = BOOTLOADER_CMD; // bootloader cmd
boot_msg.header.target_mode = TOPIC; // msg send to the node
+ }
+ else
+ {
+ boot_msg.header.target = node_id; // node_id to send the message
+ boot_msg.header.cmd = BOOTLOADER_CMD; // bootloader cmd
+ boot_msg.header.target_mode = NODEIDACK; // msg send to the node
+ }
uint32_t binary_size = 0;
json_t *item = NULL;
switch (type)
{
case BOOTLOADER_START:
- boot_msg.header.target_mode = NODEIDACK;
- boot_msg.header.target = (uint16_t)json_getReal(json_getProperty(command_item, "node"));
boot_msg.header.size = sizeof(char);
boot_msg.data[0] = BOOTLOADER_START;
Luos_SendMsg(service, &boot_msg);
@@ -121,12 +131,9 @@ void Bootloader_JsonToLuos(service_t *service, char *bin_data, json_t const *boo
case BOOTLOADER_STOP:
// send stop command to bootloader app
- boot_msg.header.target_mode = NODEIDACK;
- boot_msg.header.target = (uint16_t)json_getReal(json_getProperty(command_item, "node"));
boot_msg.header.size = sizeof(char);
boot_msg.data[0] = BOOTLOADER_STOP;
Luos_SendMsg(service, &boot_msg);
-
break;
case BOOTLOADER_READY:
@@ -134,8 +141,6 @@ void Bootloader_JsonToLuos(service_t *service, char *bin_data, json_t const *boo
binary_size = (uint32_t)json_getReal(json_getProperty(command_item, "size"));
// send ready command to bootloader app
- boot_msg.header.target_mode = NODEIDACK;
- boot_msg.header.target = (uint16_t)json_getReal(json_getProperty(command_item, "node"));
boot_msg.header.size = 2 * sizeof(char) + sizeof(uint32_t);
boot_msg.data[0] = BOOTLOADER_READY;
boot_msg.data[1] = topic_target;
|
Updated RPM spec file. | @@ -37,10 +37,10 @@ features as they evolve.
%build
%cmake -DCMAKE_INSTALL_PREFIX=/usr -DSOCKET_API=1 -DUSRSCTP_SUPPORT=0 -DSCTP_MULTISTREAMING=1 -DFLOW_GROUPS=1 .
-make %{?_smp_mflags}
+%cmake_build
%install
-make install DESTDIR=%{buildroot}
+%cmake_install
%files
%{_libdir}/libneat.so*
|
correctly accolade ifs | @@ -849,10 +849,11 @@ zparser_conv_svcbparam_ipv4hint_value(region_type *region, const char *val)
for (i = 0, count = 1; val[i]; i++) {
if (val[i] == ',')
count += 1;
- if (count > SVCB_MAX_COMMA_SEPARATED_VALUES)
+ if (count > SVCB_MAX_COMMA_SEPARATED_VALUES) {
zc_error_prev_line("Too many IPV4 addresses in ipv4hint");
return alloc_rdata_init(region, "", 0);
}
+ }
/* count == number of comma's in val + 1, so the actual number of IPv4
* addresses in val
@@ -903,10 +904,11 @@ zparser_conv_svcbparam_ipv6hint_value(region_type *region, const char *val)
for (i = 0, count = 1; val[i]; i++) {
if (val[i] == ',')
count += 1;
- if (count > SVCB_MAX_COMMA_SEPARATED_VALUES)
+ if (count > SVCB_MAX_COMMA_SEPARATED_VALUES) {
zc_error_prev_line("Too many IPV6 addresses in ipv6hint");
return alloc_rdata_init(region, "", 0);
}
+ }
/* count == number of comma's in val + 1
* so actually the number of IPv6 addresses in val
@@ -963,10 +965,11 @@ zparser_conv_svcbparam_mandatory_value(region_type *region,
for (i = 0, count = 1; val[i]; i++) {
if (val[i] == ',')
count += 1;
- if (count > SVCB_MAX_COMMA_SEPARATED_VALUES)
+ if (count > SVCB_MAX_COMMA_SEPARATED_VALUES) {
zc_error_prev_line("Too many keys in mandatory");
return alloc_rdata_init(region, "", 0);
}
+ }
r = alloc_rdata(region, (2 + count) * sizeof(uint16_t));
r[1] = htons(SVCB_KEY_MANDATORY);
|
continous integration fixes | @@ -74,6 +74,7 @@ def test_emu(model):
err = np.abs(pk/data[:, 1]-1)
assert np.allclose(err, 0, rtol=0, atol=EMU_TOLERANCE)
+
@pytest.mark.parametrize('model', list(range(3)))
def test_emu_lin(model):
cosmos = np.loadtxt("./benchmarks/data/emu_input_cosmologies.txt")
@@ -98,7 +99,6 @@ def test_emu_lin(model):
matter_power_spectrum='emu',
)
-
a = 1
k = np.logspace(-3, -2, 50)
@@ -115,7 +115,5 @@ def test_emu_lin(model):
ccl.linear_matter_power,
cosmo, k, a)
-
err = np.abs(pk/pk_lin-1)
assert np.allclose(err, 0, rtol=0, atol=EMU_TOLERANCE)
-
|
Add missing frees to generate nonce test | @@ -3782,6 +3782,8 @@ void aead_multipart_generate_nonce( int key_type_arg, data_t *key_data,
exit:
psa_destroy_key( key );
+ mbedtls_free( output_data );
+ mbedtls_free( final_data );
psa_aead_abort( &operation );
PSA_DONE( );
}
|
Minor fix for multiple reinstallations of Datafari | @@ -214,6 +214,8 @@ start_solr()
init_solr()
{
+ find $SOLR_INSTALL_DIR/solr_home -maxdepth 1 -mindepth 1 -type d -exec rm -rf '{}' \;
+ run_as ${DATAFARI_USER} "find $SOLR_INSTALL_DIR/solr_home -maxdepth 1 -mindepth 1 -type d -exec rm -rf '{}' \;"
#curl --insecure -XGET "https://localhost:8983/solr/admin/collections?action=CREATE&name=FileShare&collection.configName=FileShare&numShards=1&replicationFactor=1&property.lib.path=${SOLR_INSTALL_DIR}/solrcloud/FileShare/"
#curl --insecure -XGET "https://localhost:8983/solr/admin/collections?action=CREATE&name=Statistics&collection.configName=Statistics&numShards=1&replicationFactor=1"
#curl --insecure -XGET "https://localhost:8983/solr/admin/collections?action=CREATE&name=Promolink&collection.configName=Promolink&numShards=1&replicationFactor=1"
|
Python: fixed interpreter path in ./configure. | @@ -68,7 +68,6 @@ if /bin/sh -c "$NXT_PYTHON_CONFIG --prefix" >> $NXT_AUTOCONF_ERR 2>&1; then
NXT_PYTHON_CONFIG="${NXT_PYTHON_CONFIG} --embed"
fi
- NXT_PYTHON_EXEC=`${NXT_PYTHON_CONFIG} --exec-prefix`/bin/${NXT_PYTHON}
NXT_PYTHON_INCLUDE=`${NXT_PYTHON_CONFIG} --includes`
NXT_PYTHON_LIBS=`${NXT_PYTHON_CONFIG} --ldflags`
@@ -133,7 +132,7 @@ fi
NXT_PYTHON_MOUNTS_HEADER=$NXT_BUILD_DIR/nxt_python_mounts.h
-$NXT_PYTHON_EXEC -c 'import os.path
+$NXT_PYTHON -c 'import os.path
import sys
pyver = "python" + str(sys.version_info[0]) + "." + str(sys.version_info[1])
|
QUIC TXP: Correct an issue with an uninitialized variable | @@ -1253,7 +1253,7 @@ static int txp_generate_crypto_frames(OSSL_QUIC_TX_PACKETISER *txp,
OSSL_QTX_IOVEC iov[2];
uint64_t hdr_bytes;
WPACKET *wpkt;
- QUIC_TXPIM_CHUNK chunk;
+ QUIC_TXPIM_CHUNK chunk = {0};
size_t i, space_left;
for (i = 0;; ++i) {
|
Connections markers restored to 16x8px version | @@ -116,36 +116,36 @@ class Connections extends Component {
renderMarker = ({ x, y, direction, onMouseDown, eventId, className }) => (
<g key={eventId} className={className} onMouseDown={onMouseDown}>
- <rect x={x - 4} y={y - 4 - 8} rx={4} ry={4} width={16} height={16} />
+ <rect x={x - 4} y={y - 4} rx={4} ry={4} width={16} height={8} />
{direction === "up" && (
<polygon
- points={`${x},${y + 2 - 4} ${x + 4},${y - 3 - 4} ${x + 8},${y + 2 - 4}`}
+ points={`${x},${y + 2} ${x + 4},${y - 3} ${x + 8},${y + 2}`}
style={{
- fill: "#fbe9e7",
+ fill: "#fbe9e7"
}}
/>
)}
{direction === "down" && (
<polygon
- points={`${x},${y - 2 - 4} ${x + 4},${y + 3 - 4} ${x + 8},${y - 2 - 4}`}
+ points={`${x},${y - 2} ${x + 4},${y + 3} ${x + 8},${y - 2}`}
style={{
- fill: "#fbe9e7",
+ fill: "#fbe9e7"
}}
/>
)}
{direction === "left" && (
<polygon
- points={`${x},${y - 4} ${x + 6},${y - 3 - 4} ${x + 6},${y + 3 - 4}`}
+ points={`${x},${y} ${x + 6},${y - 3} ${x + 6},${y + 3}`}
style={{
- fill: "#fbe9e7",
+ fill: "#fbe9e7"
}}
/>
)}
{direction === "right" && (
<polygon
- points={`${x + 8},${y - 4} ${x + 2},${y - 3 - 4} ${x + 2},${y + 3 - 4}`}
+ points={`${x + 8},${y} ${x + 2},${y - 3} ${x + 2},${y + 3}`}
style={{
- fill: "#fbe9e7",
+ fill: "#fbe9e7"
}}
/>
)}
|
cmd/kubectl-gadget/trace: Fix naming on DNS gadget | @@ -32,13 +32,13 @@ func newDNSCmd() *cobra.Command {
return commonutils.WrapInErrParserCreate(err)
}
- execGadget := &TraceGadget[dnsTypes.Event]{
+ dnsGadget := &TraceGadget[dnsTypes.Event]{
name: "dns",
commonFlags: &commonFlags,
parser: parser,
}
- return execGadget.Run()
+ return dnsGadget.Run()
}
cmd := commontrace.NewDNSCmd(runCmd)
|
yin parser BUGFIX allow -0 as value and not as position | @@ -725,7 +725,7 @@ yin_parse_value_pos_element(struct yin_parser_ctx *ctx, struct yin_arg_record *a
/* get attribute value */
LY_CHECK_RET(yin_parse_attribute(ctx, attrs, YIN_ARG_VALUE, &temp_val, Y_STR_ARG, kw));
- if (!temp_val || (temp_val[0] == '+') || ((temp_val[0] == '0') && (temp_val[0] != '\0')) || ((kw == YANG_VALUE) && !strcmp(temp_val, "-0"))) {
+ if (!temp_val || (temp_val[0] == '+') || ((temp_val[0] == '0') && (temp_val[1] != '\0')) || ((kw == YANG_POSITION) && !strcmp(temp_val, "-0"))) {
LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INVAL, strlen(temp_val), temp_val, ly_stmt2str(kw));
goto error;
}
@@ -748,6 +748,7 @@ yin_parse_value_pos_element(struct yin_parser_ctx *ctx, struct yin_arg_record *a
/* check if whole argument value was converted */
if (*ptr != '\0') {
LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INVAL, strlen(temp_val), temp_val, ly_stmt2str(kw));
+ goto error;
}
if (errno == ERANGE) {
LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_OOB, strlen(temp_val), temp_val, ly_stmt2str(kw));
|
Remove unused 'line' variable | @@ -1202,7 +1202,6 @@ gen_cmd["GetTable"] = function(self, cmd, _func)
local tab = self:c_value(cmd.src_tab)
local key = self:c_value(cmd.src_k)
local dst_typ = cmd.dst_typ
- local line = C.integer(cmd.loc.line)
assert(cmd.src_k._tag == "ir.Value.String")
local field_name = cmd.src_k.value
|
Disables default extra compiler warnings | @@ -71,7 +71,7 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
endif()
endif()
-option(ENABLE_MORE_WARNINGS "whether to enable more compiler warnings." ON)
+option(ENABLE_MORE_WARNINGS "whether to enable more compiler warnings." OFF)
if (ENABLE_MORE_WARNINGS)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4)
|
update `-o modern` documentation for -h | @@ -5526,7 +5526,7 @@ static void usage(void) {
" no perf difference in binary protocol. Speeds up sets.\n"
" - modern: Enables 'modern' defaults. Options that will be default in future.\n"
" enables: slab_chunk_max:512k,slab_reassign,slab_automove=1,maxconns_fast,\n"
- " hash_algorithm=murmur3,lru_crawler,lru_maintainer\n"
+ " hash_algorithm=murmur3,lru_crawler,lru_maintainer,no_inline_ascii_resp\n"
);
return;
}
|
apps: crypto_test: fix warnings from syscfg
Enabling/disabling some of the crypto_test syscfgs resulted in warnings
from non-used variables, etc. This commit fixes the issues so each
individual syscfg can be isolatedly used. | @@ -46,6 +46,12 @@ struct test_vectors {
static struct os_mutex mtx;
+#if (MYNEWT_VAL(CRYPTOTEST_VECTORS_ECB) || \
+ MYNEWT_VAL(CRYPTOTEST_VECTORS_CBC) || \
+ MYNEWT_VAL(CRYPTOTEST_VECTORS_CTR))
+#define RUN_VECTOR_TESTS 1
+#endif
+
/*
* Test vectors from "NIST Special Publication 800-38A"
*/
@@ -236,6 +242,7 @@ static struct test_vectors aes_256_ctr_vectors = {
};
#endif /* MYNEWT_VAL(CRYPTOTEST_VECTORS_CTR) */
+#if RUN_VECTOR_TESTS
static struct test_vectors *all_tests[] = {
#if MYNEWT_VAL(CRYPTOTEST_VECTORS_ECB)
&aes_128_ecb_vectors,
@@ -251,6 +258,7 @@ static struct test_vectors *all_tests[] = {
#endif
NULL,
};
+#endif
void
run_test_vectors(struct crypto_dev *crypto, struct test_vectors *test_mode)
@@ -326,10 +334,13 @@ run_test_vectors(struct crypto_dev *crypto, struct test_vectors *test_mode)
}
}
-#if MYNEWT_VAL(CRYPTOTEST_BENCHMARK)
+#if MYNEWT_VAL(CRYPTOTEST_BENCHMARK) || MYNEWT_VAL(CRYPTOTEST_CONCURRENCY)
extern uint8_t aes_128_key[];
extern uint8_t aes_128_input[];
extern uint8_t aes_128_ecb_expected[];
+#endif
+
+#if MYNEWT_VAL(CRYPTOTEST_BENCHMARK)
extern uint8_t aes_128_cbc_expected[];
extern uint8_t aes_128_cbc_iv[];
extern uint8_t aes_128_ctr_expected[];
@@ -460,6 +471,7 @@ run_ctr_bench(struct crypto_dev *crypto, uint8_t iter)
}
#endif /* MYNEWT_VAL(CRYPTOTEST_BENCHMARK) */
+#if MYNEWT_VAL(CRYPTOTEST_CONCURRENCY)
static void
lock(void)
{
@@ -478,7 +490,6 @@ unlock(void)
assert(rc == 0);
}
-#if MYNEWT_VAL(CRYPTOTEST_CONCURRENCY)
static void
concurrency_test_handler(void *arg)
{
@@ -930,7 +941,9 @@ main(void)
struct tc_aes_key_sched_struct tc_aes;
int iterations;
#endif
+#if RUN_VECTOR_TESTS || MYNEWT_VAL(CRYPTOTEST_BENCHMARK)
int i;
+#endif
int rc;
sysinit();
@@ -941,10 +954,12 @@ main(void)
rc = os_mutex_init(&mtx);
assert(rc == 0);
+#if RUN_VECTOR_TESTS
printf("=== Test vectors ===\n");
for (i = 0; all_tests[i] != NULL; i++) {
run_test_vectors(crypto, all_tests[i]);
}
+#endif
#if MYNEWT_VAL(CRYPTOTEST_INPLACE)
printf("\n=== In-place encrypt/decrypt ===\n");
|
apps/examples/pwfb/pwfb_main.c: Fix typo in printf text | @@ -378,7 +378,7 @@ static bool pwfb_configure_window(FAR struct pwfb_state_s *st, int wndx,
if (ret < 0)
{
printf("pwfb_configure_window: ERROR: "
- "nx_setsize failed: %d\n", errno);
+ "nxtk_setsize failed: %d\n", errno);
goto errout_with_hwnd;
}
|
Check the exit code from the server process | @@ -316,6 +316,7 @@ sub clientstart
print "Waiting for server process to close: "
.$self->serverpid."\n";
waitpid( $self->serverpid, 0);
+ die "exit code $? from server process\n" if $? != 0;
}
return 1;
}
|
Change req_check_len error message, it also accepts 20 bytes, but states 'less than' in the error message | @@ -1273,7 +1273,7 @@ static int req_check_len(int len, int n_min, int n_max)
}
if ((n_max >= 0) && (len > n_max)) {
BIO_printf(bio_err,
- "string is too long, it needs to be less than %d bytes long\n",
+ "string is too long, it needs to be no more than %d bytes long\n",
n_max);
return (0);
}
|
error: ignoring failing tests on macOs via cmake | @@ -30,5 +30,12 @@ add_kdb_test (nested REQUIRED_PLUGINS error)
add_kdb_test (simple REQUIRED_PLUGINS error)
add_kdb_test (ensure REQUIRED_PLUGINS tracer list spec)
+if (NOT
+ (APPLE
+ AND XCODE
+ AND XCODE_VERSION
+ VERSION_EQUAL
+ 10.1))
set_source_files_properties (testkdb_highlevel PROPERTIES COMPILE_FLAGS -Wno-sign-promo)
add_kdb_test (highlevel LINK_ELEKTRA elektra-highlevel REQUIRED_PLUGINS error)
+endif ()
|
allow Ctrl+V for paste, fix duplicated Ctrl+P shortcuts | @@ -298,7 +298,7 @@ CreateMenus (GtkWidget * parent)
{N_("/Local/_Delete..."), "<control><shift>D", delete_dialog, 0,
MN_(NULL)},
{N_("/Local/_Edit..."), "<control><shift>E", edit_dialog, 0, MN_(NULL)},
- {N_("/Local/_View..."), "<control><shift>V", view_dialog, 0, MN_(NULL)},
+ {N_("/Local/_View..."), "<control><shift>L", view_dialog, 0, MN_(NULL)},
{N_("/Local/_Refresh"), "<control><shift>R", gftp_gtk_refresh, 0,
MS_(GTK_STOCK_REFRESH)},
{N_("/_Remote"), NULL, 0, 0, MN_("<Branch>")},
@@ -325,7 +325,7 @@ CreateMenus (GtkWidget * parent)
MN_(NULL)},
{N_("/Remote/_Delete..."), "<control>D", delete_dialog, 0, MN_(NULL)},
{N_("/Remote/_Edit..."), "<control>E", edit_dialog, 0, MN_(NULL)},
- {N_("/Remote/_View..."), "<control>V", view_dialog, 0, MN_(NULL)},
+ {N_("/Remote/_View..."), "<control>L", view_dialog, 0, MN_(NULL)},
{N_("/Remote/_Refresh"), "<control>R", gftp_gtk_refresh, 0,
MS_(GTK_STOCK_REFRESH)},
{N_("/_Bookmarks"), NULL, 0, 0, MN_("<Branch>")},
@@ -349,7 +349,7 @@ CreateMenus (GtkWidget * parent)
MS_(GTK_STOCK_GO_DOWN)},
{N_("/Transfer/sep"), NULL, 0, 0, MN_("<Separator>")},
{N_("/Transfer/_Retrieve Files"), "<control>R", get_files, 0, MN_(NULL)},
- {N_("/Transfer/_Put Files"), "<control>P", put_files, 0, MN_(NULL)},
+ {N_("/Transfer/_Put Files"), "<control>U", put_files, 0, MN_(NULL)},
{N_("/L_og"), NULL, 0, 0, MN_("<Branch>")},
{N_("/Log/tearoff"), NULL, 0, 0, MN_("<Tearoff>")},
{N_("/Log/_Clear"), NULL, clearlog, 0, MS_(GTK_STOCK_CLEAR)},
|
Update docs/Advanced-Concepts/Top-Testharness.rst [ci skip] | @@ -80,7 +80,7 @@ instantiates a TileLink GPIO node, and connects it to the proper buses.
If we look at the ``WithGPIOTop`` mixin in the ``ConfigMixins.scala`` file, we see that adding this mixin to the top-level Config overrides the
``BuildTop`` key with a custom function that both instantiates the custom Top, and drives all the GPIO pins.
-When the ``TestHarness`` looksup the ``BuildTop`` key, this function will run and perform this wiring, and then return the Top module.
+When the ``TestHarness`` looks up the ``BuildTop`` key, this function will run and perform the specified wiring, and then return the Top module.
TestDriver
-------------------------
|
publish: invite-search shows valid ship in results | @@ -69,6 +69,18 @@ export class InviteSearch extends Component {
this.setState({
searchResults: { groups: groupMatches, ships: shipMatches }
});
+
+ let isValid = true;
+ if (!urbitOb.isValidPatp("~" + searchTerm)) {
+ isValid = false;
+ }
+
+ if ((shipMatches.length === 0) && (isValid)) {
+ shipMatches.push(searchTerm);
+ this.setState({
+ searchResults: { groups: groupMatches, ships: shipMatches }
+ })
+ }
}
}
|
Empty while loop does not reload contition to check in each iteration. Add some statement to force reloading.
Before this change, this while loop compiles into below on Marvell port.
100b86: e7fe b.n 100b86 <TEST_UTIL_Platform_Threads_IotThreads_MutexTest_+0x52> | @@ -238,6 +238,8 @@ TEST( UTIL_Platform_Threads, IotThreads_MutexTest )
/* Wait for signal to continue */
while( ti.testValue == 0 )
{
+ /* Force while loop reload condition every iteration. */
+ vTaskDelay( configTICK_RATE_HZ / 10 );
}
if( ti.testValue != 1 )
@@ -252,6 +254,8 @@ TEST( UTIL_Platform_Threads, IotThreads_MutexTest )
while( ti.testValue == 0 )
{
+ /* Force while loop reload condition every iteration. */
+ vTaskDelay( configTICK_RATE_HZ / 10 );
}
if( ti.testValue != 2 )
|
JENKINS: Fix Flag for Interrupt. This must be -i and not -I | @@ -43,7 +43,7 @@ function test () # $1 = card, $2 = drive
echo "Testing in IRQ mode"
for b in 512 1024 ; do
echo "Using IRQ mode"
- cmd="$FUNC -C $card -d $drive -b $b -I"
+ cmd="$FUNC -C $card -d $drive -b $b -i"
eval ${cmd}
if [ $? -ne 0 ]; then
echo "cmd: $cmd"
|
Add else class to flag unsupported architectures | @@ -129,6 +129,9 @@ if(${ARCH} MATCHES "aarch64")
elseif(${ARCH} MATCHES "x86_64")
set(CMAKE_OSX_ARCHITECTURES "x86_64")
+else()
+ message(FATAL_ERROR "Unsupported architecture")
+
endif()
set(CMAKE_CXX_STANDARD 14)
|
examples/jpeg: decode both to yuv and to rgb | @@ -13,6 +13,28 @@ extern "C" {
#include "turbojpeg.h"
+void decompressToYUV(
+ tjhandle tjh, unsigned char* buf, size_t len, int width, int height, int jpegSubsamp) {
+ unsigned char* dstBuf = tjAlloc(tjBufSizeYUV2(width, 4, height, jpegSubsamp));
+ if (!dstBuf) {
+ return;
+ }
+ tjDecompressToYUV2(tjh, buf, len, dstBuf, width, 4, height, 0);
+ tjFree(dstBuf);
+}
+
+void decompressToRGB(
+ tjhandle tjh, unsigned char* buf, size_t len, int width, int height, int jpegSubsamp) {
+ int pitch = width * tjPixelSize[TJPF_RGB];
+
+ unsigned char* dstBuf = tjAlloc(pitch * height + 1);
+ if (!dstBuf) {
+ return;
+ }
+ tjDecompress2(tjh, buf, len, dstBuf, width, pitch, height, TJPF_RGB, 0);
+ tjFree(dstBuf);
+}
+
int LLVMFuzzerTestOneInput(const uint8_t* buf, size_t len) {
tjhandle tjh = tjInitDecompress();
@@ -21,13 +43,10 @@ int LLVMFuzzerTestOneInput(const uint8_t* buf, size_t len) {
tjDestroy(tjh);
return 0;
}
- unsigned char* dstBuf = tjAlloc(tjBufSizeYUV2(width, 4, height, jpegSubsamp));
- if (!dstBuf) {
- tjDestroy(tjh);
- return 0;
- }
- tjDecompressToYUV2(tjh, buf, len, dstBuf, width, 4, height, 0);
- tjFree(dstBuf);
+
+ decompressToYUV(tjh, (unsigned char*)buf, len, width, height, jpegSubsamp);
+ decompressToRGB(tjh, (unsigned char*)buf, len, width, height, jpegSubsamp);
+
tjDestroy(tjh);
return 0;
|
fixed the list option for releases before 13.1 | @@ -93,7 +93,7 @@ if [ -d $repodirname ] ; then
fi
}
-function list_repo(){
+function list_repo_from_manifest(){
logcommit=`git log -1 | grep "^commit" | cut -d" " -f2 | xargs`
thiscommit=${logcommit:0:12}
thisdate=`git log -1 --pretty=fuller | grep "^CommitDate:" | cut -d":" -f2- | xargs | cut -d" " -f2-`
@@ -200,7 +200,7 @@ if [[ "$AOMP_VERSION" == "13.1" ]] || [[ $AOMP_MAJOR_VERSION -gt 13 ]] ; then
REPO_RREV=$COBRANCH
REPO_REMOTE=$remote
cd $repodirname
- list_repo
+ list_repo_from_manifest
fi
else
if [ $reponame == "aomp" ] ; then
|
OcCpuLib: Fix CurBusRatio calculation for Nehalem/Westmere | @@ -283,6 +283,7 @@ ScanIntelProcessor (
MSR_SANDY_BRIDGE_PKG_CST_CONFIG_CONTROL_REGISTER PkgCstConfigControl;
MSR_IA32_PERF_STATUS_REGISTER PerfStatus;
MSR_NEHALEM_PLATFORM_INFO_REGISTER PlatformInfo;
+ OC_CPU_GENERATION CpuGeneration;
MSR_NEHALEM_TURBO_RATIO_LIMIT_REGISTER TurboLimit;
UINT16 CoreCount;
CONST CHAR8 *TimerSourceType;
@@ -315,10 +316,17 @@ ScanIntelProcessor (
//
if (Cpu->Model >= CPU_MODEL_NEHALEM) {
PerfStatus.Uint64 = AsmReadMsr64 (MSR_IA32_PERF_STATUS);
- Cpu->CurBusRatio = (UINT8) (PerfStatus.Bits.State >> 8U);
PlatformInfo.Uint64 = AsmReadMsr64 (MSR_NEHALEM_PLATFORM_INFO);
Cpu->MinBusRatio = (UINT8) PlatformInfo.Bits.MaximumEfficiencyRatio;
Cpu->MaxBusRatio = (UINT8) PlatformInfo.Bits.MaximumNonTurboRatio;
+ CpuGeneration = OcCpuGetGeneration ();
+
+ if (CpuGeneration == OcCpuGenerationNehalem
+ || CpuGeneration == OcCpuGenerationWestmere) {
+ Cpu->CurBusRatio = (UINT8) PerfStatus.Bits.State;
+ } else {
+ Cpu->CurBusRatio = (UINT8) (PerfStatus.Bits.State >> 8U);
+ }
} else if (Cpu->Model >= CPU_MODEL_PENRYN) {
PerfStatus.Uint64 = AsmReadMsr64 (MSR_IA32_PERF_STATUS);
Cpu->MaxBusRatio = (UINT8) (RShiftU64 (PerfStatus.Uint64, 8) & 0x1FU);
|
testcase/kernel/mqueue: Add omitted mq_unlink and move mq_close before unlink
1.if no unlink, the allocated message queue is not freed.
2.for testing mq_unlink, mq_close should be called first. | @@ -711,8 +711,10 @@ static void tc_mqueue_mq_notify(void)
TC_ASSERT_EQ_ERROR_CLEANUP("mq_notify", mq_notify(mqdes, NULL), OK, get_errno(), goto cleanup);
mq_close(mqdes);
+ mq_unlink("noti_queue");
TC_SUCCESS_RESULT();
+ return;
cleanup:
mq_close(mqdes);
mq_unlink("noti_queue");
@@ -729,6 +731,7 @@ static void tc_mqueue_mq_timedsend_timedreceive(void)
ret_chk = timedreceive_test();
TC_ASSERT_EQ("timedreceive_test", ret_chk, OK);
+ mq_unlink("t_mqueue");
TC_SUCCESS_RESULT();
}
@@ -740,14 +743,14 @@ static void tc_mqueue_mq_unlink(void)
mqdes = mq_open("mqunlink", O_CREAT | O_RDWR, 0666, 0);
TC_ASSERT_NEQ("mq_open", mqdes, (mqd_t)-1);
- ret = mq_unlink("mqunlink");
- TC_ASSERT_EQ_ERROR_CLEANUP("mq_unlink", ret, OK, get_errno(), mq_close(mqdes));
+ mq_close(mqdes);
ret = mq_unlink("mqunlink");
- TC_ASSERT_EQ_CLEANUP("mq_unlink", ret, ERROR, mq_close(mqdes));
- TC_ASSERT_EQ_CLEANUP("mq_unlink", errno, ENOENT, mq_close(mqdes));
+ TC_ASSERT_EQ("mq_unlink", ret, OK);
- mq_close(mqdes);
+ ret = mq_unlink("mqunlink");
+ TC_ASSERT_EQ("mq_unlink", ret, ERROR);
+ TC_ASSERT_EQ("mq_unlink", errno, ENOENT);
TC_SUCCESS_RESULT();
}
|
PACSign: update version to 1.0.5 (openssl 1.1.1l) | -# Copyright(c) 2019, Intel Corporation
+# Copyright(c) 2019-2021, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@@ -27,7 +27,7 @@ from setuptools import setup, find_packages
setup(
name="pacsign",
- version="1.0.4",
+ version="1.0.5",
packages=find_packages(),
python_requires='>=3.6',
extra_requires={'pkcs11': ['python-pkcs11']},
|
UserNotes: Add default priority values | @@ -462,6 +462,10 @@ BOOLEAN FindIfeoObject(
{
*CpuPriorityClass = value;
}
+ else
+ {
+ *CpuPriorityClass = ULONG_MAX;
+ }
}
if (IoPriorityClass)
@@ -470,6 +474,10 @@ BOOLEAN FindIfeoObject(
{
*IoPriorityClass = value;
}
+ else
+ {
+ *IoPriorityClass = ULONG_MAX;
+ }
}
if (PagePriorityClass)
@@ -478,6 +486,10 @@ BOOLEAN FindIfeoObject(
{
*PagePriorityClass = value;
}
+ else
+ {
+ *PagePriorityClass = ULONG_MAX;
+ }
}
NtClose(keyHandle);
|
[Cita][#1193]update demo file | @@ -44,7 +44,7 @@ const BCHAR *native_demoKey = "0xf1395a1fc3f74f0c867b61292e28e0f6cc98a095535fd6b
/**
* test node url
*/
-const BCHAR * demoUrl = "http://127.0.0.1:7545";
+const BCHAR * demoUrl = "http://127.0.0.1:1337";
/**
@@ -195,6 +195,12 @@ BOAT_RESULT cita_call_ReadStore(BoatCitaWallet *wallet_ptr)
result = BoatCitaTxInit(wallet_ptr, &tx_ctx, BOAT_TRUE, NULL,
"0x333333",
(BCHAR *)demoRecipientAddress);
+ /* Set Contract Address */
+ result = BoatCitaTxInit(wallet_ptr, &tx_ctx, BOAT_TRUE,
+ (BCHAR *)demoRecipientAddress, //recipient
+ "0x01", //chainid
+ 10000000 //quota
+ );
if (result != BOAT_SUCCESS)
{
|
Change image names | @@ -13,10 +13,10 @@ build-windows:
stage: build
tags:
- windows
- image: marcvs/windows_builder-msys2-x86_64:1
+ image: marcvs/build_oidc-agent_win-msys2:1
script:
- none
artifacts:
paths:
- "bin/*installer.exe"
- name: "oidc-agent-$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
+ name: "oidc-agent-$CI_COMMIT_REF_NAME"
|
in_tail: add Path_Key feature for multiline mode | @@ -251,7 +251,7 @@ int flb_tail_mult_process_content(time_t now,
size_t out_size = 0;
struct mk_list *head;
struct flb_tail_mult *mult_parser = NULL;
- struct flb_time out_time = {};
+ struct flb_time out_time = {0};
msgpack_object map;
msgpack_unpacked result;
@@ -325,6 +325,7 @@ int flb_tail_mult_flush(msgpack_sbuffer *mp_sbuf, msgpack_packer *mp_pck,
struct flb_tail_file *file, struct flb_tail_config *ctx)
{
int i;
+ int map_size;
size_t total;
size_t off = 0;
size_t next_off = 0;
@@ -349,7 +350,22 @@ int flb_tail_mult_flush(msgpack_sbuffer *mp_sbuf, msgpack_packer *mp_pck,
/* Compose the new record with the multiline content */
msgpack_pack_array(mp_pck, 2);
flb_time_append_to_msgpack(&file->mult_time, mp_pck, 0);
- msgpack_pack_map(mp_pck, file->mult_keys);
+
+ /* New Map size */
+ map_size = file->mult_keys;
+ if (file->config->path_key != NULL) {
+ map_size++;
+ }
+ msgpack_pack_map(mp_pck, map_size);
+
+ /* Append Path_Key ? */
+ if (file->config->path_key != NULL) {
+ msgpack_pack_str(mp_pck, file->config->path_key_len);
+ msgpack_pack_str_body(mp_pck, file->config->path_key,
+ file->config->path_key_len);
+ msgpack_pack_str(mp_pck, file->name_len);
+ msgpack_pack_str_body(mp_pck, file->name, file->name_len);
+ }
data = file->mult_sbuf.data;
bytes = file->mult_sbuf.size;
|
added warning to NULL quality alignments in count_coverage | +
# cython: embedsignature=True
# cython: profile=True
########################################################
@@ -1508,7 +1509,6 @@ cdef class AlignmentFile(HTSFile):
"""
-
cdef uint32_t contig_length = self.get_reference_length(contig)
cdef int _start = start if start is not None else 0
cdef int _stop = stop if stop is not None else contig_length
@@ -1574,7 +1574,7 @@ cdef class AlignmentFile(HTSFile):
for qpos, refpos in read.get_aligned_pairs(True):
if qpos is not None and refpos is not None and \
_start <= refpos < _stop:
- if quality[qpos] >= quality_threshold or not_check_qual == 1:
+ if not_check_qual == 1 or quality[qpos] >= quality_threshold:
if seq[qpos] == 'A':
count_a.data.as_ulongs[refpos - _start] += 1
if seq[qpos] == 'C':
@@ -1583,6 +1583,8 @@ cdef class AlignmentFile(HTSFile):
count_g.data.as_ulongs[refpos - _start] += 1
if seq[qpos] == 'T':
count_t.data.as_ulongs[refpos - _start] += 1
+ if not_check_qual:
+ warnings.warn('All bases were counted')
return count_a, count_c, count_g, count_t
|
Remove cleanup function
Now we remove all temporaries before running the benchmark. | @@ -56,25 +56,10 @@ local function compile(ext, file_name)
end
end
--- TODO: In the current state, this is just a `rm -rf ./*.so`, for all cases.
--- Check if we can simplify to just that or if the luajut stuff will behave
--- differently when we implement it.
-local cleanup = {
- ["lua"] =
- function() end,
-
- ["titan"] =
- function(test_dir, name)
- os.remove(test_dir .. "/" .. name .. ".so")
- end,
-
- ["c"] =
- function(test_dir, name)
- os.remove(test_dir .. "/" .. name .. ".so")
- end,
-}
-
local function benchmark(test_dir)
+ -- remove temporaries from previous runs
+ util.shell(string.format([[ rm -f %s/*.so ]], test_dir))
+
local file_names = {}
for file_name in lfs.dir(test_dir) do
if not string.find(file_name, "^%.") and
@@ -93,7 +78,6 @@ local function benchmark(test_dir)
end
local result = measure(test_dir, name)
table.insert(results, {name = name, result = result})
- cleanup[ext](test_dir, name)
end
table.sort(results, function(r1, r2) return r1.name < r2.name end)
|
Fixes c99 compatibility | @@ -39,9 +39,9 @@ project(ccl VERSION 0.2.1)
# Compilation flags
if ("${CMAKE_C_COMPILER_ID}" MATCHES "^(Apple)?Clang$")
# using Clang, disabling OpenMP support
- set(CMAKE_C_FLAGS "-O3 -fomit-frame-pointer -fno-common -std=c99 -fPIC -D__CCL_DATA_DIR__=${CMAKE_INSTALL_PREFIX}/share/ccl")
+ set(CMAKE_C_FLAGS "-O3 -fomit-frame-pointer -fno-common -fPIC -D__CCL_DATA_DIR__=${CMAKE_INSTALL_PREFIX}/share/ccl")
else()
- set(CMAKE_C_FLAGS "-O3 -fomit-frame-pointer -fno-common -std=c99 -fPIC -fopenmp -D__CCL_DATA_DIR__=${CMAKE_INSTALL_PREFIX}/share/ccl")
+ set(CMAKE_C_FLAGS "-O3 -fomit-frame-pointer -fno-common -fPIC -fopenmp -D__CCL_DATA_DIR__=${CMAKE_INSTALL_PREFIX}/share/ccl")
endif()
# Define include and library directories for external dependencies
|
README.md: Use version 2.05.07 | @@ -28,11 +28,11 @@ Raspbian Wheezy and Qt4 is no longer maintained.
### Install deCONZ
1. Download deCONZ package
- wget http://www.dresden-elektronik.de/rpi/deconz/beta/deconz-2.05.05-qt5.deb
+ wget http://www.dresden-elektronik.de/rpi/deconz/beta/deconz-2.05.07-qt5.deb
2. Install deCONZ package
- sudo dpkg -i deconz-2.05.05-qt5.deb
+ sudo dpkg -i deconz-2.05.07-qt5.deb
**Important** this step might print some errors *that's ok* and will be fixed in the next step.
@@ -47,11 +47,11 @@ The deCONZ package already contains the REST API plugin, the development package
1. Download deCONZ development package
- wget http://www.dresden-elektronik.de/rpi/deconz-dev/deconz-dev-2.05.05.deb
+ wget http://www.dresden-elektronik.de/rpi/deconz-dev/deconz-dev-2.05.07.deb
2. Install deCONZ development package
- sudo dpkg -i deconz-dev-2.05.05.deb
+ sudo dpkg -i deconz-dev-2.05.07.deb
3. Install missing dependencies
@@ -66,7 +66,7 @@ The deCONZ package already contains the REST API plugin, the development package
2. Checkout related version tag
cd deconz-rest-plugin
- git checkout -b mybranch V2_05_05
+ git checkout -b mybranch V2_05_07
3. Compile the plugin
|
Add get_dsts function | @@ -97,6 +97,9 @@ declare_type("Value", {
Function = {"id"},
})
+-- [IMPORTANT!] After any changes to this data type, update the get_srcs and
+-- get_dsts functions accordingly
+--
declare_type("Cmd", {
-- Variables
Move = {"loc", "dst", "src"},
@@ -142,9 +145,7 @@ declare_type("Cmd", {
Loop = {"body"},
For = {"loop_var", "start", "limit", "step", "body"},
})
--- Keep these lists updated!
---local dst_fields = { "dst" }
---local dsts_fields = { "dsts"}
+
local src_fields = {
"src", "src1", "src2",
"src_arr", "src_rec", "src_i", "src_v",
@@ -168,6 +169,27 @@ function ir.get_srcs(cmd)
return srcs
end
+local dst_fields = { "dst" }
+local dsts_fields = { "dsts"}
+
+function ir.get_dsts(cmd)
+ local dsts = {}
+ for _, k in ipairs(dst_fields) do
+ if cmd[k] then
+ table.insert(dsts, cmd[k])
+ end
+ end
+ for _, k in ipairs(dsts_fields) do
+ if cmd[k] then
+ for _, dst in ipairs(cmd[k]) do
+ table.insert(dsts, dst)
+ end
+ end
+ end
+ return dsts
+end
+
+
-- Linearize the commands in a pre-order traversal. Makes it easier to iterate
-- over all commands, and is also helpful for register allocation.
function ir.flatten_cmds(root_cmds)
|
Update readme moving away the overview image. | -
<div align="center">
<a href="https://metacall.io" target="_blank"><img src="https://raw.githubusercontent.com/metacall/core/master/deploy/images/logo.png" alt="M E T A C A L L" style="max-width:100%;" width="64" height="64">
<p><b>M E T A C A L L</b></p></a>
<p>A library for providing inter-language foreign function interface calls</p>
- <a href="https://medium.com/@metacall/call-functions-methods-or-procedures-between-programming-languages-with-metacall-58cfece35d7" target="_blank"><img src="https://raw.githubusercontent.com/metacall/core/master/deploy/images/overview.png" alt="M E T A C A L L" style="max-width:100%;" width="512" height="364">
</div>
# Abstract
@@ -23,6 +21,10 @@ metacall_load_from_file('py', [ 'sum.py' ]);
metacall('sum', 3, 4); // 7
```
+<div align="center">
+ <a href="https://medium.com/@metacall/call-functions-methods-or-procedures-between-programming-languages-with-metacall-58cfece35d7" target="_blank"><img src="https://raw.githubusercontent.com/metacall/core/master/deploy/images/overview.png" alt="M E T A C A L L" style="max-width:100%;" width="512" height="364">
+</div>
+
# Table Of Contents
<!-- TOC -->
|
Add AgentMiragePrismPrismBox | @@ -116,6 +116,11 @@ public unsafe partial struct AgentModule
{
return (AgentDeepDungeonMap*)GetAgentByInternalId(AgentId.DeepDungeonMap);
}
+
+ public AgentMiragePrismPrismBox* GetAgentMiragePrismPrismBox()
+ {
+ return (AgentMiragePrismPrismBox*)GetAgentByInternalId(AgentId.MiragePrismPrismBox);
+ }
}
public enum AgentId : uint {
|
tracegen: execute to axe script with python2 | @@ -13,7 +13,7 @@ AXE_SHRINK=${AXE_DIR}/src/axe-shrink.py
PATH=$PATH:${AXE_DIR}/src
grep '.*:.*#.*@' $1 > /tmp/clean-trace.txt
-"$TO_AXE" /tmp/clean-trace.txt > /tmp/trace.axe
+python2 "$TO_AXE" /tmp/clean-trace.txt > /tmp/trace.axe
result=$("$AXE" check wmo /tmp/trace.axe)
if [ "$result" != OK ]; then
|
Nina: Fix bind() socket state check for UDP sockets. | @@ -687,7 +687,9 @@ int nina_socket_bind(int fd, uint8_t *ip, uint16_t port, int type)
return -1;
}
- if (nina_server_socket_status(fd) != SOCKET_STATE_LISTEN) {
+ // Only TCP sockets' states should be checked.
+ if (type == NINA_SOCKET_TYPE_TCP &&
+ nina_server_socket_status(fd) != SOCKET_STATE_LISTEN) {
return -1;
}
return 0;
|
Make Threads1xxx return 1 if failed | @@ -4,13 +4,13 @@ int thdLim =1024;
//__attribute__((amdgpu_flat_work_group_size(1024, 1024)))
int main()
{
+ int numTeams=64;
int N = 12;
int NN = 1024;
- int lims[N] , threads[N], Res[N*NN];
+ int lims[N] , threads[N], Res[numTeams*NN];
int i;
for (i=0; i <N; i++) lims[i] = threads[i] = -1;
for (i=0; i <N*NN; i++) Res[i] = -1;
- int numTeams=64;
#pragma omp target teams num_teams(numTeams) thread_limit(1024)
#pragma omp parallel for
for (i=0; i <NN*numTeams; i++) {
@@ -20,7 +20,7 @@ int main()
}
Res[i] = i;
}
- for (i=0; i <N*NN; i++) if (Res[i] != i) { printf("Failed\n"); break;}
+ for (i=0; i <numTeams*NN; i++) if (Res[i] != i) { printf("Failed\n"); return 1;}
for (i=0; i <N; i++) {
printf("i=%d lims[%d] threads[%d]\n", i, lims[i], threads[i]);
}
|
metadata-pull-hook: watch contacts for new preview
Fetch metadata previews when we learn of a group via a contact's pinned
groups. | ::
:: allow syncing group data from foreign paths to local paths
::
-/- *group, invite-store, metadata=metadata-store
+/- *group, invite-store, metadata=metadata-store, contact=contact-store
/+ default-agent, verb, dbug, store=group-store, grpl=group, pull-hook
/+ resource, mdl=metadata
~% %group-hook-top ..part ~
=* state -
=> |_ =bowl:gall
++ def ~(. (default-agent state %|) bowl)
+ ++ met ~(. mdl bowl)
++ get-preview
|= rid=resource
^- card
::
%kick [watch-invites^~ state]
==
+ ::
+ ++ watch-contacts
+ ^- card
+ [%pass /contacts %agent [our.bowl %contact-store] %watch /all]
+ ::
+ ++ take-contacts
+ |= =sign:agent:gall
+ ^- (quip card _state)
+ ?+ -.sign (on-agent:def /contacts sign)
+ %kick [~[watch-contacts] state]
+ ::
+ %fact
+ :_ state
+ ?> ?=(%contact-update p.cage.sign)
+ =+ !<(=update:contact q.cage.sign)
+ ?+ -.update ~
+ %add
+ (check-contact contact.update)
+ ::
+ %edit
+ ?. ?=(%add-group -.edit-field.update) ~
+ %- add-missing-previews
+ (~(gas in *(set resource)) resource.edit-field.update ~)
+ ::
+ %initial
+ ^- (list card)
+ %- zing
+ %+ turn ~(tap by rolodex.update)
+ |=([ship =contact:contact] (check-contact contact))
+ ==
+ ==
+ ++ check-contact
+ |= =contact:contact
+ ^- (list card)
+ (add-missing-previews groups.contact)
+ ::
+ ++ add-missing-previews
+ |= groups=(set resource)
+ ^- (list card)
+ =/ missing=(set resource)
+ (~(dif in ~(key by previews)) groups)
+ %+ murn ~(tap by missing)
+ |= group=resource
+ ^- (unit card)
+ ?^ (peek-metadatum:met %groups group) ~
+ `(get-preview group)
--
|_ =bowl:gall
+* this .
|= =vase
=+ !<(old=state-zero vase)
:_ this(state old)
- ?: (~(has by wex.bowl) [/invites our.bowl %invite-store]) ~
+ %- zing
+ :~ ?: (~(has by wex.bowl) [/invites our.bowl %invite-store]) ~
~[watch-invites:hc]
+ ?: (~(has by wex.bowl) [/contacts our.bowl %contact-store]) ~
+ ~[watch-contacts:hc]
+ ==
::
++ on-poke
|= [=mark =vase]
=^ cards state
?+ wire (on-agent:def:hc wire sign)
[%invites ~] (take-invites:hc sign)
+ [%contacts ~] (take-invites:hc sign)
::
[%preview @ @ @ ~]
?. ?=(%poke-ack -.sign)
|
kinox: LED_PWR_L change to open drain
According to the LED_PWR_L GPIO change to OD from push-pull.
So modify the setting.
BRANCH=none
TEST=The LED can light up at S0, breath at suspend, off at shutdown. | const struct pwm_t pwm_channels[] = {
[PWM_CH_LED_GREEN] = {
.channel = 0,
- .flags = PWM_CONFIG_ACTIVE_LOW | PWM_CONFIG_DSLEEP,
+ .flags = PWM_CONFIG_ACTIVE_LOW | PWM_CONFIG_DSLEEP |
+ PWM_CONFIG_OPEN_DRAIN,
.freq = 2000
},
[PWM_CH_FAN] = {
|
host/mesh: Fix fix mod_sub_get_vnd
pass cid instead of CID_NVAL in parameters of mod_member_list_get
This is port of | @@ -1808,7 +1808,7 @@ int bt_mesh_cfg_mod_sub_get_vnd(uint16_t net_idx, uint16_t addr, uint16_t elem_a
}
return mod_member_list_get(OP_MOD_SUB_GET_VND, OP_MOD_SUB_LIST_VND,
- net_idx, addr, elem_addr, mod_id, CID_NVAL,
+ net_idx, addr, elem_addr, mod_id, cid,
status, subs, sub_cnt);
}
|
sim: Add dependency output
Output the names of source files used to build the C library so that
Cargo knows to rerun the compilation if these have changed. | extern crate gcc;
+use std::fs;
+use std::io;
+use std::path::Path;
+
fn main() {
let mut conf = gcc::Config::new();
@@ -12,4 +16,26 @@ fn main() {
conf.include("../zephyr/include");
conf.debug(true);
conf.compile("libbootutil.a");
+ walk_dir("../boot").unwrap();
+ walk_dir("csupport").unwrap();
+ walk_dir("../zephyr").unwrap();
+}
+
+// Output the names of all files within a directory so that Cargo knows when to rebuild.
+fn walk_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
+ for ent in fs::read_dir(path.as_ref())? {
+ let ent = ent?;
+ let p = ent.path();
+ if p.is_dir() {
+ walk_dir(p)?;
+ } else {
+ // Note that non-utf8 names will fail.
+ let name = p.to_str().unwrap();
+ if name.ends_with(".c") || name.ends_with(".h") {
+ println!("cargo:rerun-if-changed={}", name);
+ }
+ }
+ }
+
+ Ok(())
}
|
Update README.md
Document CMake Usage and Project Example | @@ -148,6 +148,29 @@ The types used are actually unions that allow access to the same data multiple w
## Build
+### CMake (All platforms)
+```bash
+$ mkdir build
+$ cd build
+$ cmake .. # [Optional] -DCGLM_SHARED=ON
+$ make
+$ sudo make install # [Optional]
+```
+
+#### Use with your CMake project
+* Example:
+```cmake
+cmake_minimum_required(VERSION 3.8.2)
+
+project(<Your Project Name>)
+
+add_executable(${PROJECT_NAME} src/main.c)
+target_link_libraries(${LIBRARY_NAME} PRIVATE
+ cglm)
+
+add_subdirectory(external/cglm/)
+```
+
### Unix (Autotools)
```bash
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.