Skip to content

Commit ac94505

Browse files
committed
added/updated tests
1 parent 9595805 commit ac94505

File tree

6 files changed

+910
-12
lines changed

6 files changed

+910
-12
lines changed

tests/results/0

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
1line
2+
:learn
3+
Advanced
4+
Classes
5+
Comments
6+
Control_Flow
7+
Functions
8+
Modules
9+
Primitive_Datatypes_and_Operators
10+
Variables_and_Collections
211
doc
312
func
413
hello
514
lambda
615
loops
716
recursion
8-
Primitive_Datatypes_and_Operators
9-
Variables_and_Collections
10-
Control_Flow
11-
Functions
12-
Classes
13-
Modules
14-
Advanced
15-
Comments
16-
:learn

tests/results/14

Lines changed: 772 additions & 0 deletions
Large diffs are not rendered by default.

tests/results/15

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Latency numbers every programmer should know 
2+
3+
1ns Main memory reference: Send 2,000 bytes Read 1,000,000 bytes
4+
▗▖ 100ns over commodity network: sequentially from SSD: 61us
5+
▗▖ 62ns ▗ 
6+
L1 cache reference: 1ns ▗ 
7+
▗▖ 1us Disk seek: 2ms
8+
▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ SSD random read: 16us ▗▖▗▖▗ 
9+
Branch mispredict: 3ns  ▗▖ 
10+
▗▖▗▖▗▖  Read 1,000,000 bytes
11+
Compress 1KB wth Snappy: Read 1,000,000 bytes sequentially from disk:
12+
L2 cache reference: 4ns 2us sequentially from memory: 947us
13+
▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ 3us ▗ 
14+
▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗ 
15+
Mutex lock/unlock: 16ns   Packet roundtrip
16+
▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖  Round trip CA to Netherlands: 150ms
17+
▗▖▗▖▗▖▗▖▗▖▗▖▗ 10us = ▗▖ in same datacenter: 500us ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ 
18+
▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ 
19+
100ns = ▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ 
20+
▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ 
21+
▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ 
22+
▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ 
23+
▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖  ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ 
24+
▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖  ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ 
25+
▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ 1ms = ▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ 
26+
▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ 
27+
▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ 
28+
▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖  ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ 
29+
▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖  ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ 
30+
  ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ 
31+
▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ 
32+
# [github.com/chubin/late.nz] [MIT License] ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖  
33+
# Console port of "Jeff Dean's latency numbers" ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ 
34+
# from [github.com/colin-scott/interactive_latencies] ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ 
35+
 ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ 

tests/results/16

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Microsoft Azure CLI 2.0
2+
# Command-line tools for Azure
3+
4+
# Install Azure CLI 2.0 with one curl command.
5+
curl -L https://aka.ms/InstallAzureCli | bash
6+
7+
# create a resource group named "MyResourceGroup" in the westus2 region of Azure
8+
az group create -n MyResourceGroup -l westus2 
9+
10+
# create a Linux VM using the UbuntuTLS image, with two attached storage disks of 10 GB and 20 GB
11+
az vm create -n MyLinuxVM -g MyResourceGroup --ssh-key-value $HOME/.ssh/id_rsa.pub --image UbuntuLTS --data-disk-sizes-gb 10 20
12+
13+
# list VMs
14+
az vm list --output table
15+
16+
# list only VMs having distinct state
17+
az vm list -d --query "[?powerState=='VM running']" --output table
18+
19+
# delete VM (with the name MyLinuxVM in the group MyResourceGroup)
20+
az vm delete -g MyResourceGroup -n MyLinuxVM --yes
21+
22+
# Delete all VMs in a resource group
23+
az vm delete --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv)
24+
25+
# Create an Image based on a running VM
26+
az vm deallocate -g MyResourceGroup -n MyLinuxVM
27+
az vm generalize -g MyResourceGroup -n MyLinuxVM
28+
az image create --resource-group MyResourceGroup --name MyTestImage --source MyLinuxVM
29+
30+
# Running VM based on a VHD
31+
az storage blob upload --account-name "${account_name}" \
32+
 --account-key "${account_key}" --container-name "${container_name}" --type page \
