message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
wifi_provisioning: Fixed prov_ctx_lock of deinit provisioning manager | @@ -1349,6 +1349,7 @@ void wifi_prov_mgr_deinit(void)
ESP_LOGD(TAG, "Manager already de-initialized");
RELEASE_LOCK(prov_ctx_lock);
vSemaphoreDelete(prov_ctx_lock);
+ prov_ctx_lock = NULL;
return;
}
@@ -1401,6 +1402,7 @@ void wifi_prov_mgr_deinit(void)
}
vSemaphoreDelete(prov_ctx_lock);
+ prov_ctx_lock = NULL;
}
esp_err_t wifi_prov_mgr_start_provisioning(wifi_prov_security_t security, const void *wifi_prov_sec_params,
|
schema compile DOC update functions description | @@ -3111,8 +3111,9 @@ static LY_ERR lys_compile_node(struct lysc_ctx *ctx, struct lysp_node *node_p, i
/**
* @brief Compile parsed RPC/action schema node information.
* @param[in] ctx Compile context
- * @param[in] node_p Parsed RPC/action schema node.
+ * @param[in] action_p Parsed RPC/action schema node.
* @param[in] options Various options to modify compiler behavior, see [compile flags](@ref scflags).
+ * @param[in] parent Parent node of the action, NULL in case of RPC (top-level action)
* @param[in,out] action Prepared (empty) compiled action structure to fill.
* @param[in] uses_status If the RPC/action is being placed instead of uses, here we have the uses's status value (as node's flags).
* Zero means no uses, non-zero value with no status bit set mean the default status.
@@ -3177,12 +3178,13 @@ cleanup:
}
/**
- * @brief Compile parsed RPC/action schema node information.
+ * @brief Compile parsed Notification schema node information.
* @param[in] ctx Compile context
- * @param[in] node_p Parsed RPC/action schema node.
+ * @param[in] notif_p Parsed Notification schema node.
* @param[in] options Various options to modify compiler behavior, see [compile flags](@ref scflags).
- * @param[in,out] action Prepared (empty) compiled action structure to fill.
- * @param[in] uses_status If the RPC/action is being placed instead of uses, here we have the uses's status value (as node's flags).
+ * @param[in] parent Parent node of the Notification, NULL in case of top-level Notification
+ * @param[in,out] notif Prepared (empty) compiled notification structure to fill.
+ * @param[in] uses_status If the Notification is being placed instead of uses, here we have the uses's status value (as node's flags).
* Zero means no uses, non-zero value with no status bit set mean the default status.
* @return LY_ERR value - LY_SUCCESS or LY_EVALID.
*/
|
fix ci error: Failed test at t/40unix-socket.t line 26 | @@ -425,7 +425,7 @@ h2o_socket_t *h2o_evloop_socket_accept(h2o_socket_t *_listener)
fcntl(fd, F_SETFL, O_NONBLOCK);
#endif
- {
+ if (0) { /* not apply to AF_UNIX sockets */
int flag = 0;
socklen_t len = sizeof(flag);
assert(0 == getsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &flag, &len) && flag == 1);
|
sslapitest: Add test for premature call of SSL_export_keying_material | @@ -5690,8 +5690,19 @@ static int test_export_key_mat(int tst)
goto end;
if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL,
- NULL))
- || !TEST_true(create_ssl_connection(serverssl, clientssl,
+ NULL)))
+ goto end;
+
+ /*
+ * Premature call of SSL_export_keying_material should just fail.
+ */
+ if (!TEST_int_le(SSL_export_keying_material(clientssl, ckeymat1,
+ sizeof(ckeymat1), label,
+ SMALL_LABEL_LEN + 1, context,
+ sizeof(context) - 1, 1), 0))
+ goto end;
+
+ if (!TEST_true(create_ssl_connection(serverssl, clientssl,
SSL_ERROR_NONE)))
goto end;
|
BugID:17279774: support multipule for apps | @@ -78,7 +78,9 @@ else
ifeq ($(MBINS),)
GLOBAL_LDFLAGS += -T board/developerkit/STM32L496VGTx_FLASH.ld
else ifeq ($(MBINS),app)
+ifeq ($(LDS),STM32L496VGTx_FLASH_app.ld)
GLOBAL_LDFLAGS += -T board/developerkit/STM32L496VGTx_FLASH_app.ld
+endif
else ifeq ($(MBINS),kernel)
GLOBAL_LDFLAGS += -T board/developerkit/STM32L496VGTx_FLASH_kernel.ld
endif
|
BugID:21716117: Fix vfs test compile error for esp8266 | @@ -39,7 +39,7 @@ static int32_t vfs_test_write(vfs_file_t *fp, const char *buf, uint32_t len)
return VFS_FUNC_ATTACH;
}
-static uint32_t vfs_test_lseek(vfs_file_t *fp, uint32_t off, int32_t whence)
+static uint32_t vfs_test_lseek(vfs_file_t *fp, int64_t off, int32_t whence)
{
return VFS_FUNC_ATTACH;
}
|
feat: improve the debuggablity of spec | @@ -230,6 +230,7 @@ struct jc_field {
struct inject_condition inject_condition;
char * comment;
bool lazy_init;
+ char spec[512];
};
static void
@@ -422,6 +423,8 @@ field_from_json(char *json, size_t size, void *x)
loc_from_json, &p->loc,
&p->comment);
+ snprintf(p->spec, sizeof(p->spec), "%.*s", size, json);
+
if (spec_buffer.start) {
addr_to_lnc (spec_buffer.start, spec_buffer.size, json, &lnc);
p->lnc.line += lnc.line;
@@ -1256,9 +1259,11 @@ gen_struct(FILE *fp, struct jc_struct *s)
int i = 0;
for (i = 0; s->fields && s->fields[i]; i++) {
struct jc_field *f = s->fields[i];
- fprintf(fp, " // edit '%s:%d:%d' to change this field\n",
+ fprintf(fp, " // edit '%s:%d:%d' to change the following spec to change field\n",
spec_name, f->lnc.line + 1, f->lnc.column);
+ fprintf(fp, " // '%s'\n", f->spec);
emit_field(NULL, fp, f);
+ fprintf(fp, "\n");
}
fprintf(fp, " struct {\n");
fprintf(fp, " bool enable_arg_switches;\n");
|
added counter for RESERVED MANAGEMENT FRAMES | @@ -142,6 +142,7 @@ static long int pagcount;
static long int proberesponsecount;
static long int proberequestcount;
static long int proberequestdirectedcount;
+static long int mgtreservedcount;
static long int deauthenticationcount;
static long int disassociationcount;
static long int authenticationcount;
@@ -385,6 +386,7 @@ pagcount = 0;
proberesponsecount = 0;
proberequestcount = 0;
proberequestdirectedcount = 0;
+mgtreservedcount = 0;
deauthenticationcount = 0;
disassociationcount = 0;
authenticationcount = 0;
@@ -535,6 +537,7 @@ if(reassociationrequestpsk256count > 0) printf("REASSOCIATIONREQUEST (PSK SHA256
if(reassociationrequestsae256count > 0) printf("REASSOCIATIONREQUEST (SAE SHA256)........: %ld\n", reassociationrequestsae256count);
if(reassociationrequestsae384bcount > 0)printf("REASSOCIATIONREQUEST (SAE SHA384 SUITE B): %ld\n", reassociationrequestsae384bcount);
if(reassociationrequestowecount > 0) printf("REASSOCIATIONREQUEST (OWE)...............: %ld\n", reassociationrequestowecount);
+if(mgtreservedcount > 0) printf("RESERVED MANAGEMENT FRAMES...............: %ld\n", mgtreservedcount);
if(wpaenccount > 0) printf("WPA encrypted............................: %ld\n", wpaenccount);
if(wepenccount > 0) printf("WEP encrypted............................: %ld\n", wepenccount);
if(ipv4count > 0) printf("IPv4.....................................: %ld\n", ipv4count);
@@ -3286,6 +3289,7 @@ if(macfrx->type == IEEE80211_FTYPE_MGMT)
else if(macfrx->subtype == IEEE80211_STYPE_ACTION) process80211action(payloadlen, payloadptr);
else if(macfrx->subtype == IEEE80211_STYPE_DEAUTH) deauthenticationcount++;
else if(macfrx->subtype == IEEE80211_STYPE_DISASSOC) disassociationcount++;
+ else if(macfrx->subtype == IEEE80211_STYPE_MGTRESERVED) mgtreservedcount++;
}
else if(macfrx->type == IEEE80211_FTYPE_DATA)
{
|
post-prod build: comment in future link in docs for staging website | @@ -4,11 +4,7 @@ title: Working With AppScope
# Working With AppScope
-These docs explain how to "drive" AppScope directly. You can also "drive" AppScope from Cribl Stream or Cribl Edge.
-
-<!--
-: see Cribl's documentation about the [AppScope Source](https://docs.cribl.io/stream/sources-appscope) and the [AppScope Config Editor](https://docs.cribl.io/stream/4.0/appscope-configs).
--->
+These docs explain how to "drive" AppScope directly. You can also "drive" AppScope from Cribl Stream or Cribl Edge: see Cribl's documentation about the [AppScope Source](https://docs.cribl.io/stream/sources-appscope) and the [AppScope Config Editor](https://docs.cribl.io/stream/4.0/appscope-configs).
There are three main things to know to work effectively with AppScope:
|
use IPv4 socket, IPv6 might be turned off | @@ -60,24 +60,25 @@ int select_read( int sockfd, char buffer[], int bufsize, struct timeval *tv ) {
}
}
-int udp_send( char buffer[], uint8_t port ) {
+int udp_send( char buffer[], uint16_t port ) {
struct timeval tv;
- IP6 sockaddr;
+ IP4 addr;
socklen_t addrlen;
int sockfd;
int n;
- sockaddr.sin6_family = AF_INET6;
- inet_pton( AF_INET6, "::1", &sockaddr.sin6_addr);
- sockaddr.sin6_port = htons( port );
+ memset( &addr, 0, sizeof(addr) );
+ addr.sin_family = AF_INET;
+ addr.sin_port = htons( port );
+ inet_pton( AF_INET, "127.0.0.1", &addr.sin_addr );
- if( (sockfd = socket( sockaddr.sin6_family, SOCK_DGRAM, IPPROTO_UDP )) < 0 ) {
+ if( (sockfd = socket( addr.sin_family, SOCK_DGRAM, IPPROTO_UDP )) < 0 ) {
fprintf( stderr, "Failed to create socket: %s\n", strerror( errno ) );
return 1;
}
- addrlen = sizeof( sockaddr );
- if( sendto( sockfd, buffer, strlen(buffer), 0, (struct sockaddr *)&sockaddr, addrlen ) < 0 ) {
+ addrlen = sizeof( addr );
+ if( sendto( sockfd, buffer, strlen(buffer), 0, (struct sockaddr *)&addr, addrlen ) < 0 ) {
fprintf( stderr, "Cannot connect to server: %s\n", strerror( errno ) );
return 1;
}
|
test for bart logo phantom | @@ -49,6 +49,16 @@ tests/test-phantom-ksp-coil: fft nrmse $(TESTS_OUT)/shepplogan_coil.ra $(TESTS_O
touch $@
+tests/test-phantom-bart: fft nrmse phantom
+ set -e; mkdir $(TESTS_TMP) ; cd $(TESTS_TMP) ;\
+ $(TOOLDIR)/phantom -B -k k.ra ;\
+ $(TOOLDIR)/fft -i 3 k.ra x.ra ;\
+ $(TOOLDIR)/phantom -B r.ra ;\
+ $(TOOLDIR)/nrmse -t 0.21 r.ra x.ra ;\
+ rm *.ra ; cd .. ; rmdir $(TESTS_TMP)
+ touch $@
+
+
tests/test-phantom-basis: nrmse phantom fmac
set -e; mkdir $(TESTS_TMP) ; cd $(TESTS_TMP) ;\
$(TOOLDIR)/phantom -T -k k0.ra ;\
@@ -61,5 +71,5 @@ tests/test-phantom-basis: nrmse phantom fmac
TESTS += tests/test-phantom-ksp tests/test-phantom-noncart tests/test-phantom-coil tests/test-phantom-ksp-coil
-TESTS += tests/test-phantom-basis
+TESTS += tests/test-phantom-bart tests/test-phantom-basis
|
fix SSH configuration in alpine.sh | @@ -100,6 +100,8 @@ rc-update add local default
rc-update add dcron default
rc-update add sshd default
+sed -i 's/^#PermitRootLogin.*/PermitRootLogin yes/' etc/ssh/sshd_config
+
echo root:$passwd | chpasswd
setup-hostname red-pitaya
|
conf: parsers: new parsers syslog-rfc3164-local and syslog-rfc3164 | Time_Keep On
[PARSER]
- Name syslog-rfc3164
+ Name syslog-rfc3164-local
Format regex
Regex ^\<(?<pri>[0-9]+)\>(?<time>[^ ]* {1,2}[^ ]* [^ ]*) (?<ident>[a-zA-Z0-9_\/\.\-]*)(?:\[(?<pid>[0-9]+)\])?(?:[^\:]*\:)? *(?<message>.*)$
Time_Key time
Time_Format %b %d %H:%M:%S
Time_Keep On
+
+[PARSER]
+ Name syslog-rfc3164
+ Format regex
+ Regex /^\<(?<pri>[0-9]+)\>(?<time>[^ ]* {1,2}[^ ]* [^ ]*) (?<host>[^ ]*) (?<ident>[a-zA-Z0-9_\/\.\-]*)(?:\[(?<pid>[0-9]+)\])?(?:[^\:]*\:)? *(?<message>.*)$/
+ Time_Key time
+ Time_Format %b %d %H:%M:%S
+ Time_Format %Y-%m-%dT%H:%M:%S.%L
+ Time_Keep On
|
Reload PyPi web view after pip command | @@ -14,7 +14,7 @@ import UIKit
/// Closes this View controller.
@objc func closeViewController() {
return dismiss(animated: true, completion: {
- (((UIApplication.shared.keyWindow?.rootViewController as? UITabBarController)?.viewControllers?[2] as? UINavigationController)?.visibleViewController as? PipViewController)?.webView.reload()
+ ((UIApplication.shared.keyWindow?.rootViewController?.presentedViewController as? UINavigationController)?.visibleViewController as? PipViewController)?.webView.reload()
})
}
|
Rebase code and remove useless state in test script | @@ -8916,17 +8916,6 @@ run_test "TLS 1.3 m->G AES_128_GCM_SHA256 , RSA_PKCSV15_SHA256" \
"$G_NEXT_SRV_RSA --disable-client-cert --priority=NORMAL:+CIPHER-ALL:+SHA256:+GROUP-SECP256R1:+ECDHE-ECDSA:+AEAD:+SIGN-RSA-SHA256:-VERS-ALL:+VERS-TLS1.3:%NO_TICKETS:%DISABLE_TLS13_COMPAT_MODE" \
"$P_CLI debug_level=4 force_version=tls1_3 server_name=localhost force_ciphersuite=TLS1-3-AES-128-GCM-SHA256" \
0 \
- -c "tls1_3 client state: 0" \
- -c "tls1_3 client state: 2" \
- -c "tls1_3 client state: 19" \
- -c "tls1_3 client state: 5" \
- -c "tls1_3 client state: 3" \
- -c "tls1_3 client state: 9" \
- -c "tls1_3 client state: 13" \
- -c "tls1_3 client state: 11" \
- -c "tls1_3 client state: 14" \
- -c "tls1_3 client state: 15" \
- -c "<= ssl_tls1_3_process_server_hello" \
-c "server hello, chosen ciphersuite: ( 1301 ) - TLS1-3-AES-128-GCM-SHA256" \
-s "Ephemeral EC Diffie-Hellman parameters" \
-s "Version: TLS1.3" \
@@ -8936,13 +8925,7 @@ run_test "TLS 1.3 m->G AES_128_GCM_SHA256 , RSA_PKCSV15_SHA256" \
-c "ECDH curve: x25519" \
-c "server hello, chosen ciphersuite: ( 1301 ) - TLS1-3-AES-128-GCM-SHA256" \
-c "Certificate Verify: Signature algorithm ( 0804 )" \
- -c "=> ssl_tls1_3_process_server_hello" \
- -c "<= parse encrypted extensions" \
- -c "Certificate verification flags clear" \
- -c "=> parse certificate verify" \
- -c "<= parse certificate verify" \
-c "mbedtls_ssl_tls13_process_certificate_verify() returned 0" \
- -c "<= parse finished message" \
-c "HTTP/1.0 200 OK"
# Test heap memory usage after handshake
|
added new tool pioff and usefull scripts (raspberry pi) | @@ -20,6 +20,8 @@ wlandump small, fast and simple active wlan scanner (no status output)
wlanscan small, fast and simple passive wlan scanner (status output)
+pioff turns raspberry pi off by gpio switch
+
wlancap2hcx converts cap to hccapx
wlanhcx2cap converts hccapx to cap
@@ -48,9 +50,9 @@ run make
run make install
-use Makefile.pi to compile on raspberry pi
+use Makefile.pi to compile (wlandump) on raspberry pi
-use Makefile.pi.gpio to compile on raspberry pi (needs hardware mods (gpiowait.odg))
+use Makefile.pi.gpio to compile (wlandump and pioff) on raspberry pi (needs hardware mods (gpiowait.odg))
Requirements
|
some weak candidate improvements | @@ -1261,12 +1261,15 @@ static void testhotbox(FILE *fhout, uint8_t essidlen, uint8_t *essid)
{
static int k1, k2;
static char *ev;
-static const char *hotbox = "HOTBOX-";
+static const char *hotbox = "HOTBOX";
static char essidtmp[PSKSTRING_LEN_MAX] = {};
+if(essidlen < 7) return;
+if(memcmp(essid, hotbox , 6) != 0) return;
+for(k1 = 500000000; k1 < 560000000; k1++) fprintf(fhout, "%010d\n", k1);
if(essidlen != 11) return;
-if(memcmp(essid, hotbox , 7) != 0) return;
+if(essid[6] != '-') return;
if((!isxdigit(essid[7])) || (!isxdigit(essid[8])) || (!isxdigit(essid[9])) || (!isxdigit(essid[10]))) return;
ev = (char*)(essid +7);
k2 = strtol(ev, NULL, 16);
|
balloon: return immediately if VirtIOWdfInitialize fails
In case of error in VirtIOWdfInitialize just return
proper error status. | @@ -270,6 +270,7 @@ BalloonEvtDevicePrepareHardware(
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR, DBG_POWER, "VirtIOWdfInitialize failed with %x\n", status);
+ return status;
}
if (NT_SUCCESS(status))
|
Fix use of int const in size of array.
Compiler complains about this use of a GNU extension now.
Replace by a #define.
BRANCH=None
TEST=to be done | @@ -158,7 +158,7 @@ static pthread_cond_t done_cond;
static pthread_mutex_t lock;
enum tcpc_cc_voltage_status next_cc1, next_cc2;
-const int MAX_MESSAGES = 8;
+#define MAX_MESSAGES 8
static struct message messages[MAX_MESSAGES];
void run_test(int argc, char **argv)
|
testcase/libc_string: Add abs comparison for float/double variable in strtof, strtol
For comparing float/double variable, abs is required because EPSILON is greater than 0. | #include <stdlib.h>
#include <string.h>
#include <tinyara/float.h>
+#include <tinyara/math.h>
#include "tc_internal.h"
#define BUFF_SIZE 5
@@ -868,12 +869,12 @@ static void tc_libc_string_strtof(void)
str = "123.456TizenRT";
value = strtof(str, &ptr);
- TC_ASSERT_LEQ("strtof", value - 123.456, FLT_EPSILON);
+ TC_ASSERT_LEQ("strtof", fabsf(value - 123.456f), FLT_EPSILON);
TC_ASSERT_EQ("strtof", strncmp(ptr, "TizenRT", strlen("TizenRT")), 0);
str = "-78.9123TinyAra";
value = strtof(str, &ptr);
- TC_ASSERT_LEQ("strtof", value - (-78.9123), FLT_EPSILON);
+ TC_ASSERT_LEQ("strtof", fabsf(value - (-78.9123f)), FLT_EPSILON);
TC_ASSERT_EQ("strtof", strncmp(ptr, "TinyAra", strlen("TinyAra")), 0);
TC_SUCCESS_RESULT();
@@ -895,12 +896,12 @@ static void tc_libc_string_strtold(void)
str = "123.456TizenRT";
value = strtold(str, &ptr);
- TC_ASSERT_LEQ("strtold", value - 123.456, DBL_EPSILON);
+ TC_ASSERT_LEQ("strtold", fabsl(value - 123.456), DBL_EPSILON);
TC_ASSERT_EQ("strtold", strncmp(ptr, "TizenRT", strlen("TizenRT")), 0);
str = "-78.9123TinyAra";
value = strtold(str, &ptr);
- TC_ASSERT_LEQ("strtold", value - (-78.9123), DBL_EPSILON);
+ TC_ASSERT_LEQ("strtold", fabsl(value - (-78.9123)), DBL_EPSILON);
TC_ASSERT_EQ("strtold", strncmp(ptr, "TinyAra", strlen("TinyAra")), 0);
TC_SUCCESS_RESULT();
|
use grep over diff since upstream version might append extra release | @@ -14,17 +14,16 @@ rpm=slurm${DELIM}
@test "[$RESOURCE_MANAGER] Verify SLURM RPM version matches sinfo binary" {
# check version against rpm
local version="$(rpm -q --queryformat='%{VERSION}\n' $rpm)"
- rpm -q --queryformat='%{VERSION}\n' $rpm >& .version.rpm
run which sinfo
assert_success
sinfo --version | awk '{print $2}' >& .version_binary
- run diff .version.rpm .version_binary
+ run grep "^${version}" .version_binary
assert_success
- rm -f .version_output
+ rm -f .version_binary
}
|
extmod/modlwip: Commit TCP out data to lower layers if buffer gets full.
Dramatically improves TCP sending throughput because without an explicit
call to tcp_output() the data is only sent to the lower layers via the
lwIP slow timer which (by default) ticks every 500ms. | @@ -498,6 +498,11 @@ STATIC mp_uint_t lwip_tcp_send(lwip_socket_obj_t *socket, const byte *buf, mp_ui
err_t err = tcp_write(socket->pcb.tcp, buf, write_len, TCP_WRITE_FLAG_COPY);
+ // If the output buffer is getting full then send the data to the lower layers
+ if (err == ERR_OK && tcp_sndbuf(socket->pcb.tcp) < TCP_SND_BUF / 4) {
+ err = tcp_output(socket->pcb.tcp);
+ }
+
if (err != ERR_OK) {
*_errno = error_lookup_table[-err];
return MP_STREAM_ERROR;
|
Have example/gifplayer show partial results | @@ -370,13 +370,11 @@ const char* play() {
}
}
- status = wuffs_gif__decoder__decode_frame(&dec, &pb, &src, workbuf, NULL);
- if (status) {
- if (status == wuffs_base__warning__end_of_data) {
+ wuffs_base__status decode_frame_status =
+ wuffs_gif__decoder__decode_frame(&dec, &pb, &src, workbuf, NULL);
+ if (decode_frame_status == wuffs_base__warning__end_of_data) {
break;
}
- return status;
- }
compose(&pb, wuffs_base__frame_config__bounds(&fc));
@@ -416,12 +414,17 @@ const char* play() {
#endif
fwrite(printbuf.ptr, sizeof(uint8_t), n, stdout);
+ fflush(stdout);
cumulative_delay_micros +=
(1000 * wuffs_base__frame_config__duration(&fc)) /
WUFFS_BASE__FLICKS_PER_MILLISECOND;
// TODO: should a zero duration mean to show this frame forever?
+
+ if (decode_frame_status) {
+ return decode_frame_status;
+ }
}
if (first_play) {
|
[mod_webdav] copy_file_range() new in FreeBSD 13
(thx devnexen)
adjust feature defines for header visibility of copy_file_range()
(introduced in FreeBSD 13)
x-ref: | #ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
+#ifdef HAVE_COPY_FILE_RANGE /* FreeBSD 13+ */
+#ifdef __FreeBSD__ /* FreeBSD strict compliance hides libc extensions */
+/*#define _XOPEN_SOURCE 700*//*(defined above)*/
+#define _ISOC11_SOURCE
+#define __BSD_VISIBLE 1
+#endif
+#endif
#include "first.h" /* first */
#include "sys-mmap.h"
|
examples/openssl: more intelligent make.sh | set -x
set -e
-TYPE="$1"
+DIR="$1"
SAN="$2"
+TYPE=`basename "$DIR"`
HFUZZ_SRC=~/src/honggfuzz/
OS=`uname -s`
CC="$HFUZZ_SRC/hfuzz_cc/hfuzz-clang"
-CXX="$HFUZZ_SRC/hfuzz_cc/hfuzz-clangclang++"
+CXX="$HFUZZ_SRC/hfuzz_cc/hfuzz-clang++"
COMMON_FLAGS="-DBORINGSSL_UNSAFE_DETERMINISTIC_MODE -DBORINGSSL_UNSAFE_FUZZER_MODE -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -DBN_DEBUG \
-O3 -g -DFuzzerInitialize=LLVMFuzzerInitialize -DFuzzerTestOneInput=LLVMFuzzerTestOneInput -lpthread -lz -Wl,-z,now \
- -I./openssl-$TYPE/include -I$HFUZZ_SRC/examples/openssl"
+ -I./$DIR/include -I$HFUZZ_SRC/examples/openssl"
-if [ "$OS" = "Linux" ]; then
- COMMON_FLAGS="$COMMON_FLAGS -ldl"
+if [ -z "$DIR" ]; then
+ echo "$0" DIR SANITIZE
+ exit 1
fi
-if [ -z "$TYPE" ]; then
- echo "$0" DIR SANITIZE
+LIBSSL="`find "$DIR" -type f -name 'libssl.a' | head -n1`"
+if [ -z "$LIBSSL" ]; then
+ echo "Couldn't find libssl.a inside $DIR"
exit 1
fi
+LIBCRYPTO="`find "$DIR" -type f -name 'libcrypto.a' | head -n1`"
+if [ -z "$LIBCRYPTO" ]; then
+ echo "Couldn't find libcrypto.a inside $DIR"
+ exit 1
+fi
+
+
+if [ "$OS" = "Linux" ]; then
+ COMMON_FLAGS="$COMMON_FLAGS -ldl"
+fi
+
if [ -n "$SAN" ]; then
SAN_COMPILE="-fsanitize=$SAN"
SAN=".$SAN"
fi
-$CC $COMMON_FLAGS -g "$HFUZZ_SRC/examples/openssl/server.c" -o "persistent.server.openssl.$TYPE$SAN" "./openssl-$TYPE/libssl.a" "./openssl-$TYPE/libcrypto.a" $SAN_COMPILE
-$CC $COMMON_FLAGS -g "$HFUZZ_SRC/examples/openssl/client.c" -o "persistent.client.openssl.$TYPE$SAN" "./openssl-$TYPE/libssl.a" "./openssl-$TYPE/libcrypto.a" $SAN_COMPILE
-$CC $COMMON_FLAGS -g "$HFUZZ_SRC/examples/openssl/x509.c" -o "persistent.x509.openssl.$TYPE$SAN" "./openssl-$TYPE/libssl.a" "./openssl-$TYPE/libcrypto.a" $SAN_COMPILE
-$CC $COMMON_FLAGS -g "$HFUZZ_SRC/examples/openssl/privkey.c" -o "persistent.privkey.openssl.$TYPE$SAN" "./openssl-$TYPE/libssl.a" "./openssl-$TYPE/libcrypto.a" $SAN_COMPILE
+for x in x509 privkey client server; do
+ $CC $COMMON_FLAGS -g "$HFUZZ_SRC/examples/openssl/$x.c" -o "$x.openssl.$TYPE$SAN" "$LIBSSL" "$LIBCRYPTO" $SAN_COMPILE
+done
|
tool: elektrad - fix Post Meta handler, add Delete Meta Handler | @@ -29,18 +29,27 @@ func PostMetaHandler(w http.ResponseWriter, r *http.Request) {
kdb := getHandle(r)
- ks, err := elektra.CreateKeySet()
+ parentKey, err := elektra.CreateKey(keyName)
if err != nil {
writeError(w, err)
return
}
- parentKey, _ := elektra.CreateKey(keyName)
- _, err = kdb.Get(ks, parentKey)
+ ks, err := getKeySet(kdb, parentKey)
+
+ if err != nil {
+ writeError(w, err)
+ return
+ }
k, err := ks.Lookup(parentKey)
+ if err != nil {
+ writeError(w, err)
+ return
+ }
+
if k == nil {
err = ks.AppendKey(parentKey)
}
@@ -54,9 +63,15 @@ func PostMetaHandler(w http.ResponseWriter, r *http.Request) {
err = k.DeleteMeta(meta.Key)
} else {
err = k.SetMeta(meta.Key, *meta.Value)
+ }
+ if err != nil {
+ writeError(w, err)
+ return
}
+ _, err = kdb.Set(ks, parentKey)
+
if err != nil {
writeError(w, err)
return
@@ -66,19 +81,45 @@ func PostMetaHandler(w http.ResponseWriter, r *http.Request) {
}
func DeleteMetaHandler(w http.ResponseWriter, r *http.Request) {
- // kdb := kdbHandle()
+ kdb := getHandle(r)
- // ks, err := elektra.CreateKeySet()
+ var meta KeyValueBody
- // if err != nil {
- // writeError(w, err)
- // return
- // }
+ keyName := parseKeyNameFromURL(r)
- // keyName := parseKeyNameFromURL(r)
+ decoder := json.NewDecoder(r.Body)
+ if err := decoder.Decode(&meta); err != nil {
+ writeError(w, err)
+ return
+ }
- // key, _ := elektra.CreateKey(keyName)
- // _, err = kdb.Get(ks, key)
+ key, err := elektra.CreateKey(keyName)
- // writeResponse(w, response)
+ if err != nil {
+ writeError(w, err)
+ return
+ }
+
+ keySet, err := getKeySet(kdb, key)
+
+ if err != nil {
+ writeError(w, err)
+ return
+ }
+
+ err = key.DeleteMeta(meta.Key)
+
+ if err != nil {
+ writeError(w, err)
+ return
+ }
+
+ _, err = kdb.Set(keySet, key)
+
+ if err != nil {
+ writeError(w, err)
+ return
+ }
+
+ noContent(w)
}
|
hw/drivers/pwm: Fix potential crash on pwm_nrf52 | @@ -309,7 +309,9 @@ nrf52_pwm_open(struct os_dev *odev, uint32_t wait, void *arg)
}
if (odev->od_flags & OS_DEV_F_STATUS_OPEN) {
+ if (os_started()) {
os_mutex_release(&dev->pwm_lock);
+ }
stat = OS_EBUSY;
return (stat);
}
|
GM: max param definitions | @@ -15,6 +15,9 @@ const int GM_MAX_RATE_UP = 7;
const int GM_MAX_RATE_DOWN = 17;
const int GM_DRIVER_TORQUE_ALLOWANCE = 50;
const int GM_DRIVER_TORQUE_FACTOR = 4;
+const int GM_MAX_GAS = 3072;
+const int GM_MAX_REGEN = 1404;
+const int GM_MAX_BRAKE = 255;
int gm_brake_prev = 0;
int gm_gas_prev = 0;
@@ -143,7 +146,7 @@ static int gm_tx_hook(CAN_FIFOMailBox_TypeDef *to_send) {
int brake = ((rdlr & 0xF) << 8) + ((rdlr & 0xFF00) >> 8);
brake = (0x1000 - brake) & 0xFFF;
if (current_controls_allowed) {
- if (brake > 255) return 0;
+ if (brake > GM_MAX_BRAKE) return 0;
} else {
if (brake != 0) return 0;
}
@@ -207,11 +210,11 @@ static int gm_tx_hook(CAN_FIFOMailBox_TypeDef *to_send) {
int gas_regen = ((rdlr & 0x7F0000) >> 11) + ((rdlr & 0xF8000000) >> 27);
int apply = rdlr & 1;
if (current_controls_allowed) {
- if (gas_regen > 3072) return 0;
+ if (gas_regen > GM_MAX_GAS) return 0;
} else {
// Disabled message is !engaed with gas
// value that corresponds to max regen.
- if (apply || gas_regen != 1404) return 0;
+ if (apply || gas_regen != GM_MAX_REGEN) return 0;
}
}
|
Fix assert querying LastSystemCallText for threads | @@ -1328,7 +1328,6 @@ BOOLEAN NTAPI PhpThreadTreeNewCallback(
PhInitFormatSR(&format[5], waitTime->sr);
PhInitFormatC(&format[6], L']');
PhMoveReference(&node->LastSystemCallText, PhFormat(format, 7, 0x40));
- PhDereferenceObject(systemCallName);
}
}
}
|
peview: Fix searching pdb tab RVA | @@ -883,6 +883,12 @@ BOOLEAN PvSymbolTreeFilterCallback(
return TRUE;
}
+ if (node->Pointer[0])
+ {
+ if (WordMatchStringZ(context, node->Pointer))
+ return TRUE;
+ }
+
return FALSE;
}
|
netlink: add RTA_MAX definition | #define RTA_OIF 4 /* Argument: Output interface index */
#define RTA_GATEWAY 5 /* Argument: Gateway address of the route */
#define RTA_GENMASK 6 /* Argument: Network address mask of sub-net */
+#define RTA_MAX 6 /* MAX type, same as last argument */
/* NETLINK_ROUTE protocol message types *************************************/
|
Geocoding address merging fixes | @@ -97,13 +97,10 @@ namespace carto { namespace geocoding {
}
bool Address::merge(const Address& address) {
- if (address.country == country && address.region == region && address.county == county && address.locality == locality && address.neighbourhood == neighbourhood && address.street == street && address.houseNumber.empty() == houseNumber.empty()) {
+ if (address.country == country && address.region == region && address.county == county && address.locality == locality && address.neighbourhood == neighbourhood && address.street == street && address.name == name && address.houseNumber.empty() == houseNumber.empty()) {
if (address.id != id) {
id = 0;
}
- if (toLower(toUniString(address.name)) != toLower(toUniString(name))) {
- name.clear();
- }
if (!houseNumber.empty()) {
houseNumber += "," + address.houseNumber;
}
|
esp-tls: fix memory leak when using CA certification validation | @@ -136,7 +136,7 @@ static void mbedtls_cleanup(esp_tls_t *tls)
if (!tls) {
return;
}
-
+ mbedtls_x509_crt_free(&tls->cacert);
mbedtls_entropy_free(&tls->entropy);
mbedtls_ssl_config_free(&tls->conf);
mbedtls_ctr_drbg_free(&tls->ctr_drbg);
|
tests: increase timeout
This test fails intermittently, increase the timeout
to see if that fixes the problem. | @@ -219,7 +219,7 @@ make -j$(CPUS) node.cooja TARGET=cooja MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=
<plugin>
org.contikios.cooja.plugins.ScriptRunner
<plugin_config>
- <script>TIMEOUT(360000); /* Time out after 6 minutes */
+ <script>TIMEOUT(660000); /* Time out after 11 minutes */
/* Wait until a node (can only be the DAGRoot) has
* 9 routing entries including one for the root (i.e. can reach every node) */
log.log("Waiting for routing links to fill\n");
|
turn off TOOLBOX_PATH overriding by default | @@ -60,11 +60,12 @@ int main_bart(int argc, char* argv[])
exit(1);
}
- const char* tpath[3] = {
-
+ const char* tpath[] = {
+#ifdef TOOLBOX_PATH_OVERRIDE
getenv("TOOLBOX_PATH"),
- "/usr/lib/bart/commands/",
+#endif
"/usr/local/lib/bart/commands/",
+ "/usr/lib/bart/commands/",
};
for (unsigned int i = 0; i < ARRAY_SIZE(tpath); i++) {
|
fix(release/com.py): fail to update Kconfig version | @@ -98,10 +98,10 @@ def update_version(ver):
cmd("sed -i -r 's/version=[0-9]+\.[0-9]+\.[0-9]+/"+ "version=" + ver_num + "/' library.properties")
if path.exists("conf.py"):
- cmd("sed -i -r \"s/'v[0-9]+\.[0-9]+\.[0-9]+.*'/\'" + ver_str + "'/\" conf.py")
+ cmd("sed -i -r 's/v[0-9]+\.[0-9]+\.[0-9]+.*/" + ver_str + "/' conf.py")
if path.exists("Kconfig"):
- cmd("sed -i -r \"s/'v[0-9]+\.[0-9]+\.[0-9]+.*'/\'" + ver_str + "'/\" Kconfig")
+ cmd("sed -i -r 's/v[0-9]+\.[0-9]+\.[0-9]+.*/" + ver_str + "/' Kconfig")
if path.exists("lvgl.h"):
define_set("./lvgl.h", "LVGL_VERSION_MAJOR", str(ver[0]))
|
Jenkins: Add `-Werror` to `debian-stable-full-ini` | @@ -574,7 +574,8 @@ def generateFullBuildStages() {
DOCKER_IMAGES.stretch,
CMAKE_FLAGS_BUILD_ALL +
CMAKE_FLAGS_INI +
- CMAKE_FLAGS_COVERAGE
+ CMAKE_FLAGS_COVERAGE +
+ CMAKE_FLAGS_WERROR
,
[TEST.ALL, TEST.MEM]
)
|
BugID:16846667:Delete inline assembly
Replace the old inline assembly which triggers
SVC exception with a function call
modified: rhino/uspace/u_task.c | #if (RHINO_CONFIG_USER_SPACE > 0)
+extern void utask_become_usermode(void *);
+
static void start_utask(void *arg)
{
ktask_t *task;
- volatile cpu_stack_t *kstack;
+ cpu_stack_t *kstack;
task = krhino_cur_task_get();
kstack = task->task_stack_base + task->stack_size;
- __asm__(
- "mov r0, %0\t\n"
- "svc #0x01\t\n"
- :: "r"(kstack)
- : "r0"
- );
+ utask_become_usermode((void*)kstack);
if (task->entry) {
task->entry(arg);
|
80-test_cmp_http.t: Add diagnostic info on starting/stopping mock server | @@ -273,12 +273,17 @@ sub start_mock_server {
my $cmd = "LD_LIBRARY_PATH=$dir DYLD_LIBRARY_PATH=$dir " .
bldtop_dir($app) . " -config server.cnf $args";
my $pid = mock_server_pid();
- return $pid if $pid; # already running
+ if ($pid) {
+ print "Mock server already running with pid=$pid\n";
+ return $pid;
+ }
+ print "Launching mock server: $cmd\n";
return system("$cmd &") == 0 # start in background, check for success
? (sleep 1, mock_server_pid()) : 0;
}
sub stop_mock_server {
my $pid = $_[0];
+ print "Killing mock server with pid=$pid\n";
system("kill $pid") if $pid;
}
|
always use delayed_he_connect_req function | @@ -309,6 +309,7 @@ nt_he_open(neat_ctx *ctx, neat_flow *flow, struct neat_he_candidates *candidate_
candidate->pollable_socket->fd = -1;
candidate->prio_timer = NULL;
+#if 0
if (candidate->priority > 0 || 1) {
delayed_he_connect_req(candidate, callback_fx);
@@ -342,6 +343,11 @@ nt_he_open(neat_ctx *ctx, neat_flow *flow, struct neat_he_candidates *candidate_
}
}
+#else
+ delayed_he_connect_req(candidate, callback_fx);
+ candidate->pollable_socket->flow->heConnectAttemptCount++;
+ candidate = TAILQ_NEXT(candidate, next);
+#endif
}
|
Remove d_m3EnableCodePageRefCounting from config | # define d_m3CodePageAlignSize 32*1024
# endif
-# ifndef d_m3EnableCodePageRefCounting
-# define d_m3EnableCodePageRefCounting 0
-# endif
-
# ifndef d_m3MaxFunctionStackHeight
# define d_m3MaxFunctionStackHeight 2000 // max: 32768
# endif
|
manage send error return | @@ -221,7 +221,10 @@ unsigned char luos_send_ring_buffer(module_t* module, msg_t* msg, void* ring_buf
memcpy(&msg->data[msg_data_index], &ring_buffer[*start_index], chunk_size);
*start_index = *start_index + chunk_size;
msg->header.size = *data_size;
- luos_send(module, msg);
+ if (luos_send(module, msg)){
+ // this message fail stop transmission and return an error
+ return 1;
+ }
if (*data_size > MAX_DATA_MSG_SIZE) {
*data_size -= MAX_DATA_MSG_SIZE;
} else {
|
nshlib:add platform_skip_login to nshlib.h | @@ -192,6 +192,26 @@ int nsh_telnetstart(sa_family_t family);
void platform_motd(FAR char *buffer, size_t buflen);
#endif
+/****************************************************************************
+ * Name: platform_skip_login
+ *
+ * Description:
+ * If CONFIG_NSH_PLATFORM_SKIP_LOGIN is defined, then platform-specific logic
+ * must provide this function in order to skip login.
+ *
+ * Input Parameters:
+ * None
+ *
+ * Returned value:
+ * OK - need to skip login
+ * else - no need to skip login
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_NSH_PLATFORM_SKIP_LOGIN
+int platform_skip_login(void);
+#endif
+
/****************************************************************************
* Name: platform_challenge
*
|
docs: fix double spelling error in bt_spp_initiator
when checking the idf.py menuconfig, we see that this path is incorrectly spelled | @@ -17,7 +17,7 @@ This example is designed to run on commonly available ESP32 development board, e
idf.py menuconfig
```
-In `menuconfig` path: `Coponent config --> Bluetooth--> Bluedroid Options -->SPP` and `Coponent config --> Bluetooth--> Bluedroid Options -->Secure Simple Pair`.
+In `menuconfig` path: `Component config --> Bluetooth--> Bluedroid Options -->SPP` and `Component config --> Bluetooth--> Bluedroid Options -->Secure Simple Pair`.
### Build and Flash
|
Cleaned up code and added quick button support for backlight as well | @@ -56,7 +56,6 @@ uint8_t battery_status = 0;
uint8_t battery_fault = 0;
uint16_t accel_address = LIS3DH_DEVICE_ADDRESS;
-
const uint32_t long_press_exit_time = 1000;
__attribute__((section(".persist"))) Persist persist;
@@ -530,33 +529,45 @@ protected:
}
}
- void update_item(const Item &item) override {
- if(item.id == BACKLIGHT) {
- if (blit::buttons & blit::Button::DPAD_LEFT) {
- persist.backlight -= 1.0f / 256.0f;
- } else if (blit::buttons & blit::Button::DPAD_RIGHT) {
- persist.backlight += 1.0f / 256.0f;
- }
- persist.backlight = std::fmin(1.0f, std::fmax(0.0f, persist.backlight));
- } else if(item.id == VOLUME) {
+ /*
+ * For values that are changed using sliders, in addition to DPAD_LEFT and DPAD_RIGHT smooth
+ * changing, we support Y to set to 0, X to set to full and A and B to set set in 1/4 steps.
+ *
+ * The function gets a pointer to the value that is to be changed.
+ */
+ void update_slider_item_value(float * value) {
if (blit::buttons & blit::Button::DPAD_LEFT) {
- persist.volume -= 1.0f / 256.0f;
+ *value -= 1.0f / 256.0f;
} else if (blit::buttons & blit::Button::DPAD_RIGHT) {
- persist.volume += 1.0f / 256.0f;
+ *value += 1.0f / 256.0f;
} else if (blit::buttons.released & blit::Button::A) {
- persist.volume += 0.25f;
+ *value += 0.25f;
} else if (blit::buttons.released & blit::Button::B) {
- persist.volume -= 0.25f;
+ *value -= 0.25f;
} else if (blit::buttons.released & blit::Button::Y) {
- persist.volume = 0.0f;
+ *value = 0.0f;
} else if (blit::buttons.released & blit::Button::X) {
- persist.volume = 1.0f;
+ *value = 1.0f;
}
+ }
+
+ /*
+ * update backlight and volume by checking some keys
+ */
+ void update_item(const Item &item) override {
+ if(item.id == BACKLIGHT) {
+ update_slider_item_value(&persist.backlight);
+ persist.backlight = std::fmin(1.0f, std::fmax(0.0f, persist.backlight));
+ } else if(item.id == VOLUME) {
+ update_slider_item_value(&persist.volume);
persist.volume = std::fmin(1.0f, std::fmax(0.0f, persist.volume));
blit_update_volume();
}
}
+ /*
+ * for non-slider items pressing A will activate the item and this function gets called
+ */
void item_activated(const Item &item) override {
switch(item.id) {
case SCREENSHOT:
|
fix: properly mentions newly created role | @@ -30,7 +30,7 @@ void set_role(client *client, const uint64_t guild_id, const uint64_t channel_id
if (role->id) {
char text[150];
- snprintf(text, sizeof(text), "Succesfully created <@!%" PRIu64 "> role", role->id);
+ snprintf(text, sizeof(text), "Succesfully created <@&%" PRIu64 "> role", role->id);
channel::message::create::params params2 = {
.content = text
|
examples/terminals: typo | @@ -35,7 +35,7 @@ int LLVMFuzzerInitialize(int* argc, char*** argv)
static bool isInteresting(const char* s, size_t len)
{
- for (size_t i = i; i < len; i++) {
+ for (size_t i = 0; i < len; i++) {
if (s[i] == '[') {
continue;
}
|
when MIMALLOC_VERBOSE is set, the all errors/warnings are shown | @@ -350,14 +350,18 @@ void _mi_verbose_message(const char* fmt, ...) {
}
static void mi_show_error_message(const char* fmt, va_list args) {
- if (!mi_option_is_enabled(mi_option_show_errors) && !mi_option_is_enabled(mi_option_verbose)) return;
+ if (!mi_option_is_enabled(mi_option_verbose)) {
+ if (!mi_option_is_enabled(mi_option_show_errors)) return;
if (mi_max_error_count >= 0 && (long)mi_atomic_increment_acq_rel(&error_count) > mi_max_error_count) return;
+ }
mi_vfprintf_thread(NULL, NULL, "mimalloc: error: ", fmt, args);
}
void _mi_warning_message(const char* fmt, ...) {
- if (!mi_option_is_enabled(mi_option_show_errors) && !mi_option_is_enabled(mi_option_verbose)) return;
+ if (!mi_option_is_enabled(mi_option_verbose)) {
+ if (!mi_option_is_enabled(mi_option_show_errors)) return;
if (mi_max_warning_count >= 0 && (long)mi_atomic_increment_acq_rel(&warning_count) > mi_max_warning_count) return;
+ }
va_list args;
va_start(args,fmt);
mi_vfprintf_thread(NULL, NULL, "mimalloc: warning: ", fmt, args);
|
notify: drop card | :: only send the last one, since hark accumulates notifcations
=/ =update [%notification `notification`(snag 0 (flop notes))]
=/ card (fact-all:io %notify-update !>(update))
- ?~ card ~
- [u.card]~
+ (drop card)
::
%kick
:_ this
|
BugID:22777851: fixed example/Config.in bug | @@ -244,6 +244,7 @@ source "app/example/uai_demo/uai_cifar10_demo/Config.in"
if AOS_APP_UAI_CIFAR10_DEMO
config AOS_BUILD_APP
default "uai_demo.uai_cifar10_demo"
+endif
source "app/example/uapp1/Config.in"
if AOS_APP_UAPP1
@@ -257,7 +258,5 @@ if AOS_APP_UAPP2
default "uapp2"
endif
-endif
-
endchoice
endif
|
test/pkcs7: Add init for PSA tests
Initialize the PSA subsystem in the test functions. | @@ -200,6 +200,8 @@ void pkcs7_verify( char *pkcs7_file, char *crt, char *filetobesigned )
mbedtls_pkcs7 pkcs7;
mbedtls_x509_crt x509;
+ USE_PSA_INIT();
+
mbedtls_pkcs7_init( &pkcs7 );
mbedtls_x509_crt_init( &x509 );
@@ -233,6 +235,7 @@ exit:
mbedtls_x509_crt_free( &x509 );
mbedtls_free( data );
mbedtls_pkcs7_free( &pkcs7 );
+ USE_PSA_DONE();
}
/* END_CASE */
@@ -253,6 +256,8 @@ void pkcs7_verify_hash( char *pkcs7_file, char *crt, char *filetobesigned )
mbedtls_pkcs7 pkcs7;
mbedtls_x509_crt x509;
+ USE_PSA_INIT();
+
mbedtls_pkcs7_init( &pkcs7 );
mbedtls_x509_crt_init( &x509 );
@@ -296,6 +301,7 @@ exit:
mbedtls_free( data );
mbedtls_pkcs7_free( &pkcs7 );
mbedtls_free( pkcs7_buf );
+ USE_PSA_DONE();
}
/* END_CASE */
@@ -313,6 +319,8 @@ void pkcs7_verify_badcert( char *pkcs7_file, char *crt, char *filetobesigned )
mbedtls_pkcs7 pkcs7;
mbedtls_x509_crt x509;
+ USE_PSA_INIT();
+
mbedtls_pkcs7_init( &pkcs7 );
mbedtls_x509_crt_init( &x509 );
@@ -346,6 +354,7 @@ exit:
mbedtls_free( data );
mbedtls_pkcs7_free( &pkcs7 );
mbedtls_free( pkcs7_buf );
+ USE_PSA_DONE();
}
/* END_CASE */
@@ -363,6 +372,8 @@ void pkcs7_verify_tampered_data( char *pkcs7_file, char *crt, char *filetobesign
mbedtls_pkcs7 pkcs7;
mbedtls_x509_crt x509;
+ USE_PSA_INIT();
+
mbedtls_pkcs7_init( &pkcs7 );
mbedtls_x509_crt_init( &x509 );
@@ -396,6 +407,7 @@ exit:
mbedtls_pkcs7_free( &pkcs7 );
mbedtls_free( data );
mbedtls_free( pkcs7_buf );
+ USE_PSA_DONE();
}
/* END_CASE */
|
Tools: Fix hssiloopback incorrectly prints and exit error code.
Fix hssiloopback incorrectly print to console that loopback has been enabled/disabled even if there are errors
Exit with error code 1 if error
Exit with error code 0 if no error | @@ -54,22 +54,20 @@ class FPGAHSSILPBK(HSSICOMMON):
poll for status
clear ctl address and ctl sts CSR
"""
- print("eth_group_loopback_en", self._loopback)
-
self.open(self._hssi_grps[0][0])
hssi_feature_list = hssi_feature(self.read32(0, 0xC))
if (self._port >= HSSI_PORT_COUNT):
print("Invalid Input port number")
self.close()
- return -1
+ return False
enable = self.register_field_get(hssi_feature_list.port_enable,
- self._port);
+ self._port)
if enable == 0:
- print("Input port is not enabled")
+ print("Input port is not enabled or active")
self.close()
- return -1
+ return False
ctl_addr = hssi_ctl_addr(0)
if (self._loopback):
@@ -87,7 +85,7 @@ class FPGAHSSILPBK(HSSICOMMON):
if not ret:
print("Failed to clear HSSI CTL STS csr")
self.close()
- return 0
+ return False
self.write32(0, HSSI_CSR.HSSI_CTL_ADDRESS.value, ctl_addr.value)
self.write32(0, HSSI_CSR.HSSI_CTL_STS.value, cmd_sts.value)
@@ -97,17 +95,16 @@ class FPGAHSSILPBK(HSSICOMMON):
0x2):
print("HSSI ctl sts csr fails to update ACK")
self.close()
- return 0
+ return False
ret = self.clear_ctl_sts_reg(0)
if not ret:
print("Failed to clear HSSI CTL STS csr")
self.close()
- return 0
+ return False
self.close()
-
- return 0
+ return True
def hssi_loopback_start(self):
"""
@@ -117,8 +114,10 @@ class FPGAHSSILPBK(HSSICOMMON):
print("----hssi_loopback_start----")
if not self.hssi_info(self._hssi_grps[0][0]):
print("Failed to read hssi information")
- sys.exit(1)
- self.hssi_loopback_en()
+ return False
+ if not self.hssi_loopback_en():
+ return False
+ return True
def main():
@@ -181,7 +180,6 @@ def main():
print('no FPGA found')
sys.exit(1)
-
args.hssi_grps = f.find_hssi_group(devs[0].get('pcie_address'))
print("args.hssi_grps", args.hssi_grps)
if len(args.hssi_grps) == 0:
@@ -191,7 +189,10 @@ def main():
print("fpga uid dev:", args.hssi_grps[0][0])
lp = FPGAHSSILPBK(args)
- lp.hssi_loopback_start()
+ if not lp.hssi_loopback_start():
+ print("Failed to Enable loopback")
+ sys.exit(1)
+ print("hssi loopback enabled")
if __name__ == "__main__":
|
Update joinASN value upon successful join. | @@ -239,11 +239,22 @@ bool cjoin_getIsJoined() {
}
void cjoin_setIsJoined(bool newValue) {
+ uint8_t array[5];
INTERRUPT_DECLARATION();
DISABLE_INTERRUPTS();
cjoin_vars.isJoined = newValue;
+ // Update Join ASN value
+ if (idmanager_getIsDAGroot() == FALSE) {
+ ieee154e_getAsn(array);
+ cjoin_vars.joinAsn.bytes0and1 = ((uint16_t) array[1] << 8) | ((uint16_t) array[0]);
+ cjoin_vars.joinAsn.bytes2and3 = ((uint16_t) array[3] << 8) | ((uint16_t) array[2]);
+ cjoin_vars.joinAsn.byte4 = array[4];
+ } else {
+ // Dag root resets the ASN value to zero
+ memset(&cjoin_vars.joinAsn, 0x00, sizeof(asn_t));
+ }
ENABLE_INTERRUPTS();
if (newValue == TRUE) {
|
Fortran interface: argument to codes_set_string_array does not need to be ALLOCATABLE | @@ -1819,7 +1819,7 @@ end subroutine codes_bufr_copy_data
subroutine codes_set_string_array ( msgid, key, value, status )
integer(kind=kindOfInt), intent(in) :: msgid
character(len=*), intent(in) :: key
- character(len=*), dimension(:),allocatable, intent(in) :: value
+ character(len=*), dimension(:), intent(in) :: value
integer(kind=kindOfInt),optional, intent(out) :: status
character :: cvalue(size(value)*len(value(0)))
|
Add a newline to end of pluginVsInstall test output.
Fixes problem with new text diffing calling out the final line as failure. | @@ -221,7 +221,7 @@ def do_plugin_type(pluginType, pluginList):
results = buildPlugin(pluginType, pluginList)
pp = pprint.PrettyPrinter(indent=4)
- txt = pp.pformat(results)
+ txt = pp.pformat(results) + "\n"
TestText("%sVsInstall"%pluginType, txt)
|
link checker: cleanup jenkins links | @@ -16,8 +16,6 @@ https://webdemo.libelektra.org
https://debian-stretch-repo.libelektra.org
https://crates.io/crates/elektra
https://crates.io/crates/elektra-sys
-https://wiki.jenkins-ci.org/display/JENKINS/GitHub%2BPR+Comment+Build+Plugin
-https://wiki.jenkins.io/display/JENKINS/Pipeline%2BMultibranch+Plugin
http://www.snmp.com/protocol
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.81.7888
http://localhost:33333
@@ -33,13 +31,13 @@ master.libelektra.org
puppet.libelektra.org
issues.libelektra.org
#currently broken links
+https://wiki.jenkins-ci.org/display/JENKINS/GitHub
+https://wiki.jenkins.io/display/JENKINS/Pipeline
https://cgit.kde.org/kconfig.git
https://doc.libelektra.org/coverage/master/debian-buster-full
http://mingw.org
http://api.zeromq.org/4-2:zmq-ipc
http://api.zeromq.org/4-2:zmq-tcp
-https://wiki.jenkins.io/display/JENKINS/Pipeline%2BMultibranch+Plugin
-https://wiki.jenkins-ci.org/display/JENKINS/GitHub%2BPR+Comment+Build+Plugin
https://www.jenkins.io/doc/pipeline/steps/pipeline-input-step
https://joeyh.name/code/moreutils
http://swagger.io
|
new rotation function: spin; rotate around self at any position | @@ -382,6 +382,21 @@ glm_rotate_atm(mat4 m, vec3 pivot, float angle, vec3 axis) {
glm_translate(m, pivotInv);
}
+/*!
+ * @brief rotate existing transform matrix around given axis by angle around self (doesn't affected by position)
+ *
+ * @param[in, out] m affine transfrom
+ * @param[in] angle angle (radians)
+ * @param[in] axis axis
+ */
+CGLM_INLINE
+void
+glm_spin(mat4 m, float angle, vec3 axis) {
+ CGLM_ALIGN_MAT mat4 rot;
+ glm_rotate_atm(rot, m[3], angle, axis);
+ glm_mat4_mul(m, rot, m);
+}
+
/*!
* @brief decompose scale vector
*
|
ci: Add an ability to use custom toolchain for testing | @@ -32,6 +32,7 @@ variables:
V: "0"
APPLY_BOT_FILTER_SCRIPT: "$CI_PROJECT_DIR/tools/ci/apply_bot_filter.py"
CHECKOUT_REF_SCRIPT: "$CI_PROJECT_DIR/tools/ci/checkout_project_ref.py"
+ CUSTOM_TOOLCHAIN_PATH: "/opt/xtensa-custom"
# Docker images
BOT_DOCKER_IMAGE_TAG: ":latest"
@@ -53,6 +54,25 @@ variables:
.apply_bot_filter: &apply_bot_filter
python $APPLY_BOT_FILTER_SCRIPT || exit 0
+.setup_custom_toolchain: &setup_custom_toolchain |
+ if [ "$IDF_XTENSA_TOOLCHAIN_URL" ] ; then
+ echo "Use a custom toolchain: ${IDF_XTENSA_TOOLCHAIN_URL:-Unknown}"
+ rm -rf "$CUSTOM_TOOLCHAIN_PATH" &&
+ mkdir -p -v "$CUSTOM_TOOLCHAIN_PATH" &&
+ pushd "$CUSTOM_TOOLCHAIN_PATH" &&
+ curl -sSL -o xtensa-custom.xxx "$IDF_XTENSA_TOOLCHAIN_URL" &&
+ ls -l xtensa-custom.xxx &&
+ tar xf xtensa-custom.xxx --strip-components 1 &&
+ ls -l . &&
+ popd
+ PATH=$CUSTOM_TOOLCHAIN_PATH/bin:$PATH
+ export PATH
+ fi
+
+.cleanup_custom_toolchain: &cleanup_custom_toolchain |
+ echo "Cleaning up $CUSTOM_TOOLCHAIN_PATH"
+ rm -rf "$CUSTOM_TOOLCHAIN_PATH"
+
before_script:
- source tools/ci/setup_python.sh
- *git_clean_stale_submodules
@@ -71,6 +91,8 @@ before_script:
# (the same regular expressions are used to set these are used in 'only:' sections below
- source tools/ci/configure_ci_environment.sh
+ - *setup_custom_toolchain
+
# fetch the submodules (& if necessary re-fetch repo) from gitlab
- time ./tools/ci/get-full-sources.sh
@@ -79,6 +101,7 @@ before_script:
before_script: &do_nothing_before_no_filter
- source tools/ci/setup_python.sh
- *git_clean_stale_submodules
+ - *setup_custom_toolchain
# used for everything else where we want to do no prep, except for bot filter
.do_nothing_before:
@@ -89,6 +112,7 @@ before_script:
- *apply_bot_filter
- echo "Not setting up GitLab key, not fetching submodules"
- source tools/ci/configure_ci_environment.sh
+ - *setup_custom_toolchain
.add_gitlab_key_before:
before_script: &add_gitlab_key_before
@@ -98,6 +122,7 @@ before_script:
- *apply_bot_filter
- echo "Not fetching submodules"
- source tools/ci/configure_ci_environment.sh
+ - *setup_custom_toolchain
# add gitlab ssh key
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
@@ -106,6 +131,9 @@ before_script:
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
+after_script:
+ - *cleanup_custom_toolchain
+
build_template_app:
stage: build
image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
|
Remove RTC1 properly. | @@ -182,8 +182,14 @@ if(WIN32 AND MSVC)
add_compile_options(/Oy)
# Disable runtime checks (not compatible with O2)
- string(REPLACE "/RTC1" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
- string(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ foreach(FLAG_VAR
+ CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE
+ CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
+ CMAKE_C_FLAGS CMAKE_C_FLAGS_RELEASE
+ CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
+ )
+ string(REGEX REPLACE "/RTC[^ ]*" "" ${FLAG_VAR} "${${FLAG_VAR}}")
+ endforeach(FLAG_VAR)
if(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
# Enable debug symbols
|
bsp/rb-nano2; configure SPI0 if syscfg says so. | #include "hal/hal_flash.h"
#include "hal/hal_spi.h"
#include "hal/hal_watchdog.h"
+#if MYNEWT_VAL(UART_0)
#include "uart/uart.h"
#include "uart_hal/uart_hal.h"
+#endif
#include "os/os_dev.h"
#if MYNEWT_VAL(UART_0)
@@ -165,4 +167,14 @@ hal_bsp_init(void)
OS_DEV_INIT_PRIMARY, 0, uart_hal_init, (void *)&os_bsp_uart0_cfg);
assert(rc == 0);
#endif
+
+#if MYNEWT_VAL(SPI_0_MASTER)
+ rc = hal_spi_init(0, (void *)&os_bsp_spi0m_cfg, HAL_SPI_TYPE_MASTER);
+ assert(rc == 0);
+#endif
+
+#if MYNEWT_VAL(SPI_0_SLAVE)
+ rc = hal_spi_init(0, (void *)&os_bsp_spi0s_cfg, HAL_SPI_TYPE_SLAVE);
+ assert(rc == 0);
+#endif
}
|
doc: improve the cipher life cycle diagram | @@ -24,30 +24,28 @@ digraph cipher {
finaled -> finaled [label="EVP_CIPHER_CTX_get_params\n(AEAD encryption)",
style=dashed];
finaled -> end [label="EVP_CIPHER_CTX_free"];
- finaled -> newed [label="EVP_CIPHER_CTX_reset", style=dashed,
- color="#034f84", fontcolor="#034f84"];
- updated -> newed [label="EVP_CIPHER_CTX_reset", style=dashed,
- color="#034f84", fontcolor="#034f84"];
newed -> d_initialised [label="EVP_DecryptInit"];
d_initialised -> d_initialised [label="EVP_DecryptInit\n(not required but allowed)",
style=dashed];
d_initialised -> d_updated [label="EVP_DecryptUpdate", weight=2];
d_updated -> d_updated [label="EVP_DecryptUpdate"];
d_updated -> finaled [label="EVP_DecryptFinal"];
- d_updated -> newed [label="EVP_CIPHER_CTX_reset", style=dashed,
- color="#034f84", fontcolor="#034f84"];
newed -> e_initialised [label="EVP_EncryptInit"];
e_initialised -> e_initialised [label="EVP_EncryptInit\n(not required but allowed)",
style=dashed];
e_initialised -> e_updated [label="EVP_EncryptUpdate", weight=2];
e_updated -> e_updated [label="EVP_EncryptUpdate"];
e_updated -> finaled [label="EVP_EncryptFinal"];
- e_updated -> newed [label="EVP_CIPHER_CTX_reset", style=dashed,
+ most -> newed [label="EVP_CIPHER_CTX_reset", style=dashed,
+ color="#034f84", fontcolor="#034f84"];
+ most [label="any of the initialised\nupdated or finaled states", style=dashed,
color="#034f84", fontcolor="#034f84"];
}
/* This is a version with a single flavour which is easier to comprehend
digraph cipher {
+ bgcolor="transparent";
+
begin [label=start, color="#deeaee", style="filled"];
newed [fontcolor="#c94c4c", style="solid"];
initialised [fontcolor="#c94c4c"];
|
Removed warning that could mislead the user | @@ -1926,11 +1926,7 @@ int stlink_version(stlink_t *sl) {
DLOG("swim version = 0x%x\n", sl->version.swim_v);
if (sl->version.jtag_v == 0) {
- DLOG(" notice: the firmware doesn't support a jtag/swd interface\n");
- }
-
- if (sl->version.swim_v == 0) {
- DLOG(" notice: the firmware doesn't support a swim interface\n");
+ WLOG(" warning: stlink doesn't support JTAG/SWD interface\n");
}
return (0);
|
Enable group creation for Sonoff | @@ -3295,6 +3295,7 @@ void DeRestPluginPrivate::checkSensorGroup(Sensor *sensor)
sensor->modelId().startsWith(QLatin1String("TRADFRI wireless dimmer")) ||
// sensor->modelId().startsWith(QLatin1String("SYMFONISK")) ||
sensor->modelId().startsWith(QLatin1String("902010/23")) || // bitron remote
+ sensor->modelId().startsWith(QLatin1String("WB01")) || // Sonoff SNZB-01
sensor->modelId().startsWith(QLatin1String("Bell")) || // Sage doorbell sensor
sensor->modelId().startsWith(QLatin1String("ZBT-CCTSwitch-D0001")) || //LDS Remote
sensor->modelId().startsWith(QLatin1String("ZBT-DIMSwitch")) || // Linkind 1 key Remote Control / ZS23000178
|
[Doc] Update file header copyright information for license | @@ -42,22 +42,16 @@ In every header file, there should be copyright information and Change Log
record like this:
/*
- * File : rtthread.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006, RT-Thread Development Team
+ * Copyright (c) 2006-2020, RT-Thread Development Team
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rt-thread.org/license/LICENSE.
+ * SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2006-03-18 Bernard the first version
* 2006-04-26 Bernard add semaphore APIs
- * ...
*/
-
5. Structure Defines
Please name structures in lower-case and connect words with "_". For example:
|
sbp2prettyjson: Filter out SBPMsgBadCrc and SBPMsgUnknown | @@ -27,19 +27,23 @@ import System.Console.CmdArgs
import System.IO
data Cfg = Cfg { skiporder :: Bool
- ,spaces :: Int}
+ , spaces :: Int
+ , skipfilter :: Bool }
deriving (Show, Data, Typeable)
defaultCfg :: Cfg
defaultCfg = Cfg { skiporder = False
- ,spaces = 0}
+ , spaces = 0
+ , skipfilter = False }
-- | Encode a SBPMsg to a line of JSON.
encodeLine :: Cfg -> SBPMsg -> ByteString
-encodeLine c v = toStrict
- $ encodePretty'
- (defConfig {confIndent = Spaces (spaces c),
- confCompare = if (skiporder c) then mempty else compare}) v <> "\n"
+encodeLine c (SBPMsgBadCrc _v) | not (skipfilter c) = mempty
+encodeLine c (SBPMsgUnknown _v) | not (skipfilter c) = mempty
+encodeLine c v = toStrict $ encodePretty' (defConfig
+ { confIndent = Spaces (spaces c)
+ , confCompare = if (skiporder c) then mempty else compare
+ }) v <> "\n"
main :: IO ()
main = do
|
ci: adjust build jobs parallel count | @@ -111,7 +111,7 @@ build_pytest_examples_esp32:
extends:
- .build_pytest_template
- .rules:build:example_test-esp32
- parallel: 3
+ parallel: 4
variables:
IDF_TARGET: esp32
TEST_DIR: examples
@@ -129,7 +129,7 @@ build_pytest_examples_esp32s3:
extends:
- .build_pytest_template
- .rules:build:example_test-esp32s3
- parallel: 3
+ parallel: 4
variables:
IDF_TARGET: esp32s3
TEST_DIR: examples
@@ -164,6 +164,7 @@ build_pytest_components_esp32s2:
extends:
- .build_pytest_template
- .rules:build:component_ut-esp32s2
+ parallel: 2
variables:
IDF_TARGET: esp32s2
TEST_DIR: components
@@ -172,6 +173,7 @@ build_pytest_components_esp32s3:
extends:
- .build_pytest_template
- .rules:build:component_ut-esp32s3
+ parallel: 2
variables:
IDF_TARGET: esp32s3
TEST_DIR: components
@@ -180,6 +182,7 @@ build_pytest_components_esp32c3:
extends:
- .build_pytest_template
- .rules:build:component_ut-esp32c3
+ parallel: 2
variables:
IDF_TARGET: esp32c3
TEST_DIR: components
@@ -428,7 +431,7 @@ build_examples_cmake_esp32:
extends:
- .build_cmake_template
- .rules:build:example_test-esp32
- parallel: 12
+ parallel: 9
variables:
IDF_TARGET: esp32
TEST_DIR: examples
@@ -437,7 +440,7 @@ build_examples_cmake_esp32s2:
extends:
- .build_cmake_template
- .rules:build:example_test-esp32s2
- parallel: 8
+ parallel: 6
variables:
IDF_TARGET: esp32s2
TEST_DIR: examples
@@ -446,7 +449,7 @@ build_examples_cmake_esp32s3:
extends:
- .build_cmake_template
- .rules:build:example_test-esp32s3
- parallel: 8
+ parallel: 7
variables:
IDF_TARGET: esp32s3
TEST_DIR: examples
@@ -455,7 +458,7 @@ build_examples_cmake_esp32c2:
extends:
- .build_cmake_template
- .rules:build:example_test-esp32c2
- parallel: 8
+ parallel: 4
variables:
IDF_TARGET: esp32c2
TEST_DIR: examples
@@ -464,7 +467,7 @@ build_examples_cmake_esp32c3:
extends:
- .build_cmake_template
- .rules:build:example_test-esp32c3
- parallel: 8
+ parallel: 6
variables:
IDF_TARGET: esp32c3
TEST_DIR: examples
|
Replace ScriptEvent select input with ReactSelect for consistency | @@ -33,6 +33,7 @@ import EngineFieldSelect from "../forms/EngineFieldSelect";
import { SliderField } from "../ui/form/SliderField";
import { CheckboxField } from "../ui/form/CheckboxField";
import { Input } from "../ui/form/Input";
+import { Select } from "../ui/form/Select";
const argValue = (arg) => {
if(arg && arg.value !== undefined) {
@@ -53,7 +54,7 @@ class ScriptEventFormInput extends Component {
// Toggle direction
newValue = "";
}
- if (type === "variable") {
+ if (type === "variable" || type === "select") {
newValue = newValue.value;
}
if (updateFn) {
@@ -157,18 +158,19 @@ class ScriptEventFormInput extends Component {
/>
}
if (type === "select") {
+ const options = field.options.map(([value, label]) => ({
+ value,
+ label
+ }));
+ const currentValue = options.find((o) => o.value === value) || options[0];
return (
- <select
+ <Select
id={id}
+ name={id}
+ value={currentValue}
+ options={options}
onChange={this.onChange}
- value={value || field.options[0][0]}
- >
- {field.options.map(option => (
- <option key={option[0]} value={option[0]}>
- {option[1]}
- </option>
- ))}
- </select>
+ />
);
}
if (type === "scene") {
|
hdata/vpd: add support for parsing CPU VRML records
Allows skiboot to parse out the processor part/serial numbers
on OpenPOWER P9 machines. | @@ -260,6 +260,28 @@ static void vpd_opfr_parse(struct dt_node *node,
return;
}
+/*
+ * For CPUs, parse the VRML data.
+ */
+static void vpd_vrml_parse(struct dt_node *node,
+ const void *fruvpd, unsigned int fruvpd_sz)
+{
+ const void *kw;
+ uint8_t sz;
+
+ /* Part number */
+ kw = vpd_find(fruvpd, fruvpd_sz, "VRML", "PN", &sz);
+ if (kw)
+ dt_add_property_nstr(node, "part-number", kw, sz);
+
+ /* Serial number */
+ kw = vpd_find(fruvpd, fruvpd_sz, "VRML", "SN", &sz);
+ if (kw)
+ dt_add_property_nstr(node, "serial-number", kw, sz);
+
+ return;
+}
+
static void vpd_vini_parse(struct dt_node *node,
const void *fruvpd, unsigned int fruvpd_sz)
{
@@ -341,6 +363,8 @@ void vpd_data_parse(struct dt_node *node, const void *fruvpd, u32 fruvpd_sz)
{
if (vpd_find_record(fruvpd, fruvpd_sz, "OPFR", NULL))
vpd_opfr_parse(node, fruvpd, fruvpd_sz);
+ else if (vpd_find_record(fruvpd, fruvpd_sz, "VRML", NULL))
+ vpd_vrml_parse(node, fruvpd, fruvpd_sz);
else
vpd_vini_parse(node, fruvpd, fruvpd_sz);
}
|
RTX5: corrected typo (Capiversion in pdsc) | @@ -2481,7 +2481,7 @@ and 8-bit Java bytecodes in Jazelle state.
</component>
<!-- CMSIS-RTOS2 Keil RTX5 component -->
- <component Cclass="CMSIS" Cgroup="RTOS2" Csub="Keil RTX5" Cvariant="Library" Cversion="5.2.3" Capiversion="2.1." condition="RTOS2 RTX5 Lib">
+ <component Cclass="CMSIS" Cgroup="RTOS2" Csub="Keil RTX5" Cvariant="Library" Cversion="5.2.3" Capiversion="2.1.2" condition="RTOS2 RTX5 Lib">
<description>CMSIS-RTOS2 RTX5 for Cortex-M, SC000, C300 and ARMv8-M (Library)</description>
<RTE_Components_h>
<!-- the following content goes into file 'RTE_Components.h' -->
|
fix some defines | #define OIDC_VALUES_H
// PROVIDER METADATA KEYS
-#define OIDC_KEY_SCOPES_SUPPORTED "scopes_supported";
-#define OIDC_KEY_GRANT_TYPES_SUPPORTED "grant_types_supported";
-#define OIDC_KEY_RESPONSE_TYPES_SUPPORTED "response_types_supported";
+#define OIDC_KEY_SCOPES_SUPPORTED "scopes_supported"
+#define OIDC_KEY_GRANT_TYPES_SUPPORTED "grant_types_supported"
+#define OIDC_KEY_RESPONSE_TYPES_SUPPORTED "response_types_supported"
#define OIDC_KEY_CODE_CHALLENGE_METHODS_SUPPORTED \
- "code_challenge_methods_supported";
+ "code_challenge_methods_supported"
// ENDPOINT KEYS
#define OIDC_KEY_TOKEN_ENDPOINT "token_endpoint"
#define OIDC_KEY_AUTHORIZATION_ENDPOINT "authorization_endpoint"
|
Update ChangeLog.md
Prepare for 1.5.0 release | Stlink ChangeLog
================
+v1.5.0
+======
+
+Release date: 2018-02-16
+
+Major changes and added features:
+
+* STM32F72xx73xx support ([#1969148](https://github.com/texane/stlink/commit/19691485359afef1a256964afcbb8dcf4b733209))
+* Add support of STM32L496xx/4A6xx devices ([#615](https://github.com/texane/stlink/pull/615))
+
+Fixes:
+
+* Fix memory map for stm32l496xx boards ([#639](https://github.com/texane/stlink/pull/639))
+* Fix write for microcontroler with RAM size less or equal to 32K ([#637](https://github.com/texane/stlink/pull/637))
+* Added LIB_INSTALL_DIR to correct libs install on 64-bit systems ([#636](https://github.com/texane/stlink/pull/636))
+* Fix verification of flash error for STM32L496x device ([#618](https://github.com/texane/stlink/pull/618))
+* Fix build on Fedora with GCC 8 ([#666](https://github.com/texane/stlink/pull/668))
+
v1.4.0
======
|
Fix raw socket TXT record with Avahi (wasn't included in service registration) | @@ -719,7 +719,7 @@ _papplPrinterRegisterDNSSDNoLock(
txt = avahi_string_list_add_printf(txt, "PaperMax=%s", papermax);
txt = avahi_string_list_add_printf(txt, "Scan=F");
- if ((error = avahi_entry_group_add_service_strlst(printer->dns_sd_ref, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, printer->dns_sd_name, "_pdl-datastream._tcp", NULL, system->hostname, 9099 + printer->printer_id, NULL)) < 0)
+ if ((error = avahi_entry_group_add_service_strlst(printer->dns_sd_ref, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, printer->dns_sd_name, "_pdl-datastream._tcp", NULL, system->hostname, 9099 + printer->printer_id, txt)) < 0)
{
papplLogPrinter(printer, PAPPL_LOGLEVEL_ERROR, "Unable to register '%s._pdl-datastream._tcp': %s", printer->dns_sd_name, _papplDNSSDStrError(error));
ret = false;
|
nimble/transport/h4: Assert on H4 failure
We can't recover from H4 failure so let's just assert for now, it will
be easier to spot the issue. | @@ -264,6 +264,7 @@ hci_h4_sm_rx(struct hci_h4_sm *h4sm, const uint8_t *buf, uint16_t len)
/* no break */
case HCI_H4_SM_W4_HEADER:
rc = hci_h4_sm_w4_header(h4sm, &ib);
+ assert(rc >= 0);
if (rc) {
break;
}
@@ -271,6 +272,7 @@ hci_h4_sm_rx(struct hci_h4_sm *h4sm, const uint8_t *buf, uint16_t len)
/* no break */
case HCI_H4_SM_W4_PAYLOAD:
rc = hci_h4_sm_w4_payload(h4sm, &ib);
+ assert(rc >= 0);
if (rc) {
break;
}
|
xpath BUGFIX message safe print | @@ -4025,7 +4025,7 @@ xpath_deref(struct lyxp_set **args, uint32_t UNUSED(arg_count), struct lyxp_set
/* find leafref target */
if (lyplg_type_resolve_leafref((struct lysc_type_leafref *)sleaf->type, &leaf->node, &leaf->value, set->tree,
&node, &errmsg)) {
- LOGERR(set->ctx, LY_EVALID, errmsg);
+ LOGERR(set->ctx, LY_EVALID, "%s", errmsg);
free(errmsg);
return LY_EVALID;
}
|
Fix gamma/linear conversion of a RGB table
Correcting the order of stack operations to fetch RGB components from
the table and to put in conversion the results.
Before the fix these two calls produced different results:
`lovr.math.gammaToLinear( 0.1, 0.2, 0.3 )`
`lovr.math.gammaToLinear( {0.1, 0.2, 0.3} )` | @@ -192,9 +192,10 @@ static int l_lovrMathGammaToLinear(lua_State* L) {
if (lua_istable(L, 1)) {
for (int i = 0; i < 3; i++) {
lua_rawgeti(L, 1, i + 1);
- lua_pushnumber(L, lovrMathGammaToLinear(luax_checkfloat(L, -1)));
+ float component = luax_checkfloat(L, -1);
+ lua_pop(L, 1);
+ lua_pushnumber(L, lovrMathGammaToLinear(component));
}
- lua_pop(L, 3);
return 3;
} else {
int n = CLAMP(lua_gettop(L), 1, 3);
@@ -209,9 +210,10 @@ static int l_lovrMathLinearToGamma(lua_State* L) {
if (lua_istable(L, 1)) {
for (int i = 0; i < 3; i++) {
lua_rawgeti(L, 1, i + 1);
- lua_pushnumber(L, lovrMathLinearToGamma(luax_checkfloat(L, -1)));
+ float component = luax_checkfloat(L, -1);
+ lua_pop(L, 1);
+ lua_pushnumber(L, lovrMathLinearToGamma(component));
}
- lua_pop(L, 3);
return 3;
} else {
int n = CLAMP(lua_gettop(L), 1, 3);
|
options/posix: Add struct ifconf | @@ -44,6 +44,14 @@ struct ifreq {
};
};
+struct ifconf {
+ int ifc_len;
+ union {
+ char *ifc_buf;
+ struct ifreq *ifc_req;
+ };
+};
+
void if_freenameindex(struct if_nameindex *);
char *if_indextoname(unsigned int, char *);
struct if_nameindex *if_nameindex(void);
|
Fix misleading debug message for resourcelinks | @@ -2159,7 +2159,7 @@ static int sqliteLoadAllResourcelinksCallback(void *user, int ncols, char **colv
{
QString val = QString::fromUtf8(colval[i]);
- DBG_Printf(DBG_INFO_L2, "Sqlite schedule: %s = %s\n", colname[i], qPrintable(val));
+ DBG_Printf(DBG_INFO_L2, "Sqlite resourcelink: %s = %s\n", colname[i], qPrintable(val));
if (strcmp(colname[i], "id") == 0)
|
Add a test for the parse function when HAVE_MAT_JSON is disabled. | @@ -444,4 +444,16 @@ TEST_F(TransmitProfilesTests, load_Json_JsonNotEnabled_ReturnsFalse)
const std::string rule = R"([])";
ASSERT_FALSE(TransmitProfiles::load(rule));
}
+
+TEST_F(TransmitProfilesTests, parse_GoodJsonJsonNotEnabled_ReturnsZero)
+{
+ const std::string rule = R"([{
+ "name": "GoodRule",
+ "rules": [
+ { "netCost": "restricted", "timers": [ -1, -1, -1 ] }
+ ]
+}])";
+ ;
+ ASSERT_EQ(TransmitProfiles::parse(rule), size_t { 0 });
+}
#endif // HAVE_MAT_JSONHPP
\ No newline at end of file
|
Docs - making guc table print-only instead of html to avoid formatting problems | <abstract>Descriptions of the Greenplum Database server configuration parameters listed
alphabetically.</abstract>
<body>
- <!--Table is HTML only op-help-->
+ <!--Table is PDF only-->
<simpletable frame="all" relcolwidth="1.0* 1.09* 1.13*" id="simpletable_c53_rlx_wp"
- otherprops="op-help">
+ otherprops="op-print">
<strow>
<stentry>
<ul id="ul_tc3_nlx_wp">
|
Remove warning message in set_library
in case set_library operation was already performed | @@ -220,8 +220,6 @@ set_library(const char* libpath)
if (rc < sbuf.st_size) {
perror("set_library:write");
}
- } else {
- fprintf(stderr, "WARNING: can't locate or set the loader string in %s\n", libpath);
}
close(fd);
|
Update util script. | @@ -17,9 +17,14 @@ if __name__ == "__main__":
print('objfind.py <sort key (text, bss or data)>')
sys.exit(1)
+ if len(sys.argv) == 3:
+ cwd = sys.argv[2]
+ else:
+ cwd = '.'
+
objfiles = []
sortkey = sys.argv[1]
- for root, dirs, files in os.walk("."):
+ for root, dirs, files in os.walk(cwd):
for file in files:
if file.endswith(".o"):
objfiles.append({'path':os.path.join(root, file)})
|
Move --disable-pxf from compile_gpdb.bash to gpAux/Makefile
Remove CONFIGURE_FLAGS for win32 in compile_gpdb.bash
The configure values are not used at all, so remove the unused codes here.
Authored-by: Tingfang Bao | @@ -241,7 +241,6 @@ function _main() {
;;
win32)
export BLD_ARCH=win32
- CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --disable-pxf"
;;
*)
echo "only centos, ubuntu, sles and win32 are supported TARGET_OS'es"
|
linux/arch: modify signal mask for sigtimedwait once only | @@ -350,18 +350,16 @@ static bool arch_checkWait(honggfuzz_t * hfuzz, fuzzer_t * fuzzer)
}
}
+__thread sigset_t sset_io_chld;
+
void arch_reapChild(honggfuzz_t * hfuzz, fuzzer_t * fuzzer)
{
- sigset_t sset;
- sigemptyset(&sset);
- sigaddset(&sset, SIGIO);
- sigaddset(&sset, SIGCHLD);
static const struct timespec ts = {
.tv_sec = 0U,
.tv_nsec = 250000000U,
};
for (;;) {
- int sig = syscall(__NR_rt_sigtimedwait, &sset, NULL, &ts, _NSIG / 8);
+ int sig = syscall(__NR_rt_sigtimedwait, &sset_io_chld, NULL, &ts, _NSIG / 8);
if (sig == -1 && (errno != EAGAIN && errno != EINTR)) {
PLOG_F("sigtimedwait(SIGIO|SIGCHLD, 0.25s)");
}
@@ -526,5 +524,9 @@ bool arch_archThreadInit(honggfuzz_t * hfuzz UNUSED, fuzzer_t * fuzzer UNUSED)
fuzzer->linux.cpuBranchFd = -1;
fuzzer->linux.cpuIptBtsFd = -1;
+ sigemptyset(&sset_io_chld);
+ sigaddset(&sset_io_chld, SIGIO);
+ sigaddset(&sset_io_chld, SIGCHLD);
+
return true;
}
|
common: Add hardware error code
Add error code to indicate a piece of hardware is not working properly.
TEST=compile
BRANCH=none | @@ -147,6 +147,8 @@ enum ec_error_list {
EC_ERROR_MEMORY_ALLOCATION = 23,
/* Invalid to configure in the current module mode/stage */
EC_ERROR_INVALID_CONFIG = 24,
+ /* something wrong in a HW */
+ EC_ERROR_HW_INTERNAL = 25,
/* Verified boot errors */
EC_ERROR_VBOOT_SIGNATURE = 0x1000, /* 4096 */
|
nlops/tenmul: add GPU support | #include "nlops/nlop.h"
+#ifdef USE_CUDA
+#include "num/gpuops.h"
+#endif
+
#include "tenmul.h"
@@ -37,6 +41,17 @@ struct tenmul_s {
DEF_TYPEID(tenmul_s);
+
+static void tenmul_initialize(struct tenmul_s* data, const complex float* arg)
+{
+ if (NULL == data->x1)
+ data->x1 = md_alloc_sameplace(data->N, data->dims1, CFL_SIZE, arg);
+
+ if (NULL == data->x2)
+ data->x2 = md_alloc_sameplace(data->N, data->dims2, CFL_SIZE, arg);
+}
+
+
static void tenmul_fun(const nlop_data_t* _data, int N, complex float* args[N])
{
struct tenmul_s* data = CAST_DOWN(tenmul_s, _data);
@@ -46,6 +61,11 @@ static void tenmul_fun(const nlop_data_t* _data, int N, complex float* args[N])
const complex float* src1 = args[1];
const complex float* src2 = args[2];
+#ifdef USE_CUDA
+ assert((cuda_ondevice(dst) == cuda_ondevice(src1)) && (cuda_ondevice(src1) == cuda_ondevice(src2)));
+#endif
+ tenmul_initialize(data, dst);
+
md_copy2(data->N, data->dims1, MD_STRIDES(data->N, data->dims1, CFL_SIZE), data->x1, data->istr1, src1, CFL_SIZE);
md_copy2(data->N, data->dims2, MD_STRIDES(data->N, data->dims2, CFL_SIZE), data->x2, data->istr2, src2, CFL_SIZE);
@@ -109,6 +129,7 @@ static void tenmul_del(const nlop_data_t* _data)
struct nlop_s* nlop_tenmul_create2(int N, const long dims[N], const long ostr[N],
const long istr1[N], const long istr2[N])
{
+
PTR_ALLOC(struct tenmul_s, data);
SET_TYPEID(tenmul_s, data);
@@ -137,8 +158,9 @@ struct nlop_s* nlop_tenmul_create2(int N, const long dims[N], const long ostr[N]
data->dims2 = *PTR_PASS(ndims2);
data->istr2 = *PTR_PASS(nistr2);
- data->x1 = md_alloc(N, data->dims1, CFL_SIZE);
- data->x2 = md_alloc(N, data->dims2, CFL_SIZE);
+ // will be initialized later, to transparently support GPU
+ data->x1 = NULL;
+ data->x2 = NULL;
long nl_odims[1][N];
md_select_dims(N, md_nontriv_strides(N, ostr), nl_odims[0], dims);
|
Docs: Drop dead Chinese discussion page | @@ -13,7 +13,6 @@ OpenCore bootloader with development SDK.
- [MacRumors.com](https://forums.macrumors.com/threads/opencore-on-the-mac-pro.2207814/) in English, legacy Apple hardware
- [KVM-OpenCore](https://github.com/Leoyzen/KVM-Opencore) in English, KVM configuration
- [macOS86.it](https://www.macos86.it/showthread.php?4570-OpenCore-aka-OC-Nuovo-BootLoader) in Italian
-- [PCbeta.com](http://bbs.pcbeta.com/viewthread-1815623-1-1.html) in Chinese
## Libraries
|
Tests: added websocket test with long length. | @@ -128,6 +128,18 @@ class TestASGIWebsockets(TestApplicationPython):
sock.close()
+ def test_asgi_websockets_length_long(self):
+ self.load('websockets/mirror')
+
+ _, sock, _ = self.ws.upgrade()
+
+ self.ws.frame_write(sock, self.ws.OP_TEXT, 'fragment1', fin=False)
+ self.ws.frame_write(
+ sock, self.ws.OP_CONT, 'fragment2', length=2**64 - 1
+ )
+
+ self.check_close(sock, 1009) # 1009 - CLOSE_TOO_LARGE
+
def test_asgi_websockets_frame_fragmentation_invalid(self):
self.load('websockets/mirror')
|
Add LSM probe documentation
Add LSM documentation
Add minimum kernel version requirements | @@ -18,6 +18,7 @@ This guide is incomplete. If something feels missing, check the bcc and kernel s
- [8. system call tracepoints](#8-system-call-tracepoints)
- [9. kfuncs](#9-kfuncs)
- [10. kretfuncs](#10-kretfuncs)
+ - [11. lsm probes](#11-lsm-probes)
- [Data](#data)
- [1. bpf_probe_read_kernel()](#1-bpf_probe_read_kernel)
- [2. bpf_probe_read_kernel_str()](#2-bpf_probe_read_kernel_str)
@@ -366,6 +367,45 @@ Examples in situ:
[search /tools](https://github.com/iovisor/bcc/search?q=KRETFUNC_PROBE+path%3Atools&type=Code)
+### 11. LSM Probes
+
+Syntax: LSM_PROBE(*hook*, typeof(arg1) arg1, typeof(arg2) arg2 ...)
+
+This is a macro that instruments an LSM hook as a BPF program. It can be
+used to audit security events and implement MAC security policies in BPF.
+It is defined by specifying the hook name followed by its arguments.
+
+Hook names can be found in
+[include/linux/security.h](https://github.com/torvalds/linux/tree/master/include/linux/security.h#L254)
+by taking functions like `security_hookname` and taking just the `hookname` part.
+For example, `security_bpf` would simply become `bpf`.
+
+Unlike other BPF program types, the return value specified in an LSM probe
+matters. A return value of 0 allows the hook to succeed, whereas
+any non-zero return value will cause the hook to fail and deny the
+security operation.
+
+The following example instruments a hook that denies all future BPF operations:
+```C
+LSM_PROBE(bpf, int cmd, union bpf_attr *attr, unsigned int size)
+{
+ return -EPERM;
+}
+```
+
+This instruments the `security_bpf` hook and causes it to return `-EPERM`.
+Changing `return -EPERM` to `return 0` would cause the BPF program
+to allow the operation instead.
+
+LSM probes require at least a 5.7+ kernel with the following configuation options set:
+- `CONFIG_BPF_LSM=y`
+- `CONFIG_LSM` comma separated string must contain "bpf" (for example,
+ `CONFIG_LSM="lockdown,yama,bpf"`)
+
+Examples in situ:
+[search /tests](https://github.com/iovisor/bcc/search?q=LSM_PROBE+path%3Atests&type=Code)
+
+
## Data
### 1. bpf_probe_read_kernel()
|
Update PSA_CIPHER_ENCRYPT_OUTPUT_SIZE | #define PSA_CIPHER_ENCRYPT_OUTPUT_SIZE(key_type, alg, input_length) \
(alg == PSA_ALG_CBC_PKCS7 ? \
PSA_ROUND_UP_TO_MULTIPLE(PSA_BLOCK_CIPHER_BLOCK_LENGTH(key_type), \
- (input_length) + PSA_CIPHER_IV_LENGTH((key_type), \
- (alg))) : \
+ (input_length) + 1) + \
+ PSA_CIPHER_IV_LENGTH((key_type), (alg)) : \
(PSA_ALG_IS_CIPHER(alg) ? \
(input_length) + PSA_CIPHER_IV_LENGTH((key_type), (alg)) : \
0))
|
Move fillfactor option back to intRelOpts_gp
It's moved from intRelOpts_gp to boolRelOpts_gp in commit
by mistake. Moving it back. | static relopt_bool boolRelOpts_gp[] =
{
- {
- {
- SOPT_FILLFACTOR,
- "Packs bitmap index pages only to this percentage",
- RELOPT_KIND_BITMAP,
- ShareUpdateExclusiveLock /* since it applies only to later
- * inserts */
- },
- BITMAP_DEFAULT_FILLFACTOR, BITMAP_MIN_FILLFACTOR, 100
- },
{
{
SOPT_CHECKSUM,
@@ -70,6 +60,16 @@ static relopt_bool boolRelOpts_gp[] =
static relopt_int intRelOpts_gp[] =
{
+ {
+ {
+ SOPT_FILLFACTOR,
+ "Packs bitmap index pages only to this percentage",
+ RELOPT_KIND_BITMAP,
+ ShareUpdateExclusiveLock /* since it applies only to later
+ * inserts */
+ },
+ BITMAP_DEFAULT_FILLFACTOR, BITMAP_MIN_FILLFACTOR, 100
+ },
{
{
SOPT_BLOCKSIZE,
|
fix duplicate PG_SETMASK() statement
fix duplicate PG_SETMASK() statement in postgres.c | @@ -4671,13 +4671,6 @@ PostgresMain(int argc, char *argv[],
/* We need to allow SIGINT, etc during the initial transaction */
PG_SETMASK(&UnBlockSig);
- /*
- * We need to allow SIGINT, etc during the initial transaction.
- * Also, currently if this is the Master with standby support
- * we need to allow SIGUSR1 for performing sync replication (used by latch).
- */
- PG_SETMASK(&UnBlockSig);
-
/*
* General initialization.
*
|
py/compile: Optimize empty "else" clauses in "elif" statements.
Previously, only "if" without else was optimized, but elif without else
led to generation of empty jump to a next statement. | @@ -1344,6 +1344,8 @@ STATIC void compile_if_stmt(compiler_t *comp, mp_parse_node_struct_t *pns) {
EMIT_ARG(label_assign, l_fail);
}
+ bool empty_else = MP_PARSE_NODE_IS_NULL(pns->nodes[3]);
+
// compile elif blocks (if any)
mp_parse_node_t *pn_elif;
int n_elif = mp_parse_node_extract_list(&pns->nodes[2], PN_if_stmt_elif_list, &pn_elif);
@@ -1364,7 +1366,7 @@ STATIC void compile_if_stmt(compiler_t *comp, mp_parse_node_struct_t *pns) {
}
// optimisation: don't jump if last instruction was return
- if (!EMIT(last_emit_was_return_value)) {
+ if (!EMIT(last_emit_was_return_value) && !(empty_else && i == n_elif - 1)) {
EMIT_ARG(jump, l_end);
}
EMIT_ARG(label_assign, l_fail);
|
openmp on windows/msvc needs signed type | @@ -642,7 +642,8 @@ static size_t get_dense_ir_reciprocal_mesh_normal(int grid_address[][3],
/* grid: reducible grid points */
/* ir_mapping_table: the mapping from each point to ir-point. */
- size_t i, grid_point_rot;
+ ptrdiff_t i;
+ size_t grid_point_rot;
int j;
int address_double[3], address_double_rot[3];
@@ -681,7 +682,8 @@ get_dense_ir_reciprocal_mesh_distortion(int grid_address[][3],
const int is_shift[3],
const MatINT *rot_reciprocal)
{
- size_t i, grid_point_rot;
+ ptrdiff_t i;
+ size_t grid_point_rot;
int j, k, indivisible;
int address_double[3], address_double_rot[3];
long long_address_double[3], long_address_double_rot[3], divisor[3];
@@ -744,7 +746,8 @@ get_dense_ir_reciprocal_mesh_distortion(int grid_address[][3],
static size_t get_dense_num_ir(size_t ir_mapping_table[], const int mesh[3])
{
- size_t i, num_ir;
+ ptrdiff_t i;
+ size_t num_ir;
num_ir = 0;
|
gtasa update
fixed | @@ -1497,12 +1497,19 @@ void CompatWarning()
}
}
+DWORD WINAPI CompatHandler(LPVOID)
+{
+ Sleep(0);
+ OverwriteResolution();
+ return 0;
+}
+
BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD reason, LPVOID /*lpReserved*/)
{
if (reason == DLL_PROCESS_ATTACH)
{
Init();
- CallbackHandler::RegisterCallback(L"SilentPatchSA.asi", OverwriteResolution);
+ CallbackHandler::RegisterCallback(L"SilentPatchSA.asi", []() {CreateThreadAutoClose(0, 0, (LPTHREAD_START_ROUTINE)&CompatHandler, NULL, 0, NULL); });
CallbackHandler::RegisterCallback(L"wshps.asi", CompatWarning);
}
return TRUE;
|
admin/test-suite: __mangle_shebangs_exclude -> __brp_mangle_shebangs_exclude | @@ -23,7 +23,7 @@ Source0: tests-ohpc.tar
BuildRequires: autoconf%{PROJ_DELIM}
BuildRequires: automake%{PROJ_DELIM}
-%global __mangle_shebangs_exclude bats
+%global __brp_mangle_shebangs_exclude bats
%if 0%{?suse_version} >= 1230
Requires(pre): shadow
|
tests: internal: fstore: do not continue tests if file creation failed | @@ -57,6 +57,9 @@ void cb_all()
fsf = flb_fstore_file_create(fs, st, "example.txt", 100);
TEST_CHECK(fsf != NULL);
+ if (!fsf) {
+ return;
+ }
ret = stat(FSF_STORE_PATH "/abc/example.txt", &st_data);
TEST_CHECK(ret == 0);
|
change output limits and integral limit. output limit raised so that scaling stays better during clipping events, integral limit increased as improved iterm relax is added. | #ifdef BRUSHLESS_TARGET
/// output limit
-const float outlimit[PID_SIZE] = {0.8, 0.8, 0.4};
+const float outlimit[PID_SIZE] = {1.0, 1.0, 1.0};
// limit of integral term (abs)
-const float integrallimit[PID_SIZE] = {0.8, 0.8, 0.4};
+const float integrallimit[PID_SIZE] = {0.8, 0.8, 0.6};
#else // BRUSHED TARGET
|
motorcontrol: simplify old end condition syntax | @@ -134,9 +134,7 @@ pbio_error_t control_update_angle_target(pbio_port_t port) {
duty = duty_due_to_proportional + duty_due_to_integral + duty_due_to_derivative;
// Check if we are at the target and standing still, with slightly different end conditions for each mode
- if (
- (mtr->maneuver.action == RUN_TARGET) &&
- (
+ if (mtr->maneuver.action == RUN_TARGET &&
// Maneuver is complete, time wise
time_ref >= mtr->maneuver.trajectory.t3 &&
// Position is within the lower tolerated bound ...
@@ -144,9 +142,7 @@ pbio_error_t control_update_angle_target(pbio_port_t port) {
// ... and the upper tolerated bound
count_now <= mtr->maneuver.trajectory.th3 + mtr->settings.count_tolerance &&
// And the motor stands still.
- abs(rate_now) < mtr->settings.rate_tolerance
- )
- )
+ abs(rate_now) < mtr->settings.rate_tolerance)
{
// If so, we have reached our goal. We can keep running this loop in order to hold this position.
// But if brake or coast was specified as the afer_stop, we trigger that. Also clear the running flag to stop waiting for completion.
@@ -258,18 +254,14 @@ pbio_error_t control_update_time_target(pbio_port_t port) {
// Check if we are at the target and standing still, with slightly different end conditions for each mode
if (
- // Conditions for RUN_TIME command
+ // Conditions for RUN_TIME command: past the total duration of the timed command
(
- (mtr->maneuver.action == RUN_TIME) &&
- // We are past the total duration of the timed command
- (time_now >= mtr->maneuver.trajectory.t3)
+ mtr->maneuver.action == RUN_TIME && time_now >= mtr->maneuver.trajectory.t3
)
||
- // Conditions for run_stalled commands
+ // Conditions for run_stalled commands: the motor is stalled in either proportional or integral sense
(
- (mtr->maneuver.action == RUN_STALLED) &&
- // Whether the motor is stalled in either proportional or integral sense
- mtr->stalled != STALLED_NONE
+ mtr->maneuver.action == RUN_STALLED && mtr->stalled != STALLED_NONE
)
)
{
|
Don't reset camera position of desktop driver on reset | #include <stdbool.h>
static struct {
+ bool initialized;
+
float LOVR_ALIGN(16) position[4];
float LOVR_ALIGN(16) velocity[4];
float LOVR_ALIGN(16) localVelocity[4];
@@ -28,12 +30,15 @@ static bool desktop_init(float offset, uint32_t msaa) {
state.offset = offset;
state.clipNear = 0.1f;
state.clipFar = 100.f;
+
+ if (!state.initialized) {
mat4_identity(state.transform);
+ state.initialized = true;
+ }
return true;
}
static void desktop_destroy(void) {
- memset(&state, 0, sizeof(state));
}
static bool desktop_getName(char* name, size_t length) {
|
py/mkrules.mk: Remove unnecessary ; in makefile.
This ; make Windows compilation fail with GNU makefile 4.2.1. It was added
in as part of a shell if-
statement, but this if-statement was subsequently removed in
so the semicolon is not needed. | @@ -72,7 +72,7 @@ $(OBJ): | $(HEADER_BUILD)/qstrdefs.generated.h $(HEADER_BUILD)/mpversion.h
# - else, process all source files ($^) [this covers "make -B" which can set $? to empty]
$(HEADER_BUILD)/qstr.i.last: $(SRC_QSTR) $(QSTR_GLOBAL_DEPENDENCIES) | $(HEADER_BUILD)/mpversion.h
$(ECHO) "GEN $@"
- $(Q)$(CPP) $(QSTR_GEN_EXTRA_CFLAGS) $(CFLAGS) $(if $(filter $?,$(QSTR_GLOBAL_DEPENDENCIES)),$^,$(if $?,$?,$^)) >$(HEADER_BUILD)/qstr.i.last;
+ $(Q)$(CPP) $(QSTR_GEN_EXTRA_CFLAGS) $(CFLAGS) $(if $(filter $?,$(QSTR_GLOBAL_DEPENDENCIES)),$^,$(if $?,$?,$^)) >$(HEADER_BUILD)/qstr.i.last
$(HEADER_BUILD)/qstr.split: $(HEADER_BUILD)/qstr.i.last
$(ECHO) "GEN $@"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.