33+
 --file "${file}" --name "${vhd_name}"
34+
az disk create \
35+
 --resource-group ${resource_group} \
36+
 --name myManagedDisk \
37+
 --source https://${account_name}.blob.core.windows.net/${container_name}/${vhd_name}
38+
39+
# open port
40+
az vm open-port --resource-group MyResourceGroup --name MyLinuxVM --port 443 --priority 899
41+
42+
# Show storage accounts
43+
az storage account list --output table
44+
45+
# Show contaniers for an account
46+
az storage container list --account-name mystorageaccount --output table
47+
48+
# Show blobs in a container
49+
az storage blob list --account-name mystorageaccount --container-name mycontainer --output table
50+
51+
# list account keys
52+
az storage account keys list --account-name STORAGE_NAME --resource-group RESOURCE_GROUP
53+
54+
# Show own images
55+
az image list --output table
56+
57+
# Configure default storage location
58+
az configure --defaults location=eastus2
59+
60+
# Show disks
61+
az disk list --output table
62+
63+
# Copy blob
64+
az storage blob copy start \
65+
 --source-uri 'https://md-ldh5nknx2rkz.blob.core.windows.net/jzwuuuzzapn0/abcd?sv=2017-04-17&sr=b&si=68041718-6828-4f5e-9e6e-a1b719975062&sig=XXX' \
66+
 --account-key XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX== \
67+
 --account-name destaccount \
68+
 --destination-container vms \
69+
 --destination-blob DESTINATION-blob.vhd
70+
71+
# List virtual networks
72+
az network vnet list --output table
73+
74+
# List virtual networks adapters
75+
az network nic list --output table
76+
77+
# List public IP addresses used by the VMs
78+
az vm list-ip-addresses --output table
79+
80+
# create snapshot
81+
az snapshot create --resource-group IC-EXASOL-001 --source vm1-disk1 -n vm1-snap1
82+
83+
# create SAS url for a snapshot
84+
az snapshot grant-access --resource-group IC-EXASOL-001 --name vm1-snap1 --duration-in-seconds 36000 --query '[accessSas]' -o tsv
85+
86+
# attach disk
87+
az vm disk attach --vm-name vm1 -g RESOURCE_GROUP --disk DISK1_ID
88+
89+
# detach disk
90+
az vm disk detach --vm-name vm1 -g RESOURCE_GROUP --name DISK1_ID

tests/results/7

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ cmd_stealth() {
381381
current_text="$(echo $current | tr -c '[a-zA-Z0-9]' ' ')"
382382
if [ $(echo $current_text | wc -w) -gt "$STEALTH_MAX_SELECTION_LENGTH" ]; then
383383
echo "\033[0;31mstealth:\033[0m selection length is longer than $STEALTH_MAX_SELECTION_LENGTH words; ignoring"
384-
return
384+
continue
385385
else
386386
printf "\n\033[0;31mstealth: \033[7m $current_text\033[0m\n"
387387
query=$(prepare_query "$section" "$current_text" "$arguments")
@@ -460,5 +460,5 @@ while true; do
460460
version) cmd_name=version;;
461461
*) cmd_name="query $cmd_name";;
462462
esac
463-
cmd_$cmd_name $cmdargs
463+
cmd_$cmd_name $cmd_args
464464
done

tests/run-tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ trap 'rm -rf $TMP $TMP2' EXIT
88
i=0
99
failed=0
1010
while read -r test_line; do
11+
test_line="${test_line// #.*//}"
1112
eval "$test_line" > "$TMP"
1213
diff results/"$i" "$TMP" > "$TMP2"
1314
if [ "$?" != 0 ]; then
1415
echo FAILED: [$i] $test_line
1516
((failed++))
1617
fi
1718
((i++))
18-
done < tests.txt
19+
done < tests2.txt
1920

2021
echo TESTS/OK/FAILED "$i/$[i-failed]/$failed"
2122

0 commit comments

Comments
 (0)